diff options
Diffstat (limited to 'src/mame/drivers/fidel6502.cpp')
-rw-r--r-- | src/mame/drivers/fidel6502.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index 04ccac69501..94317733908 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -485,6 +485,7 @@ public: DECLARE_WRITE8_MEMBER(sc9_control_w); DECLARE_WRITE8_MEMBER(sc9_led_w); DECLARE_READ8_MEMBER(sc9_input_r); + DECLARE_READ8_MEMBER(sc9d_input_r); DECLARE_MACHINE_RESET(sc9c); DECLARE_INPUT_CHANGED_MEMBER(sc9c_cpu_freq); void sc9c_set_cpu_freq(); @@ -494,7 +495,6 @@ public: DECLARE_READ8_MEMBER(sc12_trampoline_r); DECLARE_WRITE8_MEMBER(sc12_control_w); DECLARE_READ8_MEMBER(sc12_input_r); - DECLARE_READ8_MEMBER(sc12_cart_r); void sc12_set_cpu_freq(offs_t offset); // Excellence @@ -774,6 +774,12 @@ READ8_MEMBER(fidel6502_state::sc9_input_r) return read_inputs(9) ^ 0xff; } +READ8_MEMBER(fidel6502_state::sc9d_input_r) +{ + // a0-a2,d7: multiplexed inputs (active low) + return (read_inputs(9) >> offset & 1) ? 0 : 0x80; +} + void fidel6502_state::sc9c_set_cpu_freq() { // SC9(C01) was released with 1.5MHz, 1.6MHz, or 1.9MHz CPU @@ -841,14 +847,6 @@ READ8_MEMBER(fidel6502_state::sc12_input_r) return (read_inputs(9) >> offset & 1) ? 0 : 0x80; } -READ8_MEMBER(fidel6502_state::sc12_cart_r) -{ - if (m_cart->exists()) - return m_cart->read_rom(space, offset); - else - return 0; -} - /****************************************************************************** @@ -1107,7 +1105,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( eas_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x2000, 0x5fff) AM_READ(sc12_cart_r) + AM_RANGE(0x2000, 0x5fff) AM_READ(cartridge_r) AM_RANGE(0x7000, 0x7003) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) AM_RANGE(0x7020, 0x7027) AM_WRITE(eas_segment_w) AM_READNOP AM_RANGE(0x7030, 0x7037) AM_WRITE(eas_led_w) AM_READNOP @@ -1119,7 +1117,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( eag_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x2000, 0x5fff) AM_READ(sc12_cart_r) + AM_RANGE(0x2000, 0x5fff) AM_READ(cartridge_r) AM_RANGE(0x7000, 0x7003) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) AM_RANGE(0x7020, 0x7027) AM_WRITE(eas_segment_w) AM_READNOP AM_RANGE(0x7030, 0x7037) AM_WRITE(eas_led_w) AM_READNOP @@ -1133,7 +1131,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sc9_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x07ff) AM_MIRROR(0x1800) AM_RAM - AM_RANGE(0x2000, 0x5fff) AM_READ(sc12_cart_r) + AM_RANGE(0x2000, 0x5fff) AM_READ(cartridge_r) AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_WRITE(sc9_control_w) AM_RANGE(0x8000, 0x8007) AM_MIRROR(0x1ff8) AM_WRITE(sc9_led_w) AM_READNOP AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_READ(sc9_input_r) @@ -1141,7 +1139,7 @@ static ADDRESS_MAP_START( sc9_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( sc9d_map, AS_PROGRAM, 8, fidel6502_state ) - AM_RANGE(0xa000, 0xa007) AM_MIRROR(0x1ff8) AM_READ(sc12_input_r) + AM_RANGE(0xa000, 0xa007) AM_MIRROR(0x1ff8) AM_READ(sc9d_input_r) AM_IMPORT_FROM( sc9_map ) ADDRESS_MAP_END @@ -1155,7 +1153,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x0fff) AM_RAM - AM_RANGE(0x2000, 0x5fff) AM_READ(sc12_cart_r) + AM_RANGE(0x2000, 0x5fff) AM_READ(cartridge_r) AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_WRITE(sc12_control_w) AM_RANGE(0x8000, 0x9fff) AM_ROM AM_RANGE(0xa000, 0xa007) AM_MIRROR(0x1ff8) AM_READ(sc12_input_r) |