diff --git a/src/burn/drv/pre90s/d_dkong.cpp b/src/burn/drv/pre90s/d_dkong.cpp index dbdb15361e..e71cc4c6ca 100644 --- a/src/burn/drv/pre90s/d_dkong.cpp +++ b/src/burn/drv/pre90s/d_dkong.cpp @@ -2003,6 +2003,7 @@ static INT32 Dkong3Init() nesapuInit(0, 1789773, 0, dkong3_nesapu_sync, 0); nesapuSetAllRoutes(0, 0.95, BURN_SND_ROUTE_BOTH); + nesapuSetArcade(1); nesapuInit(1, 1789773, 0, dkong3_nesapu_sync, 1); nesapuSetAllRoutes(1, 0.95, BURN_SND_ROUTE_BOTH); diff --git a/src/burn/drv/pre90s/d_punchout.cpp b/src/burn/drv/pre90s/d_punchout.cpp index c44757b65d..258b316ef2 100644 --- a/src/burn/drv/pre90s/d_punchout.cpp +++ b/src/burn/drv/pre90s/d_punchout.cpp @@ -47,6 +47,8 @@ static UINT8 DrvInputs[2]; static UINT8 DrvDips[2]; static UINT8 DrvReset; +static INT32 nExtraCycles; + static struct BurnInputInfo PunchoutInputList[] = { {"P1 Coin", BIT_DIGITAL, DrvJoy2 + 7, "p1 coin" }, {"P1 Up", BIT_DIGITAL, DrvJoy2 + 2, "p1 up" }, @@ -506,9 +508,12 @@ static INT32 DrvDoReset() M6502Close(); vlm5030Reset(0); + nesapuReset(); spunchout_prot_mode = 0; + nExtraCycles = 0; + HiscoreReset(); return 0; @@ -675,10 +680,11 @@ static INT32 CommonInit(INT32 (*pInitCallback)(), INT32 punchout, INT32 reverse_ M6502Close(); vlm5030Init(0, 3580000, punchout_vlm_sync, DrvVLMROM, 0x4000, 1); - vlm5030SetAllRoutes(0, 0.50, BURN_SND_ROUTE_BOTH); + vlm5030SetAllRoutes(0, 0.70, BURN_SND_ROUTE_BOTH); nesapuInit(0, 1789773, 0, punchout_nesapu_sync, 0); - nesapuSetAllRoutes(0, 0.50, BURN_SND_ROUTE_BOTH); + nesapuSetAllRoutes(0, 0.70, BURN_SND_ROUTE_BOTH); + nesapuSetArcade(1); GenericTilesInit(); @@ -1050,9 +1056,9 @@ static INT32 DrvFrame() } } - INT32 nInterleave = 10; + INT32 nInterleave = 32; INT32 nCyclesTotal[2] = { 4000000 / 60, 1789773 / 60 }; - INT32 nCyclesDone[2] = { 0, 0 }; + INT32 nCyclesDone[2] = { nExtraCycles, 0 }; ZetNewFrame(); M6502NewFrame(); @@ -1063,19 +1069,20 @@ static INT32 DrvFrame() for (INT32 i = 0; i < nInterleave; i++) { CPU_RUN(0, Zet); + if (i == (nInterleave - 1) && *interrupt_enable) ZetNmi(); + CPU_RUN(1, M6502); + if (i == (nInterleave - 1)) M6502SetIRQLine(M6502_INPUT_LINE_NMI, CPU_IRQSTATUS_AUTO); } - if (*interrupt_enable) ZetNmi(); - - M6502SetIRQLine(M6502_INPUT_LINE_NMI, CPU_IRQSTATUS_AUTO); - nesapuUpdate(0, pBurnSoundOut, nBurnSoundLen); vlm5030Update(0, pBurnSoundOut, nBurnSoundLen); M6502Close(); ZetClose(); + nExtraCycles = nCyclesDone[0] - nCyclesTotal[0]; + if (pBurnDraw) { BurnDrvRedraw(); } @@ -1105,6 +1112,8 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin) nesapuScan(nAction, pnMin); SCAN_VAR(spunchout_prot_mode); + + SCAN_VAR(nExtraCycles); } if (nAction & ACB_NVRAM) { diff --git a/src/burn/snd/nes_apu.cpp b/src/burn/snd/nes_apu.cpp index 5fe0ef8c80..52618dda56 100644 --- a/src/burn/snd/nes_apu.cpp +++ b/src/burn/snd/nes_apu.cpp @@ -1111,6 +1111,8 @@ void nesapuExit() BurnFree(nes_ext_buffer); nes_ext_sound_cb = NULL; + nesapuSetArcade(0); + DebugSnd_NESAPUSndInitted = 0; }