// Scan the current PSound z80 state int PsndZScan(int nAction) { struct BurnArea ba; int i=0; ZetScan(nAction); // Scan Z80 SCAN_VAR(nTimerPeriod) SCAN_VAR(nNextTimer) SCAN_VAR(FmReg) SCAN_VAR(nFmSel) SCAN_VAR(nPsndZBank) // Scan Ram memset(&ba,0,sizeof(ba)); ba.szName="PsndZRam"; ba.Data=PsndZRam; ba.nLen=0x800; BurnAcb(&ba); if (nAction&2) { PsndZBankMap(); // If write, bank could have changed CalcTimerPeriod(); // If write, timer registers could have changed // Resend all the registers to the ym2151 if (bPsmOkay) { for (i=0; i<0x100; i++) { YM2151WriteReg(0,i,FmReg[i]); } } } return 0; }
static INT32 DrvScan(INT32 nAction,INT32 *pnMin) { struct BurnArea ba; if (pnMin) { *pnMin = 0x029732; } if (nAction & ACB_VOLATILE) { memset(&ba, 0, sizeof(ba)); ba.Data = AllRam; ba.nLen = RamEnd - AllRam; ba.szName = "All Ram"; BurnAcb(&ba); SekScan(nAction); YMZ280BScan(); KonamiICScan(nAction); SCAN_VAR(control_data); SCAN_VAR(control_data2); } return 0; }
// Scan ram static int DrvScan(int nAction, int *pnMin) { struct BurnArea ba; if (pnMin) { // Return minimum compatible version *pnMin = 0x020902; } EEPROMScan(nAction, pnMin); // Scan EEPROM if (nAction & ACB_VOLATILE) { // Scan volatile ram memset(&ba, 0, sizeof(ba)); ba.Data = RamStart; ba.nLen = RamEnd - RamStart; ba.szName = "RAM"; BurnAcb(&ba); SekScan(nAction); // scan 68000 states MSM6295Scan(0, nAction); MSM6295Scan(1, nAction); SCAN_VAR(nVideoIRQ); SCAN_VAR(nSoundIRQ); SCAN_VAR(nUnknownIRQ); SCAN_VAR(bVBlank); CaveScanGraphics(); SCAN_VAR(DrvInput); } return 0; }
static INT32 DrvScan(INT32 nAction, INT32 *pnMin) { struct BurnArea ba; if (pnMin) { // Return minimum compatible version *pnMin = 0x020902; } EEPROMScan(nAction, pnMin); // Scan EEPROM if (nAction & ACB_VOLATILE) { // Scan volatile ram memset(&ba, 0, sizeof(ba)); ba.Data = RamStart; ba.nLen = RamEnd - RamStart; ba.szName = "RAM"; BurnAcb(&ba); SekScan(nAction); // scan 68000 states YMZ280BScan(); SCAN_VAR(nVideoIRQ); SCAN_VAR(nSoundIRQ); SCAN_VAR(nUnknownIRQ); SCAN_VAR(bVBlank); SCAN_VAR(korokoro_hopper); CaveScanGraphics(); } return 0; }
// Scan RAM static int SupermanScan(int nAction,int *pnMin) { struct BurnArea ba; if (pnMin) { // Return minimum compatible version *pnMin = 0x029521; } if (nAction & ACB_VOLATILE) { // Scan volatile ram memset(&ba, 0, sizeof(ba)); ba.Data = RamStart; ba.nLen = RamEnd-RamStart; ba.szName = "All Ram"; BurnAcb(&ba); } if (nAction & ACB_DRIVER_DATA) { SekScan(nAction); // Scan 68000 ZetScan(nAction); // Scan Z80 BurnYM2610Scan(nAction, pnMin); // Scan critical driver variables SCAN_VAR(SupermanInput); SCAN_VAR(SupermanDip); SCAN_VAR(Z80Bank); SCAN_VAR(nCurrentBank); SCAN_VAR(nCycles68KSync); } return 0; }
static INT32 DrvScan(INT32 nAction, INT32* pnMin) { struct BurnArea ba; if (pnMin != NULL) { *pnMin = 0x029707; } if (nAction & ACB_VOLATILE) { memset(&ba, 0, sizeof(ba)); ba.Data = AllRam; ba.nLen = RamEnd - AllRam; ba.szName = "RAM"; BurnAcb(&ba); SekScan(nAction); ZetScan(nAction); BurnYM3812Scan(nAction, pnMin); SCAN_VAR(nCyclesDone); SCAN_VAR(demonwld_hack); } return 0; }
void K053247Scan(INT32 nAction) { struct BurnArea ba; if (nAction & ACB_MEMORY_RAM) { memset(&ba, 0, sizeof(ba)); ba.Data = K053247Ram; ba.nLen = 0x1000; ba.szName = "K053247 Ram"; BurnAcb(&ba); ba.Data = K053247Regs; ba.nLen = 0x0010 * sizeof(UINT16); ba.szName = "K053247 Regs"; BurnAcb(&ba); ba.Data = K053246Regs; ba.nLen = 0x0008; ba.szName = "K053246 Regs"; BurnAcb(&ba); SCAN_VAR(K053246_OBJCHA_line); SCAN_VAR(K053247_wraparound); } }
int PcmScan() { SCAN_VAR(Reg); SCAN_VAR(ChanPos); SCAN_VAR(ChanBank); return 0; }
int konamiCpuScan(int nAction) { #if defined FBA_DEBUG if (!DebugCPU_KonamiInitted) bprintf(PRINT_ERROR, _T("konamiCpuScan called without init\n")); #endif struct BurnArea ba; int (*irq_callback)(int irqline); void (*setlines_callback)( int lines ); irq_callback = konami.irq_callback; setlines_callback = konami.setlines_callback; if (nAction & ACB_DRIVER_DATA) { memset(&ba, 0, sizeof(ba)); ba.Data = (unsigned char*)&konami; ba.nLen = sizeof(konami_Regs); ba.szName = "All Registers"; BurnAcb(&ba); SCAN_VAR(ea.w.l); SCAN_VAR(ea.d); } konami.irq_callback = irq_callback; konami.setlines_callback = setlines_callback; return 0; }
// Scan ram static INT32 DrvScan(INT32 nAction, INT32* pnMin) { struct BurnArea ba; if (pnMin != NULL) { // Return minimum compatible version *pnMin = 0x029402; } if (nAction & ACB_VOLATILE) { // Scan volatile ram memset(&ba, 0, sizeof(ba)); ba.Data = RamStart; ba.nLen = RamEnd - RamStart; ba.szName = "RAM"; BurnAcb(&ba); SekScan(nAction); // scan 68000 states ZetScan(nAction); // Scan Z80 BurnYM3812Scan(nAction, pnMin); SCAN_VAR(DrvInput); SCAN_VAR(nCyclesDone); } return 0; }
int QsndScan(int nAction) { SCAN_VAR(nZExtra) // scan extra cycles SCAN_VAR(nIrqNext) // scan next irq time QsndZScan(nAction); // Scan Z80 QscScan(nAction); // Scan QSound Chip return 0; }
void BurnGunScan() { #if defined FBA_DEBUG if (!Debug_BurnGunInitted) bprintf(PRINT_ERROR, _T("BurnGunScan called without init\n")); #endif SCAN_VAR(BurnGunX); SCAN_VAR(BurnGunY); }
int PsndScan(int nAction) { if (nAction & ACB_DRIVER_DATA) { SCAN_VAR(nCyclesDone); SCAN_VAR(nSyncNext); PsndZScan(nAction); // Scan Z80 SCAN_VAR(PsndCode); SCAN_VAR(PsndFade); // Scan sound info } return 0; }
static INT32 svg_asic27aScan(INT32 nAction,INT32 *) { struct BurnArea ba; if (nAction & ACB_MEMORY_RAM) { ba.Data = PGMARMShareRAM; ba.nLen = 0x0020000; ba.nAddress = 0x400000; ba.szName = "ARM SHARE RAM #0 (address 500000)"; BurnAcb(&ba); ba.Data = PGMARMShareRAM2; ba.nLen = 0x0020000; ba.nAddress = 0x500000; ba.szName = "ARM SHARE RAM #1"; BurnAcb(&ba); ba.Data = PGMARMRAM0; ba.nLen = 0x0000400; ba.nAddress = 0; ba.szName = "ARM RAM 0"; BurnAcb(&ba); ba.Data = PGMARMRAM1; ba.nLen = 0x0040000; ba.nAddress = 0; ba.szName = "ARM RAM 1"; BurnAcb(&ba); ba.Data = PGMARMRAM2; ba.nLen = 0x0000400; ba.nAddress = 0; ba.szName = "ARM RAM 2"; BurnAcb(&ba); } if (nAction & ACB_DRIVER_DATA) { Arm7Scan(nAction); SCAN_VAR(asic27a_68k_to_arm); SCAN_VAR(asic27a_arm_to_68k); SCAN_VAR(svg_ram_sel); } if (nAction & ACB_WRITE) { SekOpen(0); svg_set_ram_bank(svg_ram_sel); SekClose(); } return 0; }
void BurnTimerScan(int nAction, int* pnMin) { if (pnMin && *pnMin < 0x029521) *pnMin = 0x029521; if (nAction & ACB_DRIVER_DATA) { SCAN_VAR(nTimerCount); SCAN_VAR(nTimerStart); SCAN_VAR(dTime); SCAN_VAR(nTicksDone); } }
INT32 v3021Scan() { #if defined FBA_DEBUG if (!DebugDev_V3021Initted) bprintf(PRINT_ERROR, _T("v3021Scan called without init\n")); #endif SCAN_VAR(CalVal); SCAN_VAR(CalMask); SCAN_VAR(CalCom); SCAN_VAR(CalCnt); return 0; }
void BurnYM2610Scan(INT32 nAction, INT32* pnMin) { #if defined FBA_DEBUG if (!DebugSnd_YM2610Initted) bprintf(PRINT_ERROR, _T("BurnYM2610Scan called without init\n")); #endif BurnTimerScan(nAction, pnMin); AY8910Scan(nAction, pnMin); if (nAction & ACB_DRIVER_DATA) { SCAN_VAR(nYM2610Position); SCAN_VAR(nAY8910Position); } }
// Scan the current QSound z80 state int QsndZScan(int nAction) { ZetScan(nAction); // Scan Z80 if (nAcbVersion > GGPOFBA_VERSION_0_25) { SCAN_VAR(QscCmd); } SCAN_VAR(nQsndZBank); if (nAction & ACB_WRITE) { // If write, bank could have changed QsndZBankMap(); } return 0; }
void BurnTimerScanYM3812(INT32 nAction, INT32* pnMin) { if (pnMin && *pnMin < 0x029521) { *pnMin = 0x029521; } if (nAction & ACB_DRIVER_DATA) { SCAN_VAR(nTimerCount); SCAN_VAR(nTimerStart); SCAN_VAR(dTimeYM3812); SCAN_VAR(nTicksDone); } }
void TaitoICScan(int nAction) { if (TaitoIC_SupermanCChipInUse) SupermanCChipScan(nAction); if (TaitoIC_MegabCChipInUse) MegabCChipScan(nAction); if (TaitoIC_RainbowCChipInUse) RainbowCChipScan(nAction); if (TaitoIC_OpwolfCChipInUse) OpwolfCChipScan(nAction); if (TaitoIC_VolfiedCChipInUse) VolfiedCChipScan(nAction); if (TaitoIC_PC080SNInUse) PC080SNScan(nAction); if (TaitoIC_PC090OJInUse) PC090OJScan(nAction); if (TaitoIC_TC0100SCNInUse) TC0100SCNScan(nAction); if (TaitoIC_TC0110PCRInUse) TC0110PCRScan(nAction); if (TaitoIC_TC0140SYTInUse) TC0140SYTScan(nAction); if (TaitoIC_TC0150RODInUse) TC0150RODScan(nAction); if (TaitoIC_TC0180VCUInUse) TC0180VCUScan(nAction); if (TaitoIC_TC0220IOCInUse) TC0220IOCScan(nAction); if (TaitoIC_TC0280GRDInUse) TC0280GRDScan(nAction); if (TaitoIC_TC0360PRIInUse) TC0360PRIScan(nAction); if (TaitoIC_TC0430GRWInUse) TC0430GRWScan(nAction); if (TaitoIC_TC0480SCPInUse) TC0480SCPScan(nAction); if (TaitoIC_TC0510NIOInUse) TC0510NIOScan(nAction); if (TaitoIC_TC0640FIOInUse) TC0640FIOScan(nAction); if (nAction & ACB_DRIVER_DATA) { SCAN_VAR(TaitoWatchdog); } }
// Scan ram static INT32 DrvScan(INT32 nAction, INT32* pnMin) { struct BurnArea ba; if (pnMin) { // Return minimum compatible version *pnMin = 0x029497; } if (nAction & ACB_VOLATILE) { // Scan volatile ram memset(&ba, 0, sizeof(ba)); ba.Data = RamStart; ba.nLen = RamEnd-RamStart; ba.szName = "All Ram"; BurnAcb(&ba); SekScan(nAction); // scan 68000 states ZetScan(nAction); // Scan Z80 MSM6295Scan(0, nAction); BurnYM2151Scan(nAction); ToaScanGP9001(nAction, pnMin); SCAN_VAR(DrvInput); } return 0; }
// Scan ram static INT32 DrvScan(INT32 nAction,INT32 *pnMin) { struct BurnArea ba; if (pnMin) { // Return minimum compatible version *pnMin = 0x020997; } if (nAction & ACB_VOLATILE) { // Scan volatile ram memset(&ba, 0, sizeof(ba)); ba.Data = RamStart; ba.nLen = RamEnd-RamStart; ba.szName = "All Ram"; BurnAcb(&ba); SekScan(nAction); // scan 68000 states MSM6295Scan(0, nAction); MSM6295Scan(1, nAction); ToaScanGP9001(nAction, pnMin); SCAN_VAR(nPreviousOkiBank); } if (nAction & ACB_WRITE) { INT32 nBank = nPreviousOkiBank; nPreviousOkiBank = -1; oki_set_bank(nBank); } return 0; }
static int DrvScan(int nAction, int *pnMin) { struct BurnArea ba; if (pnMin != NULL) { *pnMin = 0x029707; } if (nAction & ACB_MEMORY_RAM) { ba.Data = AllRam; ba.nLen = RamEnd - AllRam; ba.nAddress = 0; ba.szName = "All RAM"; BurnAcb(&ba); } if (nAction & ACB_DRIVER_DATA) { Sh2Scan(nAction); BurnYMF278BScan(nAction, pnMin); SCAN_VAR(sample_offs); } if (nAction & ACB_WRITE) { previous_graphics_bank = -1; graphics_bank(); } return 0; }
// Scan ram static INT32 drvScan(INT32 nAction, INT32* pnMin) { struct BurnArea ba; if (pnMin) { // Return minimum compatible version *pnMin = 0x029496; } if (nAction & ACB_VOLATILE) { // Scan volatile ram memset(&ba, 0, sizeof(ba)); ba.Data = RamStart; ba.nLen = RamEnd - RamStart; ba.szName = "RAM"; BurnAcb(&ba); SekScan(nAction); // Scan 68000 ZetScan(nAction); // Scan Z80 SCAN_VAR(nCurrentBank); MSM6295Scan(0, nAction); MSM6295Scan(1, nAction); BurnYM2151Scan(nAction); ToaScanGP9001(nAction, pnMin); SCAN_VAR(nIRQPending); SCAN_VAR(nTextROMStatus); SCAN_VAR(drvInput); if (nAction & ACB_WRITE) { INT32 n = nTextROMStatus; nTextROMStatus = -1; SekOpen(0); Map68KTextROM(n); SekClose(); n = nCurrentBank; nCurrentBank = -1; ZetOpen(0); drvZ80Bankswitch(n); ZetClose(); } } return 0; }
void BurnYM2612Scan(int nAction, int* pnMin) { BurnTimerScan(nAction, pnMin); if (nAction & ACB_DRIVER_DATA) { SCAN_VAR(nYM2612Position); } }
INT32 Sf2mdtScanSound(INT32 nAction, INT32 *pnMin) { if (nAction & ACB_MEMORY_RAM) { struct BurnArea ba; memset(&ba, 0, sizeof(ba)); ba.Data = Sf2mdtZ80Ram; ba.nLen = 0x00800; ba.szName = "Sf2mdtZ80Ram"; BurnAcb(&ba); } if (nAction & ACB_DRIVER_DATA) { ZetScan(nAction); BurnYM2151Scan(nAction); MSM5205Scan(nAction, pnMin); SCAN_VAR(Sf2mdtZ80BankAddress); SCAN_VAR(Sf2mdtSoundLatch); SCAN_VAR(Sf2mdtSampleBuffer1); SCAN_VAR(Sf2mdtSampleBuffer2); SCAN_VAR(Sf2mdtSampleSelect1); SCAN_VAR(Sf2mdtSampleSelect2); SCAN_VAR(Sf2mdtSoundPos); } return 0; }
void BurnYM2151Scan(INT32 nAction) { #if defined FBA_DEBUG if (!DebugSnd_YM2151Initted) bprintf(PRINT_ERROR, _T("BurnYM2151Scan called without init\n")); #endif if ((nAction & ACB_DRIVER_DATA) == 0) { return; } SCAN_VAR(nBurnCurrentYM2151Register); SCAN_VAR(BurnYM2151Registers); if (nAction & ACB_WRITE) { for (INT32 i = 0; i < 0x0100; i++) { YM2151WriteReg(0, i, BurnYM2151Registers[i]); } } }
int MSM6295Scan(int nChip, int /*nAction*/) { int nSampleSize = MSM6295[nChip].nSampleSize; SCAN_VAR(MSM6295[nChip]); MSM6295[nChip].nSampleSize = nSampleSize; SCAN_VAR(nMSM6295Status[nChip]); for (int i = 0; i < 4; i++) { MSM6295SampleInfo[nChip][i] -= (unsigned int)MSM6295ROM; SCAN_VAR(MSM6295SampleInfo[nChip][i]); MSM6295SampleInfo[nChip][i] += (unsigned int)MSM6295ROM; MSM6295SampleData[nChip][i] -= (unsigned int)MSM6295ROM; SCAN_VAR(MSM6295SampleData[nChip][i]); MSM6295SampleData[nChip][i] += (unsigned int)MSM6295ROM; } return 0; }
// Scan the current QSound z80 state int QsndZScan(int nAction) { ZetScan(nAction); // Scan Z80 SCAN_VAR(nQsndZBank); if (nAction & ACB_WRITE) { // If write, bank could have changed QsndZBankMap(); } return 0; }
int QsndScan(int nAction) { if (nAction & ACB_DRIVER_DATA) { BurnTimerScan(nAction, NULL); QsndZScan(nAction); // Scan Z80 QscScan(nAction); // Scan QSound Chip SCAN_VAR(nQsndCyclesExtra); } return 0; }