mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
(MESS) pc9801: fixed crash on boot. no whatsnew.
(MESS) superfx.c: using a couple of macro were it made sense. no functional change. no whatsnew.
This commit is contained in:
parent
818d25d88c
commit
3ec3c6f2c7
@ -863,7 +863,7 @@ static CPU_EXECUTE( superfx )
|
||||
case 0x04: // ROL
|
||||
{
|
||||
UINT16 carry = *(cpustate->sreg) & 0x8000;
|
||||
superfx_gpr_write(cpustate, cpustate->dreg_idx, (*(cpustate->sreg) << 1) | (SUPERFX_SFR_CY_SET ? 1 : 0));
|
||||
superfx_gpr_write(cpustate, cpustate->dreg_idx, (*(cpustate->sreg) << 1) | SUPERFX_SFR_CY_SET);
|
||||
cpustate->sfr &= ~SUPERFX_SFR_CY;
|
||||
cpustate->sfr |= carry ? SUPERFX_SFR_CY : 0;
|
||||
superfx_dreg_sfr_sz_update(cpustate);
|
||||
@ -1103,7 +1103,7 @@ static CPU_EXECUTE( superfx )
|
||||
cpustate->sfr |= (~(*(cpustate->sreg) ^ cpustate->r[op & 0xf]) & (cpustate->r[op & 0xf] ^ r) & 0x8000) ? SUPERFX_SFR_OV : 0;
|
||||
break;
|
||||
case SUPERFX_SFR_ALT1: // ADC
|
||||
r += cpustate->r[op & 0xf] + ((cpustate->sfr & SUPERFX_SFR_CY) ? 1 : 0);
|
||||
r += cpustate->r[op & 0xf] + SUPERFX_SFR_CY_SET;
|
||||
cpustate->sfr |= (~(*(cpustate->sreg) ^ cpustate->r[op & 0xf]) & (cpustate->r[op & 0xf] ^ r) & 0x8000) ? SUPERFX_SFR_OV : 0;
|
||||
break;
|
||||
case SUPERFX_SFR_ALT2: // ADDI
|
||||
@ -1111,7 +1111,7 @@ static CPU_EXECUTE( superfx )
|
||||
cpustate->sfr |= (~(*(cpustate->sreg) ^ (op & 0xf)) & ((op & 0xf) ^ r) & 0x8000) ? SUPERFX_SFR_OV : 0;
|
||||
break;
|
||||
case SUPERFX_SFR_ALT3: // ADCI
|
||||
r += (op & 0xf) + ((cpustate->sfr & SUPERFX_SFR_CY) ? 1 : 0);
|
||||
r += (op & 0xf) + SUPERFX_SFR_CY_SET;
|
||||
cpustate->sfr |= (~(*(cpustate->sreg) ^ (op & 0xf)) & ((op & 0xf) ^ r) & 0x8000) ? SUPERFX_SFR_OV : 0;
|
||||
break;
|
||||
}
|
||||
@ -1137,7 +1137,7 @@ static CPU_EXECUTE( superfx )
|
||||
superfx_gpr_write(cpustate, cpustate->dreg_idx, r);
|
||||
break;
|
||||
case SUPERFX_SFR_ALT1: // SBC
|
||||
r = *(cpustate->sreg) - cpustate->r[op & 0xf] - ((cpustate->sfr & SUPERFX_SFR_CY) ? 0 : 1);
|
||||
r = *(cpustate->sreg) - cpustate->r[op & 0xf] - SUPERFX_SFR_CY_CLEAR;
|
||||
cpustate->sfr |= ((*(cpustate->sreg) ^ cpustate->r[op & 0xf]) & (*(cpustate->sreg) ^ r) & 0x8000) ? SUPERFX_SFR_OV : 0;
|
||||
superfx_gpr_write(cpustate, cpustate->dreg_idx, r);
|
||||
break;
|
||||
|
@ -2525,11 +2525,11 @@ MACHINE_START_MEMBER(pc9801_state,pc9801)
|
||||
m_rtc->oe_w(1);
|
||||
|
||||
upd765a_device *fdc;
|
||||
fdc = machine().device<upd765a_device>("upd765_2hd");
|
||||
fdc = machine().device<upd765a_device>(":upd765_2hd");
|
||||
fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(pc9801_state::fdc_2hd_irq), this));
|
||||
fdc->setup_drq_cb(upd765a_device::line_cb(FUNC(pc9801_state::fdc_2hd_drq), this));
|
||||
|
||||
fdc = machine().device<upd765a_device>("upd765_2dd");
|
||||
fdc = machine().device<upd765a_device>(":upd765_2dd");
|
||||
fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(pc9801_state::fdc_2dd_irq), this));
|
||||
fdc->setup_drq_cb(upd765a_device::line_cb(FUNC(pc9801_state::fdc_2dd_drq), this));
|
||||
|
||||
@ -2562,10 +2562,13 @@ MACHINE_RESET_MEMBER(pc9801_state,pc9801f)
|
||||
MACHINE_RESET_CALL_MEMBER(pc9801);
|
||||
|
||||
/* 2dd interface ready line is ON by default */
|
||||
floppy_mon_w(floppy_get_device(machine(), 0), CLEAR_LINE);
|
||||
floppy_mon_w(floppy_get_device(machine(), 1), CLEAR_LINE);
|
||||
floppy_drive_set_ready_state(floppy_get_device(machine(), 0), (1), 0);
|
||||
floppy_drive_set_ready_state(floppy_get_device(machine(), 1), (1), 0);
|
||||
floppy_image_device *floppy;
|
||||
floppy = machine().device<floppy_connector>(":upd765_2hd:0")->get_device();
|
||||
if (floppy)
|
||||
floppy->mon_w(CLEAR_LINE);
|
||||
floppy = machine().device<floppy_connector>(":upd765_2hd:1")->get_device();
|
||||
if (floppy)
|
||||
floppy->mon_w(CLEAR_LINE);
|
||||
|
||||
{
|
||||
UINT8 op_mode;
|
||||
|
Loading…
Reference in New Issue
Block a user