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

Method FillModulationTable

Source/ChannelsFDS.cpp:302–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302void CChannelHandlerFDS::FillModulationTable(array_view<unsigned char> Buffer) // // //
303{
304 if (Buffer.size() != m_iModTable.size())
305 return;
306 if (Buffer != m_iModTable) {
307 Buffer.copy(m_iModTable); // // //
308
309 // Disable modulation
310 m_pAPU->Write(0x4087, 0x80);
311 // Reset modulation table pointer, set bias to zero
312 m_pAPU->Write(0x4085, 0x00);
313 // Fill the table
314 for (int i = 0; i < 32; ++i)
315 m_pAPU->Write(0x4088, m_iModTable[i]);
316 }
317}

Callers 1

UpdateTablesMethod · 0.80

Calls 3

copyMethod · 0.80
sizeMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected