void RastanYM2151IRQHandler(int irq ) { if (irq) { ZetRaiseIrq(0); } }
void twinhawkYM2151IRQHandler(int irq ) { if (irq) { ZetRaiseIrq(1); } else { ZetLowerIrq(); } }
static int DrvFrame() { if (DrvReset) { DrvDoReset(); } ZetOpen(0); ZetRun(4000000 / 60); ZetRaiseIrq(0); ZetClose(); if (pBurnDraw) { DrvDraw(); } return 0; }
int QsndSectRun(int nStart,int nEnd) { int nTo; // See if an irq occurs before the end while (nStart+nIrqNext<nEnd) { nTo=nStart+nIrqNext; SectRun(nStart,nTo); ZetRaiseIrq(0xff); ZetRun(0); ZetLowerIrq(); nIrqNext=nIrqPeriod; // Next irq happens after period nStart=nTo; // Done this part now } nTo=nEnd; SectRun(nStart,nTo); nIrqNext-=nTo-nStart; // Next irq happens sooner return 0; }
void __fastcall battlegWriteByte(UINT32 sekAddress, UINT8 byteValue) { switch (sekAddress) { case 0x218021: // The 68K has access to the Z80 RAM RamZ80[0x10] = byteValue; // Only these addresses are used, however break; case 0x21C01D: // Coin control break; case 0x600001: nSoundCommand = byteValue; // Trigger Z80 interrupt, and allow the Z80 to process it ZetRaiseIrq(255); nCyclesDone[1] += ZetRun(0x0200); break; // default: // printf("Attempt to write byte value %x to location %x\n", byteValue, sekAddress); } }