Make a few things more standardized -- xxxxWriteByteHandler -> xxxxWriteHandler, xxxxReadByteHandler -> xxxxReadHandler (for 8-bit cpus), xxxxSetIRQ -> xxxxSetIRQLine

This commit is contained in:
iq_132 2012-06-21 14:41:49 +00:00
parent c089d4e99e
commit df57a34520
37 changed files with 316 additions and 316 deletions

View File

@ -241,7 +241,7 @@ void actfan_main_write(UINT32 address, UINT8 data)
case 0x150000:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
case 0x160000:
@ -291,7 +291,7 @@ void triothep_main_write(UINT32 address, UINT8 data)
{
case 0x100000:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
case 0x110000:
@ -369,7 +369,7 @@ static UINT8 Dec0_sound_read(UINT16 address)
switch (address)
{
case 0x3000:
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_NONE);
return *soundlatch;
case 0x3800:
@ -392,9 +392,9 @@ inline static double Dec0YM2203GetTime()
static void Dec0YM3812IRQHandler(INT32, INT32 nStatus)
{
if (nStatus) {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
} else {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
}
}
@ -504,8 +504,8 @@ static void Dec0SoundInit()
M6502Open(0);
M6502MapMemory(Drv6502RAM, 0x0000, 0x07ff, M6502_RAM);
M6502MapMemory(Drv6502ROM + 0x4000, 0x4000, 0xffff, M6502_ROM);
M6502SetWriteByteHandler(Dec0_sound_write);
M6502SetReadByteHandler(Dec0_sound_read);
M6502SetWriteHandler(Dec0_sound_write);
M6502SetReadHandler(Dec0_sound_read);
M6502Close();
BurnYM2203Init(1, 1500000, NULL, Dec0YM2203SynchroniseStream, Dec0YM2203GetTime, 0);

View File

@ -1914,7 +1914,7 @@ void __fastcall Dec068KWriteByte(UINT32 a, UINT8 d)
case 0x30c015: {
DrvSoundLatch = d;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
}
@ -2097,7 +2097,7 @@ void __fastcall Dec068KWriteWord(UINT32 a, UINT16 d)
case 0x30c014: {
DrvSoundLatch = d & 0xff;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
}
@ -3100,9 +3100,9 @@ inline static double Dec0YM2203GetTime()
static void Dec0YM3812IRQHandler(INT32, INT32 nStatus)
{
if (nStatus) {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
} else {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
}
}
@ -3164,8 +3164,8 @@ static INT32 Dec0MachineInit()
M6502Open(0);
M6502MapMemory(DrvM6502Ram , 0x0000, 0x05ff, M6502_RAM);
M6502MapMemory(DrvM6502Rom , 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(Dec0SoundReadByte);
M6502SetWriteByteHandler(Dec0SoundWriteByte);
M6502SetReadHandler(Dec0SoundReadByte);
M6502SetWriteHandler(Dec0SoundWriteByte);
M6502Close();
GenericTilesInit();

View File

@ -967,7 +967,7 @@ void ghostb_main_write(UINT16 address, UINT8 data)
{
case 0x3800:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
case 0x3840:
@ -1104,9 +1104,9 @@ inline static INT32 CsilverMSM5205SynchroniseStream(INT32 nSoundRate)
static void DrvYM3812FMIRQHandler(INT32, INT32 nStatus)
{
if (nStatus) {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
} else {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
}
}
@ -1326,8 +1326,8 @@ static INT32 DrvInit()
HD6309MapMemory(DrvSprRAM, 0x3000, 0x37ff, HD6309_RAM);
HD6309MapMemory(DrvMainROM + 0x10000, 0x4000, 0x7fff, HD6309_ROM); // bank
HD6309MapMemory(DrvMainROM + 0x08000, 0x8000, 0xffff, HD6309_ROM);
HD6309SetWriteByteHandler(ghostb_main_write);
HD6309SetReadByteHandler(ghostb_main_read);
HD6309SetWriteHandler(ghostb_main_write);
HD6309SetReadHandler(ghostb_main_read);
HD6309Close();
M6502Init(0, TYPE_M6502);
@ -1335,8 +1335,8 @@ static INT32 DrvInit()
M6502MapMemory(DrvM6502RAM, 0x0000, 0x05ff, M6502_RAM);
M6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_READ);
M6502MapMemory(DrvM6502OPS + 0x8000, 0x8000, 0xffff, M6502_FETCH);
M6502SetReadByteHandler(ghostb_sound_read);
M6502SetWriteByteHandler(ghostb_sound_write);
M6502SetReadHandler(ghostb_sound_read);
M6502SetWriteHandler(ghostb_sound_write);
M6502Close();
BurnSetRefreshRate(58.00);
@ -1602,7 +1602,7 @@ static INT32 DrvDraw()
static inline void do_interrupt()
{
if (*interrupt_enable) {
HD6309SetIRQ(0, HD6309_IRQSTATUS_AUTO);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_AUTO);
}
}
@ -1621,7 +1621,7 @@ static void ghostb_interrupt()
if (((i8751_out & 0x2) != 0x2) && latch[2]) {latch[2] = 0; do_interrupt(); i8751_return = 0x2001; } /* Player 3 coin */
if (((i8751_out & 0x1) != 0x1) && latch[3]) {latch[3] = 0; do_interrupt(); i8751_return = 0x1001; } /* Service */
if (*nmi_enable) HD6309SetIRQ(0x20, HD6309_IRQSTATUS_AUTO);
if (*nmi_enable) HD6309SetIRQLine(0x20, HD6309_IRQSTATUS_AUTO);
}
static INT32 DrvFrame()
@ -1943,7 +1943,7 @@ void cobra_main_write(UINT16 address, UINT8 data)
{
case 0x3e00:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502Run(500);
return;
@ -2125,8 +2125,8 @@ static INT32 CobraInit()
M6809MapMemory(DrvPalRAM, 0x3000, 0x37ff, M6809_RAM);
M6809MapMemory(DrvMainROM + 0x10000, 0x4000, 0x7fff, M6809_ROM);
M6809MapMemory(DrvMainROM + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(cobra_main_write);
M6809SetReadByteHandler(cobra_main_read);
M6809SetWriteHandler(cobra_main_write);
M6809SetReadHandler(cobra_main_read);
M6809Close();
M6502Init(0, TYPE_M6502);
@ -2135,8 +2135,8 @@ static INT32 CobraInit()
// m6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_READ);
// m6502MapMemory(DrvM6502OPS + 0x8000, 0x8000, 0xffff, M6502_FETCH);
M6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(ghostb_sound_read);
M6502SetWriteByteHandler(ghostb_sound_write);
M6502SetReadHandler(ghostb_sound_read);
M6502SetWriteHandler(ghostb_sound_write);
M6502Close();
BurnSetRefreshRate(58.00);
@ -2319,7 +2319,7 @@ static INT32 CobraFrame()
if (i == 1) vblank = 0x80;
if (i == 31) {
vblank = 0;
M6809SetIRQ(0x20 /*NMI*/, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0x20 /*NMI*/, M6809_IRQSTATUS_AUTO);
}
BurnTimerUpdate(i * (nCyclesTotal[0] / nInterleave));
@ -2596,7 +2596,7 @@ void srdarwin_main_write(UINT16 address, UINT8 data)
case 0x2000:
*soundlatch = data;
// m6502SetIRQ(M6502_NMI);
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
case 0x2001:
@ -2721,8 +2721,8 @@ static INT32 SrdarwinInit()
M6809MapMemory(DrvPalRAM + 0x100, 0x3000, 0x30ff, M6809_RAM);
M6809MapMemory(DrvMainROM + 0x10000, 0x4000, 0x7fff, M6809_ROM);
M6809MapMemory(DrvMainROM + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(srdarwin_main_write);
M6809SetReadByteHandler(srdarwin_main_read);
M6809SetWriteHandler(srdarwin_main_write);
M6809SetReadHandler(srdarwin_main_read);
M6809Close();
M6502Init(0, TYPE_M6502);
@ -2730,8 +2730,8 @@ static INT32 SrdarwinInit()
M6502MapMemory(DrvM6502RAM, 0x0000, 0x05ff, M6502_RAM);
M6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_READ);
M6502MapMemory(DrvM6502OPS + 0x8000, 0x8000, 0xffff, M6502_FETCH);
M6502SetReadByteHandler(ghostb_sound_read);
M6502SetWriteByteHandler(ghostb_sound_write);
M6502SetReadHandler(ghostb_sound_read);
M6502SetWriteHandler(ghostb_sound_write);
M6502Close();
BurnSetRefreshRate(58.00);
@ -2950,7 +2950,7 @@ static INT32 SrdarwinFrame()
if (i == 1) vblank = 0x40;
if (i == 31) {
vblank = 0;
M6809SetIRQ(0x20 /*NMI*/, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0x20 /*NMI*/, M6809_IRQSTATUS_AUTO);
}
BurnTimerUpdate(i * (nCyclesTotal[0] / nInterleave));
@ -3068,7 +3068,7 @@ static void gondo_i8751_write(INT32 offset, UINT8 data)
{
case 0:
i8751_value = (i8751_value & 0xff) | (data << 8);
if (*interrupt_enable) HD6309SetIRQ(0, HD6309_IRQSTATUS_AUTO);
if (*interrupt_enable) HD6309SetIRQLine(0, HD6309_IRQSTATUS_AUTO);
break;
case 1:
@ -3130,7 +3130,7 @@ void gondo_main_write(UINT16 address, UINT8 data)
{
case 0x3810:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
case 0x3818:
@ -3406,11 +3406,11 @@ static INT32 GondoInit()
HD6309MapMemory(DrvSprRAM, 0x3000, 0x37ff, HD6309_RAM);
HD6309MapMemory(DrvMainROM + 0x10000, 0x4000, 0x7fff, HD6309_ROM); // bank
HD6309MapMemory(DrvMainROM + 0x08000, 0x8000, 0xffff, HD6309_ROM);
HD6309SetWriteByteHandler(gondo_main_write);
HD6309SetWriteHandler(gondo_main_write);
if (!strcmp(BurnDrvGetTextA(DRV_NAME), "garyoret")) {
HD6309SetReadByteHandler(garyoret_main_read);
HD6309SetReadHandler(garyoret_main_read);
} else {
HD6309SetReadByteHandler(gondo_main_read);
HD6309SetReadHandler(gondo_main_read);
}
HD6309Close();
@ -3418,8 +3418,8 @@ static INT32 GondoInit()
M6502Open(0);
M6502MapMemory(DrvM6502RAM, 0x0000, 0x05ff, M6502_RAM);
M6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(ghostb_sound_read);
M6502SetWriteByteHandler(gondo_sound_write);
M6502SetReadHandler(ghostb_sound_read);
M6502SetWriteHandler(gondo_sound_write);
M6502Close();
BurnSetRefreshRate(58.00);
@ -3607,7 +3607,7 @@ static INT32 GondoFrame()
if (i == 1) vblank = 0;
if (i == 31) {
vblank = 0x80;
if (*nmi_enable) HD6309SetIRQ(0x20, HD6309_IRQSTATUS_AUTO);
if (*nmi_enable) HD6309SetIRQLine(0x20, HD6309_IRQSTATUS_AUTO);
}
BurnTimerUpdate(i * (nCyclesTotal[0] / nInterleave));
@ -3844,29 +3844,29 @@ void oscar_main_write(UINT16 address, UINT8 data)
case 0x3d80:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
case 0x3e80:
HD6309Close();
HD6309Open(1);
HD6309SetIRQ(0, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_ACK);
HD6309Close();
HD6309Open(0);
return;
case 0x3e81:
HD6309SetIRQ(0, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_NONE);
return;
case 0x3e82:
HD6309SetIRQ(0, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_ACK);
return;
case 0x3e83:
HD6309Close();
HD6309Open(1);
HD6309SetIRQ(0, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_NONE);
HD6309Close();
HD6309Open(0);
return;
@ -3884,7 +3884,7 @@ void oscar_sub_write(UINT16 address, UINT8 )
switch (address)
{
case 0x3e80:
HD6309SetIRQ(0, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_ACK);
HD6309Close();
HD6309Open(0);
return;
@ -3892,7 +3892,7 @@ void oscar_sub_write(UINT16 address, UINT8 )
case 0x3e81:
HD6309Close();
HD6309Open(0);
HD6309SetIRQ(0, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_NONE);
HD6309Close();
HD6309Open(1);
return;
@ -3900,13 +3900,13 @@ void oscar_sub_write(UINT16 address, UINT8 )
case 0x3e82:
HD6309Close();
HD6309Open(0);
HD6309SetIRQ(0, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_ACK);
HD6309Close();
HD6309Open(1);
return;
case 0x3e83:
HD6309SetIRQ(0, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(0, HD6309_IRQSTATUS_NONE);
return;
}
}
@ -4010,8 +4010,8 @@ static INT32 OscarInit()
HD6309MapMemory(DrvPalRAM, 0x3800, 0x3bff, HD6309_RAM); // xxxxBBBBGGGGRRRR_be_w
HD6309MapMemory(DrvMainROM + 0x10000, 0x4000, 0x7fff, HD6309_ROM); // bank
HD6309MapMemory(DrvMainROM + 0x08000, 0x8000, 0xffff, HD6309_ROM);
HD6309SetWriteByteHandler(oscar_main_write);
HD6309SetReadByteHandler(oscar_main_read);
HD6309SetWriteHandler(oscar_main_write);
HD6309SetReadHandler(oscar_main_read);
HD6309Close();
HD6309Open(1);
@ -4019,7 +4019,7 @@ static INT32 OscarInit()
HD6309MapMemory(DrvPalRAM + 0x400, 0x0f00, 0x0fff, HD6309_RAM); // not really pal...
HD6309MapMemory(DrvMainRAM + 0x1000, 0x1000, 0x1fff, HD6309_RAM); // all shared? AM_RANGE(0x0f00, 0x0fff) AM_RAM not?
HD6309MapMemory(DrvSubROM + 0x04000, 0x4000, 0xffff, HD6309_ROM);
HD6309SetWriteByteHandler(oscar_sub_write); // 0x3e80, 0x3e83 used...
HD6309SetWriteHandler(oscar_sub_write); // 0x3e80, 0x3e83 used...
HD6309Close();
M6502Init(0, TYPE_M6502);
@ -4027,8 +4027,8 @@ static INT32 OscarInit()
M6502MapMemory(DrvM6502RAM, 0x0000, 0x05ff, M6502_RAM);
M6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_READ);
M6502MapMemory(DrvM6502OPS + 0x8000, 0x8000, 0xffff, M6502_FETCH);
M6502SetReadByteHandler(ghostb_sound_read);
M6502SetWriteByteHandler(gondo_sound_write);
M6502SetReadHandler(ghostb_sound_read);
M6502SetWriteHandler(gondo_sound_write);
M6502Close();
BurnSetRefreshRate(58.00);
@ -4137,7 +4137,7 @@ static INT32 OscarFrame()
if ((DrvInputs[2] & 7) == 7) latch = 1;
if ((DrvInputs[2] & 7) != 7 && latch) {
latch = 0;
HD6309SetIRQ(0x20, HD6309_IRQSTATUS_AUTO);
HD6309SetIRQLine(0x20, HD6309_IRQSTATUS_AUTO);
}
vblank = 0x80;
}
@ -4348,7 +4348,7 @@ static void lastmiss_i8751_write(INT32 offset, INT32 data)
{
case 0:
i8751_value = (i8751_value & 0xff) | (data << 8);
M6809SetIRQ(1, M6809_IRQSTATUS_AUTO); /* Signal main cpu */
M6809SetIRQLine(1, M6809_IRQSTATUS_AUTO); /* Signal main cpu */
break;
case 1:
@ -4382,7 +4382,7 @@ static void shackled_i8751_write(INT32 offset, INT32 data)
{
case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8);
M6809SetIRQ(1, M6809_IRQSTATUS_AUTO); /* Signal main cpu */
M6809SetIRQLine(1, M6809_IRQSTATUS_AUTO); /* Signal main cpu */
break;
case 1: /* Low byte */
i8751_value = (i8751_value & 0xff00) | data;
@ -4412,11 +4412,11 @@ void lastmiss_main_write(UINT16 address, UINT8 data)
{
case 0x1803:
if (M6809GetActive() == 0) { // main
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
} else {
M6809Close();
M6809Open(0);
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
M6809Close();
M6809Open(1);
}
@ -4426,11 +4426,11 @@ void lastmiss_main_write(UINT16 address, UINT8 data)
if (M6809GetActive() == 0) { // main
M6809Close();
M6809Open(1);
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
M6809Close();
M6809Open(0);
} else {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
}
return;
@ -4444,7 +4444,7 @@ void lastmiss_main_write(UINT16 address, UINT8 data)
case 0x180c:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
// main cpu only!
@ -4660,8 +4660,8 @@ static INT32 LastmissInit()
M6809MapMemory(DrvPf0RAM, 0x3800, 0x3fff, M6809_RAM);
M6809MapMemory(DrvMainROM + 0x10000, 0x4000, 0x7fff, M6809_ROM);
M6809MapMemory(DrvMainROM + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(lastmiss_main_write);
M6809SetReadByteHandler(lastmiss_main_read);
M6809SetWriteHandler(lastmiss_main_write);
M6809SetReadHandler(lastmiss_main_read);
M6809Close();
M6809Open(1);
@ -4672,16 +4672,16 @@ static INT32 LastmissInit()
M6809MapMemory(DrvMainRAM + 0x1000, 0x3000, 0x37ff, M6809_RAM);
M6809MapMemory(DrvPf0RAM, 0x3800, 0x3fff, M6809_RAM);
M6809MapMemory(DrvSubROM + 0x04000, 0x4000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(lastmiss_main_write);
M6809SetReadByteHandler(lastmiss_main_read);
M6809SetWriteHandler(lastmiss_main_write);
M6809SetReadHandler(lastmiss_main_read);
M6809Close();
M6502Init(0, TYPE_M6502);
M6502Open(0);
M6502MapMemory(DrvM6502RAM, 0x0000, 0x05ff, M6502_RAM);
M6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(ghostb_sound_read);
M6502SetWriteByteHandler(gondo_sound_write);
M6502SetReadHandler(ghostb_sound_read);
M6502SetWriteHandler(gondo_sound_write);
M6502Close();
BurnSetRefreshRate(58.00);
@ -5150,7 +5150,7 @@ static void csilver_i8751_write(INT32 offset, UINT8 data)
{
case 0: /* High byte */
i8751_value = (i8751_value & 0xff) | (data << 8);
M6809SetIRQ(1, M6809_IRQSTATUS_AUTO); /* Signal main cpu */
M6809SetIRQLine(1, M6809_IRQSTATUS_AUTO); /* Signal main cpu */
break;
case 1: /* Low byte */
i8751_value = (i8751_value & 0xff00) | data;
@ -5177,11 +5177,11 @@ void csilver_main_write(UINT16 address, UINT8 data)
{
case 0x1803:
if (M6809GetActive() == 0) { // main
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
} else {
M6809Close();
M6809Open(0);
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
M6809Close();
M6809Open(1);
}
@ -5191,11 +5191,11 @@ void csilver_main_write(UINT16 address, UINT8 data)
if (M6809GetActive() == 0) { // main
M6809Close();
M6809Open(1);
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
M6809Close();
M6809Open(0);
} else {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
}
return;
@ -5209,7 +5209,7 @@ void csilver_main_write(UINT16 address, UINT8 data)
case 0x180c:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
case 0x1808:
@ -5309,7 +5309,7 @@ UINT8 csilver_sound_read(UINT16 address)
static void CsilverADPCMInt()
{
Toggle ^= 1;
if (Toggle) M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
if (Toggle) M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
MSM5205DataWrite(0, MSM5205Next >> 4);
MSM5205Next <<= 4;
@ -5369,8 +5369,8 @@ static INT32 CsilverInit()
M6809MapMemory(DrvPf0RAM, 0x3800, 0x3fff, M6809_RAM);
M6809MapMemory(DrvMainROM + 0x10000, 0x4000, 0x7fff, M6809_RAM);
M6809MapMemory(DrvMainROM + 0x08000, 0x8000, 0xffff, M6809_RAM);
M6809SetWriteByteHandler(csilver_main_write);
M6809SetReadByteHandler(csilver_main_read);
M6809SetWriteHandler(csilver_main_write);
M6809SetReadHandler(csilver_main_read);
M6809Close();
M6809Open(1);
@ -5381,8 +5381,8 @@ static INT32 CsilverInit()
M6809MapMemory(DrvMainRAM + 0x01000, 0x3000, 0x37ff, M6809_RAM);
M6809MapMemory(DrvPf0RAM, 0x3800, 0x3fff, M6809_RAM);
M6809MapMemory(DrvSubROM + 0x04000, 0x4000, 0xffff, M6809_RAM);
M6809SetWriteByteHandler(csilver_main_write);
M6809SetReadByteHandler(csilver_main_read);
M6809SetWriteHandler(csilver_main_write);
M6809SetReadHandler(csilver_main_read);
M6809Close();
M6502Init(0, TYPE_M6502);
@ -5390,8 +5390,8 @@ static INT32 CsilverInit()
M6502MapMemory(DrvM6502RAM, 0x0000, 0x07ff, M6502_RAM);
M6502MapMemory(DrvM6502ROM + 0x4000, 0x4000, 0x7fff, M6502_ROM);
M6502MapMemory(DrvM6502ROM + 0x8000, 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(csilver_sound_read);
M6502SetWriteByteHandler(csilver_sound_write);
M6502SetReadHandler(csilver_sound_read);
M6502SetWriteHandler(csilver_sound_write);
M6502Close();
BurnSetRefreshRate(58.00);
@ -5465,7 +5465,7 @@ static INT32 CsilverFrame()
nCyclesDone[1] += M6809Run(nSegment - nCyclesDone[1]);
if (i == DrvVBlankSlices[1]) {
vblank = 0;
M6809SetIRQ(0x20, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0x20, M6809_IRQSTATUS_AUTO);
}
MSM5205Update();
M6809Close();

View File

@ -542,7 +542,7 @@ static void karnov_control_w(INT32 offset, INT32 data)
case 2:
*soundlatch = data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
break;
case 4:
@ -679,9 +679,9 @@ UINT8 karnov_sound_read(UINT16 address)
static void DrvYM3526FMIRQHandler(INT32, INT32 nStatus)
{
if (nStatus) {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
} else {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
}
}
@ -897,8 +897,8 @@ static INT32 DrvInit()
M6502Open(0);
M6502MapMemory(Drv6502RAM, 0x0000, 0x05ff, M6502_RAM);
M6502MapMemory(Drv6502ROM + 0x8000, 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(karnov_sound_read);
M6502SetWriteByteHandler(karnov_sound_write);
M6502SetReadHandler(karnov_sound_read);
M6502SetWriteHandler(karnov_sound_write);
M6502Close();
BurnYM3526Init(3000000, &DrvYM3526FMIRQHandler, &DrvYM3526SynchroniseStream, 0);

View File

@ -188,7 +188,7 @@ static void __fastcall lemmings_main_write_word(UINT32 address, UINT16 data)
{
case 0x1a0064:
*soundlatch = data & 0xff;
M6809SetIRQ(1, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(1, M6809_IRQSTATUS_ACK);
return;
case 0x1c0000:
@ -278,7 +278,7 @@ static void lemmings_sound_write(UINT16 address, UINT8 data)
return;
case 0x1800:
M6809SetIRQ(1, M6809_IRQSTATUS_NONE);
M6809SetIRQLine(1, M6809_IRQSTATUS_NONE);
return;
}
}
@ -303,7 +303,7 @@ static UINT8 lemmings_sound_read(UINT16 address)
static void lemmingsYM2151IrqHandler(INT32 irq)
{
M6809SetIRQ(0, irq ? M6809_IRQSTATUS_ACK : M6809_IRQSTATUS_NONE);
M6809SetIRQLine(0, irq ? M6809_IRQSTATUS_ACK : M6809_IRQSTATUS_NONE);
M6809Run(1000); // fix music tempo
}
@ -451,8 +451,8 @@ static INT32 DrvInit()
M6809Open(0);
M6809MapMemory(DrvM6809RAM, 0x0000, 0x07ff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x8000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(lemmings_sound_write);
M6809SetReadByteHandler(lemmings_sound_read);
M6809SetWriteHandler(lemmings_sound_write);
M6809SetReadHandler(lemmings_sound_read);
M6809Close();
BurnYM2151Init(3580000);

View File

@ -355,7 +355,7 @@ static void SidecpcktI8751Write(UINT8 Data)
static const INT32 table_2[] = { 0x8e, 0x42, 0xad, 0x58, 0xec, 0x85, 0xdd, 0x4c, 0xad, 0x9f, 0x00, 0x4c, 0x7e, 0x42, 0xa2, 0xff };
static const INT32 table_3[] = { 0xbd, 0x73, 0x80, 0xbd, 0x73, 0xa7, 0xbd, 0x73, 0xe0, 0x7e, 0x72, 0x56, 0xff, 0xff, 0xff, 0xff };
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_AUTO);
if (InMath == 1) {
InMath=2;
@ -408,7 +408,7 @@ static void SidecpcktjI8751Write(UINT8 Data)
static const INT32 table_2[] = { 0x8e, 0x42, 0xb2, 0x58, 0xec, 0x85, 0xdd, 0x4c, 0xad, 0x9f, 0x00, 0x4c, 0x7e, 0x42, 0xa7, 0xff };
static const INT32 table_3[] = { 0xbd, 0x71, 0xc8, 0xbd, 0x71, 0xef, 0xbd, 0x72, 0x28, 0x7e, 0x70, 0x9e, 0xff, 0xff, 0xff, 0xff };
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_AUTO);
if (InMath == 1) {
InMath = 2;
@ -496,7 +496,7 @@ void SidepcktM6809WriteByte(UINT16 Address, UINT8 Data)
switch (Address) {
case 0x3004: {
DrvSoundLatch = Data;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
}
@ -573,9 +573,9 @@ inline static double DrvGetTime()
static void DrvFMIRQHandler(INT32, INT32 nStatus)
{
if (nStatus) {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
} else {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
}
}
@ -671,16 +671,16 @@ static INT32 DrvInit()
M6809MapMemory(DrvSpriteRam , 0x2000, 0x20ff, M6809_RAM);
M6809MapMemory(DrvM6809Ram + 0x1800, 0x2100, 0x24ff, M6809_RAM);
M6809MapMemory(DrvM6809Rom + 0x4000, 0x4000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(SidepcktM6809ReadByte);
M6809SetWriteByteHandler(SidepcktM6809WriteByte);
M6809SetReadHandler(SidepcktM6809ReadByte);
M6809SetWriteHandler(SidepcktM6809WriteByte);
M6809Close();
M6502Init(0, TYPE_M6502);
M6502Open(0);
M6502MapMemory(DrvM6502Ram , 0x0000, 0x0fff, M6502_RAM);
M6502MapMemory(DrvM6502Rom , 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(SidepcktSoundReadByte);
M6502SetWriteByteHandler(SidepcktSoundWriteByte);
M6502SetReadHandler(SidepcktSoundReadByte);
M6502SetWriteHandler(SidepcktSoundWriteByte);
M6502Close();
BurnYM2203Init(1, 1500000, NULL, DrvSynchroniseStream, DrvGetTime, 0);
@ -880,7 +880,7 @@ static INT32 DrvFrame()
nCurrentCPU = 0;
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;
BurnTimerUpdate(nNext);
if (i == (nInterleave - 1)) M6809SetIRQ(0x20, M6809_IRQSTATUS_AUTO);
if (i == (nInterleave - 1)) M6809SetIRQLine(0x20, M6809_IRQSTATUS_AUTO);
nCurrentCPU = 1;
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;

View File

@ -2072,7 +2072,7 @@ void __fastcall M62Z80PortWrite(UINT16 a, UINT8 d)
if ((d & 0x80) == 0) {
M62SoundLatch = d & 0x7f;
} else {
M6803SetIRQ(M6803_IRQ_LINE, M6803_IRQSTATUS_ACK);
M6803SetIRQLine(M6803_IRQ_LINE, M6803_IRQSTATUS_ACK);
}
return;
}
@ -2379,7 +2379,7 @@ void M62M6803WriteByte(UINT16 a, UINT8 d)
switch (a) {
case 0x0800: {
M6803SetIRQ(M6803_IRQ_LINE, M6803_IRQSTATUS_NONE);
M6803SetIRQLine(M6803_IRQ_LINE, M6803_IRQSTATUS_NONE);
return;
}
@ -2497,7 +2497,7 @@ inline static INT32 M62SynchroniseStream(INT32 nSoundRate)
static void M62MSM5205Vck0()
{
M6803SetIRQ(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_AUTO);
M6803SetIRQLine(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_AUTO);
M62SlaveMSM5205VClckReset = 1;
}
@ -3379,8 +3379,8 @@ static void M62MachineInit()
M6803Init(1);
M6803MapMemory(M62M6803Rom, 0x4000, 0xffff, M6803_ROM);
M6803SetReadByteHandler(M62M6803ReadByte);
M6803SetWriteByteHandler(M62M6803WriteByte);
M6803SetReadHandler(M62M6803ReadByte);
M6803SetWriteHandler(M62M6803WriteByte);
M6803SetReadPortHandler(M62M6803ReadPort);
M6803SetWritePortHandler(M62M6803WritePort);

View File

@ -178,7 +178,7 @@ void ajax_main_write(UINT16 address, UINT8 data)
{
case 0x0000:
if (address == 0 && firq_enable) {
M6809SetIRQ(1, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(1, M6809_IRQSTATUS_AUTO);
}
break;
@ -576,8 +576,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvShareRAM, 0x2000, 0x3fff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x10000, 0x8000, 0x9fff, M6809_ROM);
M6809MapMemory(DrvM6809ROM + 0x0a000, 0xa000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(ajax_sub_write);
M6809SetReadByteHandler(ajax_sub_read);
M6809SetWriteHandler(ajax_sub_write);
M6809SetReadHandler(ajax_sub_read);
M6809Close();
ZetInit(0);

View File

@ -560,8 +560,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvM6809RAM, 0x4000, 0x5fff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x10000, 0x6000, 0x7fff, M6809_ROM);
M6809MapMemory(DrvM6809ROM + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(bottom9_main_write);
M6809SetReadByteHandler(bottom9_main_read);
M6809SetWriteHandler(bottom9_main_write);
M6809SetReadHandler(bottom9_main_read);
M6809Close();
ZetInit(0);
@ -681,7 +681,7 @@ static INT32 DrvFrame()
if (*nmi_enable) ZetNmi();
}
if (K052109_irq_enabled) M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
if (K052109_irq_enabled) M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
if (pBurnSoundOut) {
memset(pBurnSoundOut, 0, nBurnSoundLen * sizeof(INT16) * 2);

View File

@ -445,9 +445,9 @@ static INT32 DrvDoReset()
static void DrvYM2151IrqHandler(INT32 Irq)
{
if (Irq) {
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_ACK);
} else {
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_NONE);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_NONE);
}
}
@ -509,15 +509,15 @@ static INT32 DrvInit()
M6809MapMemory(DrvM6809RAM1, 0x4800, 0x5fff, M6809_RAM);
// M6809MapMemory(DrvM6809ROM0 + 0x10000, 0x6000, 0x7fff, M6809_ROM);
M6809MapMemory(DrvM6809ROM0 + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(DrvContraM6809ReadByte);
M6809SetWriteByteHandler(DrvContraM6809WriteByte);
M6809SetReadHandler(DrvContraM6809ReadByte);
M6809SetWriteHandler(DrvContraM6809WriteByte);
M6809Close();
M6809Open(1);
M6809MapMemory(DrvM6809RAM2, 0x6000, 0x67ff, M6809_RAM);
M6809MapMemory(DrvM6809ROM1 + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(DrvContraM6809SoundReadByte);
M6809SetWriteByteHandler(DrvContraM6809SoundWriteByte);
M6809SetReadHandler(DrvContraM6809SoundReadByte);
M6809SetWriteHandler(DrvContraM6809SoundWriteByte);
M6809Close();
BurnYM2151Init(3579545);
@ -870,14 +870,14 @@ static INT32 DrvFrame()
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
nCyclesDone[nCurrentCPU] += M6809Run(nCyclesSegment);
if (i == (nInterleave - 1)) {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
}
M6809Close();
nCurrentCPU = 1;
M6809Open(nCurrentCPU);
if (trigger_sound_irq) {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
trigger_sound_irq = 0;
}
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;

View File

@ -646,8 +646,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvShareRAM, 0x6000, 0x67ff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0xe000, 0xe000, 0xffff, M6809_READ);
M6809MapMemory(DrvM6809DecROM + 0xe000, 0xe000, 0xffff, M6809_FETCH);
M6809SetReadByteHandler(gyruss_sub_read);
M6809SetWriteByteHandler(gyruss_sub_write);
M6809SetReadHandler(gyruss_sub_read);
M6809SetWriteHandler(gyruss_sub_write);
M6809Close();
ZetInit(1);
@ -848,7 +848,7 @@ static INT32 DrvFrame()
nCyclesSegment = nNext - nCyclesDone[1];
nCyclesDone[1] += M6809Run(nCyclesSegment);
if (i == (nInterleave - 1) && *interrupt_enable1) {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
}
M6809Close();
ZetClose();

View File

@ -731,8 +731,8 @@ static INT32 DrvInit(INT32 type)
HD6309MapMemory(DrvHD6309RAM, 0x4000, 0x5fff, HD6309_RAM);
HD6309MapMemory(DrvHD6309ROM + 0x10000, 0x6000, 0x7fff, HD6309_ROM);
HD6309MapMemory(DrvHD6309ROM + 0x08000, 0x8000, 0xffff, HD6309_ROM);
HD6309SetWriteByteHandler(mainevt_main_write);
HD6309SetReadByteHandler(mainevt_main_read);
HD6309SetWriteHandler(mainevt_main_write);
HD6309SetReadHandler(mainevt_main_read);
HD6309Close();
ZetInit(0);
@ -896,9 +896,9 @@ static INT32 DrvFrame()
}
if (nGame) {
if (nmi_enable[0]) HD6309SetIRQ(0x20, HD6309_IRQSTATUS_AUTO); // nmi
if (nmi_enable[0]) HD6309SetIRQLine(0x20, HD6309_IRQSTATUS_AUTO); // nmi
} else {
if (K052109_irq_enabled) HD6309SetIRQ(HD6309_IRQ_LINE, HD6309_IRQSTATUS_AUTO);
if (K052109_irq_enabled) HD6309SetIRQLine(HD6309_IRQ_LINE, HD6309_IRQSTATUS_AUTO);
}
if (pBurnSoundOut) {

View File

@ -379,8 +379,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvVidRAM, 0x0800, 0x0fff, M6809_RAM);
M6809MapMemory(DrvSprRAM, 0x1000, 0x1fff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x04000, 0x4000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(scotrsht_main_write);
M6809SetReadByteHandler(scotrsht_main_read);
M6809SetWriteHandler(scotrsht_main_write);
M6809SetReadHandler(scotrsht_main_read);
M6809Close();
ZetInit(0);
@ -574,7 +574,7 @@ static INT32 DrvFrame()
BurnTimerEndFrame(nCyclesTotal[1]);
if (*irq_enable) M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
if (*irq_enable) M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
if (pBurnSoundOut) {
BurnYM2203Update(pBurnSoundOut, nBurnSoundLen);

View File

@ -257,9 +257,9 @@ static void spy_3f90_w(INT32 data)
{
spy_collision();
M6809SetIRQ(1 /*FIRQ*/, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(1 /*FIRQ*/, M6809_IRQSTATUS_ACK);
M6809Run(105); // delay or the M6809 won't read it...
M6809SetIRQ(1 /*FIRQ*/, M6809_IRQSTATUS_NONE);
M6809SetIRQLine(1 /*FIRQ*/, M6809_IRQSTATUS_NONE);
}
Drv3f90old = data;
@ -554,8 +554,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvM6809RAM, 0x0800, 0x1aff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x10000, 0x6000, 0x7fff, M6809_ROM);
M6809MapMemory(DrvM6809ROM + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(spy_main_write);
M6809SetReadByteHandler(spy_main_read);
M6809SetWriteHandler(spy_main_write);
M6809SetReadHandler(spy_main_read);
M6809Close();
ZetInit(0);
@ -681,7 +681,7 @@ static INT32 DrvFrame()
nCyclesDone[1] += BurnTimerUpdateYM3812(nCyclesSegment - nCyclesDone[1]);
}
if (K052109_irq_enabled) M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
if (K052109_irq_enabled) M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
BurnTimerEndFrameYM3812(nCyclesTotal[1]);

View File

@ -205,7 +205,7 @@ void baraduke_main_write(UINT16 address, UINT8 data)
return;
case 0x8800:
M6809SetIRQ(0, M6809_IRQSTATUS_NONE);
M6809SetIRQLine(0, M6809_IRQSTATUS_NONE);
return;
case 0xb000:
@ -496,8 +496,8 @@ static INT32 DrvInit(INT32 type)
M6809MapMemory(DrvVidRAM, 0x2000, 0x3fff, M6809_RAM);
M6809MapMemory(DrvTxtRAM, 0x4800, 0x4fff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x06000, 0x6000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(baraduke_main_write);
M6809SetReadByteHandler(baraduke_main_read);
M6809SetWriteHandler(baraduke_main_write);
M6809SetReadHandler(baraduke_main_read);
M6809Close();
HD63701Init(1);
@ -505,8 +505,8 @@ static INT32 DrvInit(INT32 type)
HD63701MapMemory(DrvHD63701ROM + 0x8000, 0x8000, 0xbfff, HD63701_ROM);
HD63701MapMemory(DrvHD63701RAM, 0xc000, 0xc7ff, HD63701_RAM);
HD63701MapMemory(DrvHD63701ROM + 0xf000, 0xf000, 0xffff, HD63701_ROM);
HD63701SetReadByteHandler(baraduke_mcu_read);
HD63701SetWriteByteHandler(baraduke_mcu_write);
HD63701SetReadHandler(baraduke_mcu_read);
HD63701SetWriteHandler(baraduke_mcu_write);
HD63701SetReadPortHandler(baraduke_mcu_read_port);
HD63701SetWritePortHandler(baraduke_mcu_write_port);
// HD63701Close();
@ -752,7 +752,7 @@ static INT32 DrvFrame()
nNext = (i + 1) * nCyclesTotal[0] / nInterleave;
nCyclesDone[0] += M6809Run(nNext - nCyclesDone[0]);
if (i == (nInterleave - 1)) {
M6809SetIRQ(0, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(0, M6809_IRQSTATUS_ACK);
}
M6809Close();
@ -760,7 +760,7 @@ static INT32 DrvFrame()
nNext = (i + 1) * nCyclesTotal[1] / nInterleave;
nCyclesDone[1] += HD63701Run(nNext - nCyclesDone[1]);
if (i == (nInterleave - 1)) {
HD63701SetIRQ(0, M6800_IRQSTATUS_AUTO);
HD63701SetIRQLine(0, M6800_IRQSTATUS_AUTO);
}
// HD63701Close();
}

View File

@ -1027,19 +1027,19 @@ void DrvDdragonHD6309WriteByte(UINT16 Address, UINT8 Data)
} else {
if (DrvSubCPUBusy == 0) {
if (DrvSubCPUType == DD_CPU_TYPE_HD63701) {
HD63701SetIRQ(HD63701_INPUT_LINE_NMI, HD63701_IRQSTATUS_ACK);
HD63701SetIRQLine(HD63701_INPUT_LINE_NMI, HD63701_IRQSTATUS_ACK);
}
if (DrvSubCPUType == DD_CPU_TYPE_HD6309) {
HD6309Close();
HD6309Open(1);
HD6309SetIRQ(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_ACK);
HD6309Close();
HD6309Open(0);
}
if (DrvSubCPUType == DD_CPU_TYPE_M6803) {
M6803SetIRQ(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_ACK);
M6803SetIRQLine(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_ACK);
}
if (DrvSubCPUType == DD_CPU_TYPE_Z80) {
@ -1074,17 +1074,17 @@ void DrvDdragonHD6309WriteByte(UINT16 Address, UINT8 Data)
}
case 0x380b: {
HD6309SetIRQ(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_NONE);
return;
}
case 0x380c: {
HD6309SetIRQ(HD6309_FIRQ_LINE, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(HD6309_FIRQ_LINE, HD6309_IRQSTATUS_NONE);
return;
}
case 0x380d: {
HD6309SetIRQ(HD6309_IRQ_LINE, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(HD6309_IRQ_LINE, HD6309_IRQSTATUS_NONE);
return;
}
@ -1092,7 +1092,7 @@ void DrvDdragonHD6309WriteByte(UINT16 Address, UINT8 Data)
DrvSoundLatch = Data;
if (DrvSoundCPUType == DD_CPU_TYPE_M6809) {
M6809Open(0);
M6809SetIRQ(M6809_IRQ_LINE, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(M6809_IRQ_LINE, M6809_IRQSTATUS_ACK);
M6809Close();
}
@ -1135,10 +1135,10 @@ void DrvDdragonHD63701WriteByte(UINT16 Address, UINT8 Data)
if (Address == 0x17) {
if (Data & 3) {
HD6309Open(0);
HD6309SetIRQ(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309Close();
HD63701SetIRQ(HD63701_INPUT_LINE_NMI, HD63701_IRQSTATUS_NONE);
HD63701SetIRQLine(HD63701_INPUT_LINE_NMI, HD63701_IRQSTATUS_NONE);
}
}
return;
@ -1181,11 +1181,11 @@ void DrvDdragonbSubHD6309WriteByte(UINT16 Address, UINT8 Data)
HD6309Close();
HD6309Open(0);
HD6309SetIRQ(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309Close();
HD6309Open(1);
HD6309SetIRQ(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_NONE);
HD6309SetIRQLine(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_NONE);
}
}
return;
@ -1243,10 +1243,10 @@ void DrvDdragonbaM6803WriteByte(UINT16 Address, UINT8 Data)
void DrvDdragonbaM6803WritePort(UINT16, UINT8)
{
M6803SetIRQ(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_NONE);
M6803SetIRQLine(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_NONE);
HD6309Open(0);
HD6309SetIRQ(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309Close();
}
@ -1266,7 +1266,7 @@ void __fastcall Ddragon2SubZ80Write(UINT16 Address, UINT8 Data)
case 0xe000: {
HD6309Open(0);
HD6309SetIRQ(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(HD6309_IRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309Close();
return;
}
@ -1281,7 +1281,7 @@ UINT8 DrvDdragonM6809ReadByte(UINT16 Address)
{
switch (Address) {
case 0x1000: {
M6809SetIRQ(M6809_IRQ_LINE, M6809_IRQSTATUS_NONE);
M6809SetIRQLine(M6809_IRQ_LINE, M6809_IRQSTATUS_NONE);
return DrvSoundLatch;
}
@ -1442,14 +1442,14 @@ static INT32 Dd2SpritePlaneOffsets[4] = { 0x300000, 0x300004, 0, 4 };
static void DrvYM2151IrqHandler(INT32 Irq)
{
if (Irq) {
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_ACK);
#if 1
// This fixes music tempo but breaks MSM5205 sound if we use the M6809 for the MSM5205 timing,
// because the interleave run count is 190 cycles
nCyclesDone[2] += M6809Run(1000);
#endif
} else {
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_NONE);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_NONE);
}
}
@ -1813,30 +1813,30 @@ static INT32 DrvMachineInit()
HD6309MapMemory(DrvBgVideoRam , 0x3000, 0x37ff, M6809_RAM);
HD6309MapMemory(DrvHD6309Rom + 0x8000, 0x4000, 0x7fff, M6809_ROM);
HD6309MapMemory(DrvHD6309Rom , 0x8000, 0xffff, M6809_ROM);
HD6309SetReadByteHandler(DrvDdragonHD6309ReadByte);
HD6309SetWriteByteHandler(DrvDdragonHD6309WriteByte);
HD6309SetReadHandler(DrvDdragonHD6309ReadByte);
HD6309SetWriteHandler(DrvDdragonHD6309WriteByte);
HD6309Close();
if (DrvSubCPUType == DD_CPU_TYPE_HD63701) {
HD63701Init(1);
HD63701MapMemory(DrvSubCPURom , 0xc000, 0xffff, HD63701_ROM);
HD63701SetReadByteHandler(DrvDdragonHD63701ReadByte);
HD63701SetWriteByteHandler(DrvDdragonHD63701WriteByte);
HD63701SetReadHandler(DrvDdragonHD63701ReadByte);
HD63701SetWriteHandler(DrvDdragonHD63701WriteByte);
}
if (DrvSubCPUType == DD_CPU_TYPE_HD6309) {
HD6309Open(1);
HD6309MapMemory(DrvSubCPURom , 0xc000, 0xffff, HD6309_ROM);
HD6309SetReadByteHandler(DrvDdragonbSubHD6309ReadByte);
HD6309SetWriteByteHandler(DrvDdragonbSubHD6309WriteByte);
HD6309SetReadHandler(DrvDdragonbSubHD6309ReadByte);
HD6309SetWriteHandler(DrvDdragonbSubHD6309WriteByte);
HD6309Close();
}
if (DrvSubCPUType == DD_CPU_TYPE_M6803) {
M6803Init(1);
M6803MapMemory(DrvSubCPURom , 0xc000, 0xffff, M6803_ROM);
M6803SetReadByteHandler(DrvDdragonbaM6803ReadByte);
M6803SetWriteByteHandler(DrvDdragonbaM6803WriteByte);
M6803SetReadHandler(DrvDdragonbaM6803ReadByte);
M6803SetWriteHandler(DrvDdragonbaM6803WriteByte);
M6803SetWritePortHandler(DrvDdragonbaM6803WritePort);
}
@ -1845,8 +1845,8 @@ static INT32 DrvMachineInit()
M6809Open(0);
M6809MapMemory(DrvSoundCPURam , 0x0000, 0x0fff, M6809_RAM);
M6809MapMemory(DrvSoundCPURom , 0x8000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(DrvDdragonM6809ReadByte);
M6809SetWriteByteHandler(DrvDdragonM6809WriteByte);
M6809SetReadHandler(DrvDdragonM6809ReadByte);
M6809SetWriteHandler(DrvDdragonM6809WriteByte);
M6809Close();
BurnYM2151Init(3579545);
@ -1892,8 +1892,8 @@ static INT32 Drv2MachineInit()
HD6309MapMemory(DrvPaletteRam2 , 0x3e00, 0x3fff, M6809_RAM);
HD6309MapMemory(DrvHD6309Rom + 0x8000, 0x4000, 0x7fff, M6809_ROM);
HD6309MapMemory(DrvHD6309Rom , 0x8000, 0xffff, M6809_ROM);
HD6309SetReadByteHandler(DrvDdragonHD6309ReadByte);
HD6309SetWriteByteHandler(DrvDdragonHD6309WriteByte);
HD6309SetReadHandler(DrvDdragonHD6309ReadByte);
HD6309SetWriteHandler(DrvDdragonHD6309WriteByte);
HD6309Close();
ZetInit(0);
@ -2391,14 +2391,14 @@ static INT32 DrvFrame()
if (i == VBlankSlice) {
DrvVBlank = 1;
HD6309Open(0);
HD6309SetIRQ(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(HD6309_INPUT_LINE_NMI, HD6309_IRQSTATUS_ACK);
HD6309Close();
}
for (INT32 j = 0; j < 16; j++) {
if (i == FIRQFireSlice[j]) {
HD6309Open(0);
HD6309SetIRQ(HD6309_FIRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309SetIRQLine(HD6309_FIRQ_LINE, HD6309_IRQSTATUS_ACK);
HD6309Close();
}
}
@ -2508,11 +2508,11 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
if (DrvSubCPUBusy == 0) {
if (DrvSubCPUType == DD_CPU_TYPE_HD63701) {
HD63701SetIRQ(HD63701_INPUT_LINE_NMI, HD63701_IRQSTATUS_ACK);
HD63701SetIRQLine(HD63701_INPUT_LINE_NMI, HD63701_IRQSTATUS_ACK);
}
if (DrvSubCPUType == DD_CPU_TYPE_M6803) {
M6803SetIRQ(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_ACK);
M6803SetIRQLine(M6803_INPUT_LINE_NMI, M6803_IRQSTATUS_ACK);
}
}
}

View File

@ -1772,7 +1772,7 @@ void __fastcall Gauntlet68KWriteWord(UINT32 a, UINT16 d)
DrvCPUtoSoundReady = 1;
M6502Open(0);
nCyclesDone[1] += M6502Run(100);
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
nCyclesDone[1] += M6502Run(100);
M6502Close();
return;
@ -1931,7 +1931,7 @@ void GauntletSoundWrite(UINT16 Address, UINT8 Data)
}
case 0x1830: {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
return;
}
@ -2039,8 +2039,8 @@ static INT32 DrvInit()
M6502Open(0);
M6502MapMemory(DrvM6502Ram , 0x0000, 0x0fff, M6502_RAM);
M6502MapMemory(DrvM6502Rom , 0x4000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(GauntletSoundRead);
M6502SetWriteByteHandler(GauntletSoundWrite);
M6502SetReadHandler(GauntletSoundRead);
M6502SetWriteHandler(GauntletSoundWrite);
M6502Close();
atarigen_slapstic_init(0x038000, 104);
@ -2151,8 +2151,8 @@ static INT32 Gaunt2pInit()
M6502Open(0);
M6502MapMemory(DrvM6502Ram , 0x0000, 0x0fff, M6502_RAM);
M6502MapMemory(DrvM6502Rom , 0x4000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(GauntletSoundRead);
M6502SetWriteByteHandler(GauntletSoundWrite);
M6502SetReadHandler(GauntletSoundRead);
M6502SetWriteHandler(GauntletSoundWrite);
M6502Close();
atarigen_slapstic_init(0x038000, 107);
@ -2273,8 +2273,8 @@ static INT32 Gaunt2Init()
M6502Open(0);
M6502MapMemory(DrvM6502Ram , 0x0000, 0x0fff, M6502_RAM);
M6502MapMemory(DrvM6502Rom , 0x4000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(GauntletSoundRead);
M6502SetWriteByteHandler(GauntletSoundWrite);
M6502SetReadHandler(GauntletSoundRead);
M6502SetWriteHandler(GauntletSoundWrite);
M6502Close();
atarigen_slapstic_init(0x038000, 106);
@ -2508,7 +2508,7 @@ static INT32 DrvFrame()
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
nCyclesDone[nCurrentCPU] += M6502Run(nCyclesSegment);
if (i == 64 || i == 128 || i == 192 || i == 256) M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
if (i == 64 || i == 128 || i == 192 || i == 256) M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
M6502Close();
}

View File

@ -160,7 +160,7 @@ void __fastcall ginganin_write_word(UINT32 address, UINT16 data)
case 0x06000e:
*soundlatch = data & 0xff;
M6809SetIRQ(0x20, M6809_IRQSTATUS_AUTO); // nmi
M6809SetIRQLine(0x20, M6809_IRQSTATUS_AUTO); // nmi
return;
}
}
@ -396,8 +396,8 @@ static INT32 DrvInit()
M6809Open(0);
M6809MapMemory(DrvM6809RAM, 0x0000, 0x07ff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x4000, 0x4000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(ginganin_sound_write);
M6809SetReadByteHandler(ginganin_sound_read);
M6809SetWriteHandler(ginganin_sound_write);
M6809SetReadHandler(ginganin_sound_read);
M6809Close();
AY8910Init(0, 3579545 / 2, nBurnSoundRate, NULL, NULL, NULL, NULL);
@ -577,7 +577,7 @@ static void sound_interrupt()
if (MC6840_flag) {
if (MC6840_ctr > MC6840_tempo) {
MC6840_ctr = 0;
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
} else {
MC6840_ctr++;
}

View File

@ -889,8 +889,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvPaletteRam1 , 0x3900, 0x39ff, M6809_RAM);
M6809MapMemory(DrvM6809Rom , 0x4000, 0x5fff, M6809_ROM);
M6809MapMemory(DrvM6809Rom + 0x2000 , 0x6000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(DrvGngM6809ReadByte);
M6809SetWriteByteHandler(DrvGngM6809WriteByte);
M6809SetReadHandler(DrvGngM6809ReadByte);
M6809SetWriteHandler(DrvGngM6809WriteByte);
M6809Close();
// Setup the Z80 emulation
@ -983,8 +983,8 @@ static INT32 DiamondInit()
M6809MapMemory(DrvPaletteRam1 , 0x3900, 0x39ff, M6809_RAM);
M6809MapMemory(DrvM6809Rom , 0x4000, 0x5fff, M6809_ROM);
M6809MapMemory(DrvM6809Rom + 0x2000 , 0x6000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(DrvGngM6809ReadByte);
M6809SetWriteByteHandler(DrvGngM6809WriteByte);
M6809SetReadHandler(DrvGngM6809ReadByte);
M6809SetWriteHandler(DrvGngM6809WriteByte);
M6809Close();
// Setup the Z80 emulation
@ -1314,7 +1314,7 @@ static INT32 DrvFrame()
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
nCyclesDone[nCurrentCPU] += M6809Run(nCyclesSegment);
if (i == 24) {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
}
M6809Close();

View File

@ -316,8 +316,8 @@ static INT32 DrvInit()
M6502MapMemory(Rom + 0x0000, 0x0000, 0x03ff, M6502_RAM); // Rom
M6502MapMemory(Rom + 0x5000, 0x5000, 0x7fff, M6502_ROM); // Rom
M6502MapMemory(Rom + 0x5000, 0xd000, 0xffff, M6502_ROM); // Rom Mirror
M6502SetReadByteHandler(mole_read_byte);
M6502SetWriteByteHandler(mole_write_byte);
M6502SetReadHandler(mole_read_byte);
M6502SetWriteHandler(mole_write_byte);
M6502SetReadMemIndexHandler(mole_read_byte);
M6502SetWriteMemIndexHandler(mole_write_byte);
M6502SetReadOpHandler(mole_read_byte);
@ -393,7 +393,7 @@ static INT32 DrvFrame()
M6502Open(0);
M6502Run(4000000 / 60);
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
M6502Close();
if (pBurnSoundOut) {

View File

@ -158,7 +158,7 @@ void mystston_write(UINT16 address, UINT8 data)
return;
case 0x2010:
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_NONE);
break;
case 0x2020:
@ -331,8 +331,8 @@ static INT32 DrvInit()
M6502MapMemory(DrvFgRAM, 0x1000, 0x17ff, M6502_RAM);
M6502MapMemory(DrvBgRAM, 0x1800, 0x1fff, M6502_RAM);
M6502MapMemory(Drv6502ROM + 0x4000, 0x4000, 0xffff, M6502_ROM);
M6502SetWriteByteHandler(mystston_write);
M6502SetReadByteHandler(mystston_read);
M6502SetWriteHandler(mystston_write);
M6502SetReadHandler(mystston_read);
M6502Close();
AY8910Init(0, 1500000, nBurnSoundRate, NULL, NULL, NULL, NULL);
@ -496,7 +496,7 @@ static void mystston_interrupt_handler(INT32 scanline)
if (coin == 0)
{
coin = 1;
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
return;
}
}
@ -504,7 +504,7 @@ static void mystston_interrupt_handler(INT32 scanline)
if (scanline == 8) vblank = 0;
if (scanline == 248) vblank = 0x80;
if ((scanline & 0x0f) == 0) M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
if ((scanline & 0x0f) == 0) M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_ACK);
}
static INT32 DrvFrame()

View File

@ -154,7 +154,7 @@ static void pacland_main_write(UINT16 address, UINT8 data)
if ((address & 0xf000) == 0x7000) {
INT32 bit = ~address & (1 << 11);
interrupt_enable[0] = bit ? 1 : 0;
if (!bit) M6809SetIRQ(0, M6809_IRQSTATUS_NONE);
if (!bit) M6809SetIRQLine(0, M6809_IRQSTATUS_NONE);
return;
}
@ -234,7 +234,7 @@ static void pacland_mcu_write(UINT16 address, UINT8 data)
if ((address & 0xc000) == 0x4000) {
INT32 bit = (~address >> 13) & 1;
interrupt_enable[1] = bit;
if (!bit) HD63701SetIRQ(0, HD63701_IRQSTATUS_NONE);
if (!bit) HD63701SetIRQLine(0, HD63701_IRQSTATUS_NONE);
return;
}
}
@ -494,8 +494,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvVidRAM1, 0x1000, 0x1fff, M6809_RAM);
M6809MapMemory(DrvSprRAM, 0x2000, 0x37ff, M6809_RAM);
M6809MapMemory(DrvMainROM + 0x8000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(pacland_main_write);
M6809SetReadByteHandler(pacland_main_read);
M6809SetWriteHandler(pacland_main_write);
M6809SetReadHandler(pacland_main_read);
M6809Close();
HD63701Init(1);
@ -505,8 +505,8 @@ static INT32 DrvInit()
HD63701MapMemory(DrvMCUROM + 0xf000, 0xf000, 0xffff, HD63701_ROM);
HD63701SetWritePortHandler(pacland_mcu_write_port);
HD63701SetReadPortHandler(pacland_mcu_read_port);
HD63701SetWriteByteHandler(pacland_mcu_write);
HD63701SetReadByteHandler(pacland_mcu_read);
HD63701SetWriteHandler(pacland_mcu_write);
HD63701SetReadHandler(pacland_mcu_read);
// Close
NamcoSoundInit(49152000/2/1024);
@ -770,14 +770,14 @@ static INT32 DrvFrame()
INT32 nSegment = nCyclesTotal[0] / nInterleave;
nCyclesDone[0] += M6809Run(nSegment);
if (i == (nInterleave - 1) && interrupt_enable[0]) M6809SetIRQ(0, M6809_IRQSTATUS_ACK);
if (i == (nInterleave - 1) && interrupt_enable[0]) M6809SetIRQLine(0, M6809_IRQSTATUS_ACK);
nSegment = nCyclesTotal[1] / nInterleave;
if (mcu_reset) {
nCyclesDone[1] += nSegment;
} else {
nCyclesDone[1] += HD63701Run(nSegment);
if (i == (nInterleave - 1) && interrupt_enable[1]) HD63701SetIRQ(0, HD63701_IRQSTATUS_ACK);
if (i == (nInterleave - 1) && interrupt_enable[1]) HD63701SetIRQLine(0, HD63701_IRQSTATUS_ACK);
}
}

View File

@ -716,7 +716,7 @@ void RenegadeWriteByte(UINT16 Address, UINT8 Data)
case 0x3802: {
DrvSoundLatch = Data;
M6809Open(0);
M6809SetIRQ(M6809_IRQ_LINE, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(M6809_IRQ_LINE, M6809_IRQSTATUS_AUTO);
M6809Close();
return;
}
@ -907,9 +907,9 @@ static INT32 TileYOffsets[16] = { 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80,
static void DrvFMIRQHandler(INT32, INT32 nStatus)
{
if (nStatus) {
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_ACK);
} else {
M6809SetIRQ(M6809_FIRQ_LINE, M6809_IRQSTATUS_NONE);
M6809SetIRQLine(M6809_FIRQ_LINE, M6809_IRQSTATUS_NONE);
}
}
@ -1001,16 +1001,16 @@ static INT32 DrvInit(INT32 nMcuType)
M6502MapMemory(DrvPaletteRam2 , 0x3100, 0x31ff, M6502_RAM);
M6502MapMemory(DrvM6502Rom + 0x8000 , 0x4000, 0x7fff, M6502_ROM);
M6502MapMemory(DrvM6502Rom , 0x8000, 0xffff, M6502_ROM);
M6502SetReadByteHandler(RenegadeReadByte);
M6502SetWriteByteHandler(RenegadeWriteByte);
M6502SetReadHandler(RenegadeReadByte);
M6502SetWriteHandler(RenegadeWriteByte);
M6502Close();
M6809Init(1);
M6809Open(0);
M6809MapMemory(DrvM6809Ram , 0x0000, 0x0fff, M6809_RAM);
M6809MapMemory(DrvM6809Rom , 0x8000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(RenegadeM6809ReadByte);
M6809SetWriteByteHandler(RenegadeM6809WriteByte);
M6809SetReadHandler(RenegadeM6809ReadByte);
M6809SetWriteHandler(RenegadeM6809WriteByte);
M6809Close();
if (nMcuType == MCU_TYPE_RENEGADE) {
@ -1269,9 +1269,9 @@ static void DrvInterrupt()
static INT32 Count;
Count = !Count;
if (Count) {
M6502SetIRQ(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_INPUT_LINE_NMI, M6502_IRQSTATUS_AUTO);
} else {
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
}
}

View File

@ -330,8 +330,8 @@ static INT32 DrvInit()
M6502Init(0, TYPE_M6502);
M6502Open(0);
M6502SetReadByteHandler(eggs_readmem);
M6502SetWriteByteHandler(eggs_writemem);
M6502SetReadHandler(eggs_readmem);
M6502SetWriteHandler(eggs_writemem);
M6502SetReadMemIndexHandler(eggs_readmem);
M6502SetWriteMemIndexHandler(eggs_writemem);
M6502SetReadOpHandler(eggs_readmem);
@ -352,8 +352,8 @@ static INT32 DrvInit()
M6502Init(0, TYPE_M6502);
M6502Open(0);
M6502SetReadByteHandler(dommy_readmem);
M6502SetWriteByteHandler(dommy_writemem);
M6502SetReadHandler(dommy_readmem);
M6502SetWriteHandler(dommy_writemem);
M6502SetReadMemIndexHandler(dommy_readmem);
M6502SetWriteMemIndexHandler(dommy_writemem);
M6502SetReadOpHandler(dommy_readmem);
@ -504,7 +504,7 @@ static inline void scregg_interrupt_handler(INT32 scanline)
if (scanline == 14)
VBLK = 0x80;
M6502SetIRQ(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
M6502SetIRQLine(M6502_IRQ_LINE, M6502_IRQSTATUS_AUTO);
}
static INT32 DrvFrame()

View File

@ -304,7 +304,7 @@ void skykid_main_write(UINT16 address, UINT8 data)
INT32 b = (~address & 0x0800) / 0x0800;
interrupt_enable[0] = b;
if (b == 0) M6809SetIRQ(0, M6809_IRQSTATUS_NONE);
if (b == 0) M6809SetIRQLine(0, M6809_IRQSTATUS_NONE);
return;
}
@ -384,7 +384,7 @@ void skykid_mcu_write(UINT16 address, UINT8 data)
interrupt_enable[1] = b;
if (b == 0) HD63701SetIRQ(0, HD63701_IRQSTATUS_NONE);
if (b == 0) HD63701SetIRQLine(0, HD63701_IRQSTATUS_NONE);
return;
}
}
@ -608,8 +608,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvTxtRAM, 0x4000, 0x47ff, M6809_RAM);
M6809MapMemory(DrvSprRAM, 0x4800, 0x5fff, M6809_RAM);
M6809MapMemory(DrvM6809ROM + 0x08000, 0x8000, 0xffff, M6809_ROM);
M6809SetWriteByteHandler(skykid_main_write);
M6809SetReadByteHandler(skykid_main_read);
M6809SetWriteHandler(skykid_main_write);
M6809SetReadHandler(skykid_main_read);
M6809Close();
HD63701Init(1);
@ -617,8 +617,8 @@ static INT32 DrvInit()
HD63701MapMemory(DrvHD63701ROM + 0x8000, 0x8000, 0xbfff, HD63701_ROM);
HD63701MapMemory(DrvHD63701RAM, 0xc000, 0xc7ff, HD63701_RAM);
HD63701MapMemory(DrvHD63701ROM + 0xf000, 0xf000, 0xffff, HD63701_ROM);
HD63701SetReadByteHandler(skykid_mcu_read);
HD63701SetWriteByteHandler(skykid_mcu_write);
HD63701SetReadHandler(skykid_mcu_read);
HD63701SetWriteHandler(skykid_mcu_write);
HD63701SetReadPortHandler(skykid_mcu_read_port);
HD63701SetWritePortHandler(skykid_mcu_write_port);
// HD63701Close();
@ -822,7 +822,7 @@ static INT32 DrvFrame()
nNext = (i + 1) * nCyclesTotal[0] / nInterleave;
nCyclesDone[0] += M6809Run(nNext - nCyclesDone[0]);
if (i == (nInterleave - 1) && interrupt_enable[0]) {
M6809SetIRQ(0, M6809_IRQSTATUS_ACK);
M6809SetIRQLine(0, M6809_IRQSTATUS_ACK);
}
M6809Close();
@ -831,7 +831,7 @@ static INT32 DrvFrame()
sync_HD63701(1);
if (i == (nInterleave - 1) && interrupt_enable[1]) {
HD63701SetIRQ(0, M6800_IRQSTATUS_ACK);
HD63701SetIRQLine(0, M6800_IRQSTATUS_ACK);
}
} else {
sync_HD63701(0);

View File

@ -412,15 +412,15 @@ static INT32 DrvInit()
M6809MapMemory(DrvColRAM, 0x1400, 0x17ff, M6809_RAM);
M6809MapMemory(DrvSprRAM, 0x2020, 0x207f, M6809_RAM); // 0x100 min
M6809MapMemory(DrvM6809ROM0 + 0x04000, 0x4000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(sonson_main_read);
M6809SetWriteByteHandler(sonson_main_write);
M6809SetReadHandler(sonson_main_read);
M6809SetWriteHandler(sonson_main_write);
M6809Close();
M6809Open(1);
M6809MapMemory(DrvM6809RAM1, 0x0000, 0x07ff, M6809_RAM);
M6809MapMemory(DrvM6809ROM1 + 0x0e000, 0xe000, 0xffff, M6809_ROM);
M6809SetReadByteHandler(sonson_sound_read);
M6809SetWriteByteHandler(sonson_sound_write);
M6809SetReadHandler(sonson_sound_read);
M6809SetWriteHandler(sonson_sound_write);
M6809Close();
AY8910Init(0, 1500000, nBurnSoundRate, NULL, NULL, NULL, NULL);
@ -576,7 +576,7 @@ static INT32 DrvFrame()
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
nCyclesDone[nCurrentCPU] += M6809Run(nCyclesSegment);
if (i == (nInterleave - 1)) {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
}
M6809Close();
@ -585,12 +585,12 @@ static INT32 DrvFrame()
nNext = (i + 1) * nCyclesTotal[nCurrentCPU] / nInterleave;
nCyclesSegment = nNext - nCyclesDone[nCurrentCPU];
if (DrvSoundIrqTrigger) {
M6809SetIRQ(1, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(1, M6809_IRQSTATUS_AUTO);
DrvSoundIrqTrigger = 0;
}
nCyclesDone[nCurrentCPU] += M6809Run(nCyclesSegment);
if (i == 3 || i == 7 || i == 11 || i == 15) {
M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
}
M6809Close();

View File

@ -377,8 +377,8 @@ static INT32 DrvInit()
M6809MapMemory(DrvBgRAM, 0x2000, 0x3fff, M6809_RAM);
M6809MapMemory(DrvFgRAM, 0x5000, 0x5fff, M6809_WRITE);
M6809MapMemory(DrvPalRAM, 0x7000, 0x73ff, M6809_WRITE);
M6809SetReadByteHandler(srumbler_main_read);
M6809SetWriteByteHandler(srumbler_main_write);
M6809SetReadHandler(srumbler_main_read);
M6809SetWriteHandler(srumbler_main_write);
M6809Close();
ZetInit(0);
@ -618,8 +618,8 @@ static INT32 DrvFrame()
for (INT32 i = 0; i < nInterleave; i++) {
nCyclesDone[0] += M6809Run(nCyclesTotal[0] / nInterleave);
if (i == (nInterleave / 2) - 1) M6809SetIRQ(1, M6809_IRQSTATUS_AUTO);
if (i == (nInterleave / 1) - 1) M6809SetIRQ(0, M6809_IRQSTATUS_AUTO);
if (i == (nInterleave / 2) - 1) M6809SetIRQLine(1, M6809_IRQSTATUS_AUTO);
if (i == (nInterleave / 1) - 1) M6809SetIRQLine(0, M6809_IRQSTATUS_AUTO);
BurnTimerUpdate(i * (nCyclesTotal[1] / nInterleave));
ZetRaiseIrq(0);

View File

@ -597,7 +597,7 @@ void __fastcall main_write_byte(UINT32 address, UINT8 data)
case 0x70000f:
if (has_sound_cpu) {
*soundlatch = data;
M6809SetIRQ(1, M6809_IRQSTATUS_AUTO);
M6809SetIRQLine(1, M6809_IRQSTATUS_AUTO);
} else {
MSM6295Command(0, data);
}
@ -849,8 +849,8 @@ static INT32 DrvInit(INT32 (*pRomLoadCallback)(), INT32 encrypted_ram, INT32 sou
M6809Open(0);
M6809MapMemory(Drv6809RAM, 0x0000, 0x07ff, M6809_RAM);
M6809MapMemory(Drv6809ROM + 0x0c00, 0x0c00, 0xffff, M6809_ROM);
M6809SetReadByteHandler(sound_read);
M6809SetWriteByteHandler(sound_write);
M6809SetReadHandler(sound_read);
M6809SetWriteHandler(sound_write);
M6809Close();
BurnYM3812Init(3580000, NULL, &DrvSynchroniseStream, 0);

View File

@ -1747,8 +1747,8 @@ static INT32 MachineInit()
if (DrvMCUInUse == 1) {
M6801Init(1);
M6801MapMemory(DrvMcuRom, 0xf000, 0xffff, M6801_ROM);
M6801SetReadByteHandler(BublboblMcuReadByte);
M6801SetWriteByteHandler(BublboblMcuWriteByte);
M6801SetReadHandler(BublboblMcuReadByte);
M6801SetWriteHandler(BublboblMcuWriteByte);
} else if (DrvMCUInUse == 2) {
m67805_taito_init(DrvMcuRom, DrvMcuRam, &bub68705_m68705_interface);
@ -2396,8 +2396,8 @@ static INT32 DrvFrame()
if (i == 99) m68705SetIrqLine(0, 0 /*CLEAR_LINE*/);
} else {
nCyclesSegment = M6801Run(nCyclesSegment);
if (i == 98) M6801SetIRQ(0, M6801_IRQSTATUS_ACK);
if (i == 99) M6801SetIRQ(0, M6801_IRQSTATUS_NONE);
if (i == 98) M6801SetIRQLine(0, M6801_IRQSTATUS_ACK);
if (i == 99) M6801SetIRQLine(0, M6801_IRQSTATUS_NONE);
}
nCyclesDone[nCurrentCPU] += nCyclesSegment;

View File

@ -170,11 +170,11 @@ INT32 HD6309GetActive()
return nActiveCPU;
}
void HD6309SetIRQ(INT32 vector, INT32 status)
void HD6309SetIRQLine(INT32 vector, INT32 status)
{
#if defined FBA_DEBUG
if (!DebugCPU_HD6309Initted) bprintf(PRINT_ERROR, _T("HD6309SetIRQ called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("HD6309SetIRQ called when no CPU open\n"));
if (!DebugCPU_HD6309Initted) bprintf(PRINT_ERROR, _T("HD6309SetIRQLine called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("HD6309SetIRQLine called when no CPU open\n"));
#endif
if (status == HD6309_IRQSTATUS_NONE) {
@ -275,21 +275,21 @@ INT32 HD6309MemCallback(UINT16 nStart, UINT16 nEnd, INT32 nType)
}
void HD6309SetReadByteHandler(UINT8 (*pHandler)(UINT16))
void HD6309SetReadHandler(UINT8 (*pHandler)(UINT16))
{
#if defined FBA_DEBUG
if (!DebugCPU_HD6309Initted) bprintf(PRINT_ERROR, _T("HD6309SetReadByteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("HD6309SetReadByteHandler called when no CPU open\n"));
if (!DebugCPU_HD6309Initted) bprintf(PRINT_ERROR, _T("HD6309SetReadHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("HD6309SetReadHandler called when no CPU open\n"));
#endif
HD6309CPUContext[nActiveCPU].ReadByte = pHandler;
}
void HD6309SetWriteByteHandler(void (*pHandler)(UINT16, UINT8))
void HD6309SetWriteHandler(void (*pHandler)(UINT16, UINT8))
{
#if defined FBA_DEBUG
if (!DebugCPU_HD6309Initted) bprintf(PRINT_ERROR, _T("HD6309SetWriteByteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("HD6309SetWriteByteHandler called when no CPU open\n"));
if (!DebugCPU_HD6309Initted) bprintf(PRINT_ERROR, _T("HD6309SetWriteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("HD6309SetWriteHandler called when no CPU open\n"));
#endif
HD6309CPUContext[nActiveCPU].WriteByte = pHandler;

View File

@ -43,14 +43,14 @@ void HD6309Exit();
void HD6309Open(INT32 num);
void HD6309Close();
INT32 HD6309GetActive();
void HD6309SetIRQ(INT32 vector, INT32 status);
void HD6309SetIRQLine(INT32 vector, INT32 status);
INT32 HD6309Run(INT32 cycles);
void HD6309RunEnd();
INT32 HD6309GetPC();
INT32 HD6309MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType);
INT32 HD6309MemCallback(UINT16 nStart, UINT16 nEnd, INT32 nType);
void HD6309SetReadByteHandler(UINT8 (*pHandler)(UINT16));
void HD6309SetWriteByteHandler(void (*pHandler)(UINT16, UINT8));
void HD6309SetReadHandler(UINT8 (*pHandler)(UINT16));
void HD6309SetWriteHandler(void (*pHandler)(UINT16, UINT8));
void HD6309SetReadOpHandler(UINT8 (*pHandler)(UINT16));
void HD6309SetReadOpArgHandler(UINT8 (*pHandler)(UINT16));
INT32 HD6309Scan(INT32 nAction);

View File

@ -237,11 +237,11 @@ INT32 M6502GetActive()
return nActiveCPU;
}
void M6502SetIRQ(INT32 vector, INT32 status)
void M6502SetIRQLine(INT32 vector, INT32 status)
{
#if defined FBA_DEBUG
if (!DebugCPU_M6502Initted) bprintf(PRINT_ERROR, _T("M6502SetIRQLine called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6502SetIRQLine called with no CPU open\n"));
if (!DebugCPU_M6502Initted) bprintf(PRINT_ERROR, _T("M6502SetIRQLineLine called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6502SetIRQLineLine called with no CPU open\n"));
#endif
if (status == M6502_IRQSTATUS_NONE) {
@ -327,21 +327,21 @@ void M6502SetWritePortHandler(void (*pHandler)(UINT16, UINT8))
pCurrentCPU->WritePort = pHandler;
}
void M6502SetReadByteHandler(UINT8 (*pHandler)(UINT16))
void M6502SetReadHandler(UINT8 (*pHandler)(UINT16))
{
#if defined FBA_DEBUG
if (!DebugCPU_M6502Initted) bprintf(PRINT_ERROR, _T("M6502SetReadByteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6502SetReadByteHandler called with no CPU open\n"));
if (!DebugCPU_M6502Initted) bprintf(PRINT_ERROR, _T("M6502SetReadHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6502SetReadHandler called with no CPU open\n"));
#endif
pCurrentCPU->ReadByte = pHandler;
}
void M6502SetWriteByteHandler(void (*pHandler)(UINT16, UINT8))
void M6502SetWriteHandler(void (*pHandler)(UINT16, UINT8))
{
#if defined FBA_DEBUG
if (!DebugCPU_M6502Initted) bprintf(PRINT_ERROR, _T("M6502SetWriteByteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6502SetWriteByteHandler called with no CPU open\n"));
if (!DebugCPU_M6502Initted) bprintf(PRINT_ERROR, _T("M6502SetWriteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6502SetWriteHandler called with no CPU open\n"));
#endif
pCurrentCPU->WriteByte = pHandler;

View File

@ -69,14 +69,14 @@ void M6502Exit();
void M6502Open(INT32 num);
void M6502Close();
INT32 M6502GetActive();
void M6502SetIRQ(INT32 vector, INT32 status);
void M6502SetIRQLine(INT32 vector, INT32 status);
INT32 M6502Run(INT32 cycles);
void M6502RunEnd();
INT32 M6502MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType);
void M6502SetReadPortHandler(UINT8 (*pHandler)(UINT16));
void M6502SetWritePortHandler(void (*pHandler)(UINT16, UINT8));
void M6502SetReadByteHandler(UINT8 (*pHandler)(UINT16));
void M6502SetWriteByteHandler(void (*pHandler)(UINT16, UINT8));
void M6502SetReadHandler(UINT8 (*pHandler)(UINT16));
void M6502SetWriteHandler(void (*pHandler)(UINT16, UINT8));
void M6502SetReadMemIndexHandler(UINT8 (*pHandler)(UINT16));
void M6502SetWriteMemIndexHandler(void (*pHandler)(UINT16, UINT8));
void M6502SetReadOpHandler(UINT8 (*pHandler)(UINT16));

View File

@ -220,11 +220,11 @@ void M6800Exit()
DebugCPU_M6800Initted = 0;
}
void M6800SetIRQ(INT32 vector, INT32 status)
void M6800SetIRQLine(INT32 vector, INT32 status)
{
#if defined FBA_DEBUG
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6800SetIRQ called without init\n"));
if (nCpuType != CPU_TYPE_M6800) bprintf(PRINT_ERROR, _T("M6800SetIRQ called with invalid CPU Type\n"));
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6800SetIRQLine called without init\n"));
if (nCpuType != CPU_TYPE_M6800) bprintf(PRINT_ERROR, _T("M6800SetIRQLine called with invalid CPU Type\n"));
#endif
if (status == M6800_IRQSTATUS_NONE) {
@ -243,11 +243,11 @@ void M6800SetIRQ(INT32 vector, INT32 status)
}
}
void HD63701SetIRQ(INT32 vector, INT32 status)
void HD63701SetIRQLine(INT32 vector, INT32 status)
{
#if defined FBA_DEBUG
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("HD63701SetIRQ called without init\n"));
if (nCpuType != CPU_TYPE_HD63701) bprintf(PRINT_ERROR, _T("HD63701SetIRQ called with invalid CPU Type\n"));
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("HD63701SetIRQLine called without init\n"));
if (nCpuType != CPU_TYPE_HD63701) bprintf(PRINT_ERROR, _T("HD63701SetIRQLine called with invalid CPU Type\n"));
#endif
if (status == HD63701_IRQSTATUS_NONE) {
@ -266,11 +266,11 @@ void HD63701SetIRQ(INT32 vector, INT32 status)
}
}
void M6803SetIRQ(INT32 vector, INT32 status)
void M6803SetIRQLine(INT32 vector, INT32 status)
{
#if defined FBA_DEBUG
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6803SetIRQ called without init\n"));
if (nCpuType != CPU_TYPE_M6803) bprintf(PRINT_ERROR, _T("M6803SetIRQ called with invalid CPU Type\n"));
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6803SetIRQLine called without init\n"));
if (nCpuType != CPU_TYPE_M6803) bprintf(PRINT_ERROR, _T("M6803SetIRQLine called with invalid CPU Type\n"));
#endif
if (status == M6803_IRQSTATUS_NONE) {
@ -289,11 +289,11 @@ void M6803SetIRQ(INT32 vector, INT32 status)
}
}
void M6801SetIRQ(INT32 vector, INT32 status)
void M6801SetIRQLine(INT32 vector, INT32 status)
{
#if defined FBA_DEBUG
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6801SetIRQ called without init\n"));
if (nCpuType != CPU_TYPE_M6801) bprintf(PRINT_ERROR, _T("M6800SetIRQ called with invalid CPU Type\n"));
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6801SetIRQLine called without init\n"));
if (nCpuType != CPU_TYPE_M6801) bprintf(PRINT_ERROR, _T("M6800SetIRQLine called with invalid CPU Type\n"));
#endif
if (status == M6801_IRQSTATUS_NONE) {
@ -394,19 +394,19 @@ INT32 M6800MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType)
}
void M6800SetReadByteHandler(UINT8 (*pHandler)(UINT16))
void M6800SetReadHandler(UINT8 (*pHandler)(UINT16))
{
#if defined FBA_DEBUG
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6800SetReadByteHandler called without init\n"));
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6800SetReadHandler called without init\n"));
#endif
M6800CPUContext[0].ReadByte = pHandler;
}
void M6800SetWriteByteHandler(void (*pHandler)(UINT16, UINT8))
void M6800SetWriteHandler(void (*pHandler)(UINT16, UINT8))
{
#if defined FBA_DEBUG
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6800SetWriteByteHandler called without init\n"));
if (!DebugCPU_M6800Initted) bprintf(PRINT_ERROR, _T("M6800SetWriteHandler called without init\n"));
#endif
M6800CPUContext[0].WriteByte = pHandler;

View File

@ -111,10 +111,10 @@ void M6800Exit();
#define M6803Exit M6800Exit
#define M6801Exit M6800Exit
void M6800SetIRQ(INT32 vector, INT32 status);
void HD63701SetIRQ(INT32 vector, INT32 status);
void M6803SetIRQ(INT32 vector, INT32 status);
void M6801SetIRQ(INT32 vector, INT32 status);
void M6800SetIRQLine(INT32 vector, INT32 status);
void HD63701SetIRQLine(INT32 vector, INT32 status);
void M6803SetIRQLine(INT32 vector, INT32 status);
void M6801SetIRQLine(INT32 vector, INT32 status);
INT32 M6800Run(INT32 cycles);
INT32 HD63701Run(INT32 cycles);
@ -136,15 +136,15 @@ INT32 M6800MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType);
#define M6803MapMemory M6800MapMemory
#define M6801MapMemory M6800MapMemory
void M6800SetReadByteHandler(UINT8 (*pHandler)(UINT16));
#define HD63701SetReadByteHandler M6800SetReadByteHandler
#define M6803SetReadByteHandler M6800SetReadByteHandler
#define M6801SetReadByteHandler M6800SetReadByteHandler
void M6800SetReadHandler(UINT8 (*pHandler)(UINT16));
#define HD63701SetReadHandler M6800SetReadHandler
#define M6803SetReadHandler M6800SetReadHandler
#define M6801SetReadHandler M6800SetReadHandler
void M6800SetWriteByteHandler(void (*pHandler)(UINT16, UINT8));
#define HD63701SetWriteByteHandler M6800SetWriteByteHandler
#define M6803SetWriteByteHandler M6800SetWriteByteHandler
#define M6801SetWriteByteHandler M6800SetWriteByteHandler
void M6800SetWriteHandler(void (*pHandler)(UINT16, UINT8));
#define HD63701SetWriteHandler M6800SetWriteHandler
#define M6803SetWriteHandler M6800SetWriteHandler
#define M6801SetWriteHandler M6800SetWriteHandler
void M6800SetReadOpHandler(UINT8 (*pHandler)(UINT16));
#define HD63701SetReadOpHandler M6800SetReadOpHandler

View File

@ -165,11 +165,11 @@ INT32 M6809GetActive()
return nActiveCPU;
}
void M6809SetIRQ(INT32 vector, INT32 status)
void M6809SetIRQLine(INT32 vector, INT32 status)
{
#if defined FBA_DEBUG
if (!DebugCPU_M6809Initted) bprintf(PRINT_ERROR, _T("M6809SetIRQ called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6809SetIRQ called when no CPU open\n"));
if (!DebugCPU_M6809Initted) bprintf(PRINT_ERROR, _T("M6809SetIRQLine called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6809SetIRQLine called when no CPU open\n"));
#endif
if (status == M6809_IRQSTATUS_NONE) {
@ -235,21 +235,21 @@ INT32 M6809MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType)
}
void M6809SetReadByteHandler(UINT8 (*pHandler)(UINT16))
void M6809SetReadHandler(UINT8 (*pHandler)(UINT16))
{
#if defined FBA_DEBUG
if (!DebugCPU_M6809Initted) bprintf(PRINT_ERROR, _T("M6809SetReadByteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6809SetReadByteHandler called when no CPU open\n"));
if (!DebugCPU_M6809Initted) bprintf(PRINT_ERROR, _T("M6809SetReadHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6809SetReadHandler called when no CPU open\n"));
#endif
m6809CPUContext[nActiveCPU].ReadByte = pHandler;
}
void M6809SetWriteByteHandler(void (*pHandler)(UINT16, UINT8))
void M6809SetWriteHandler(void (*pHandler)(UINT16, UINT8))
{
#if defined FBA_DEBUG
if (!DebugCPU_M6809Initted) bprintf(PRINT_ERROR, _T("M6809SetWriteByteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6809SetWriteByteHandler called when no CPU open\n"));
if (!DebugCPU_M6809Initted) bprintf(PRINT_ERROR, _T("M6809SetWriteHandler called without init\n"));
if (nActiveCPU == -1) bprintf(PRINT_ERROR, _T("M6809SetWriteHandler called when no CPU open\n"));
#endif
m6809CPUContext[nActiveCPU].WriteByte = pHandler;

View File

@ -43,12 +43,12 @@ void M6809Exit();
void M6809Open(INT32 num);
void M6809Close();
INT32 M6809GetActive();
void M6809SetIRQ(INT32 vector, INT32 status);
void M6809SetIRQLine(INT32 vector, INT32 status);
INT32 M6809Run(INT32 cycles);
void M6809RunEnd();
INT32 M6809MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType);
void M6809SetReadByteHandler(UINT8 (*pHandler)(UINT16));
void M6809SetWriteByteHandler(void (*pHandler)(UINT16, UINT8));
void M6809SetReadHandler(UINT8 (*pHandler)(UINT16));
void M6809SetWriteHandler(void (*pHandler)(UINT16, UINT8));
void M6809SetReadOpHandler(UINT8 (*pHandler)(UINT16));
void M6809SetReadOpArgHandler(UINT8 (*pHandler)(UINT16));
INT32 M6809Scan(INT32 nAction);