MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / FillWaveRAM

Method FillWaveRAM

Source/ChannelsFDS.cpp:282–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void CChannelHandlerFDS::FillWaveRAM(array_view<unsigned char> Buffer) // // //
283{
284 if (Buffer.size() != m_iWaveTable.size())
285 return;
286 if (Buffer != m_iWaveTable) {
287 Buffer.copy(m_iWaveTable); // // //
288
289 // Fills the 64 byte waveform table
290 // Enable write for waveform RAM
291 m_pAPU->Write(0x4089, 0x80);
292
293 // Wave ram
294 for (int i = 0; i < 0x40; ++i)
295 m_pAPU->Write(0x4040 + i, m_iWaveTable[i]);
296
297 // Disable write for waveform RAM, master volume = full
298 m_pAPU->Write(0x4089, 0x00);
299 }
300}
301
302void CChannelHandlerFDS::FillModulationTable(array_view<unsigned char> Buffer) // // //
303{

Callers 2

UpdateWaveMethod · 0.45
UpdateTablesMethod · 0.45

Calls 3

copyMethod · 0.80
sizeMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected