MCPcopy Create free account
hub / github.com/TASEmulators/fceux / DMCDMA

Function DMCDMA

src/sound.cpp:520–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518}
519
520static INLINE void DMCDMA(void)
521{
522 if(DMCSize && !DMCHaveDMA)
523 {
524 X6502_DMR(0x8000+DMCAddress);
525 X6502_DMR(0x8000+DMCAddress);
526 X6502_DMR(0x8000+DMCAddress);
527 DMCDMABuf=X6502_DMR(0x8000+DMCAddress);
528 DMCHaveDMA=1;
529 DMCAddress=(DMCAddress+1)&0x7fff;
530 DMCSize--;
531 if(!DMCSize)
532 {
533 if(DMCFormat&0x40)
534 PrepDPCM();
535 else
536 {
537 if(DMCFormat&0x80) {
538 SIRQStat|=0x80;
539 X6502_IRQBegin(FCEU_IQDPCM);
540 }
541 }
542 }
543 }
544}
545
546void FCEU_SoundCPUHook(int cycles)
547{

Callers 1

FCEU_SoundCPUHookFunction · 0.85

Calls 3

X6502_DMRFunction · 0.85
PrepDPCMFunction · 0.85
X6502_IRQBeginFunction · 0.85

Tested by

no test coverage detected