diff options
Diffstat (limited to 'src/devices/bus/epson_sio/pf10.cpp')
-rw-r--r-- | src/devices/bus/epson_sio/pf10.cpp | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/src/devices/bus/epson_sio/pf10.cpp b/src/devices/bus/epson_sio/pf10.cpp index f986bb5d4c2..bf78ee1ad23 100644 --- a/src/devices/bus/epson_sio/pf10.cpp +++ b/src/devices/bus/epson_sio/pf10.cpp @@ -27,8 +27,6 @@ DEFINE_DEVICE_TYPE(EPSON_PF10, epson_pf10_device, "epson_pf10", "EPSON PF-10 Por void epson_pf10_device::cpu_mem(address_map &map) { - map(0x0000, 0x001f).rw("maincpu", FUNC(hd6303y_cpu_device::m6801_io_r), FUNC(hd6303y_cpu_device::m6801_io_w)); - map(0x0040, 0x00ff).ram(); /* 192 bytes internal ram */ map(0x0800, 0x0fff).ram(); /* external 2k ram */ map(0x1000, 0x17ff).rw(FUNC(epson_pf10_device::fdc_r), FUNC(epson_pf10_device::fdc_w)); map(0x1800, 0x1fff).w(FUNC(epson_pf10_device::fdc_tc_w)); @@ -62,7 +60,7 @@ static void pf10_floppies(device_slot_interface &device) void epson_pf10_device::device_add_mconfig(machine_config &config) { - HD6303Y(config, m_cpu, XTAL(4'915'200)); // HD63A03XF + HD6303X(config, m_cpu, XTAL(4'915'200)); // HD63A03XF m_cpu->set_addrmap(AS_PROGRAM, &epson_pf10_device::cpu_mem); m_cpu->in_p1_cb().set(FUNC(epson_pf10_device::port1_r)); m_cpu->out_p1_cb().set(FUNC(epson_pf10_device::port1_w)); @@ -71,7 +69,7 @@ void epson_pf10_device::device_add_mconfig(machine_config &config) m_cpu->out_ser_tx_cb().set(FUNC(epson_pf10_device::hd6303_tx_w)); UPD765A(config, m_fdc, 4'000'000, false, true); - FLOPPY_CONNECTOR(config, m_floppy, pf10_floppies, "smd165", floppy_image_device::default_floppy_formats); + FLOPPY_CONNECTOR(config, m_floppy, pf10_floppies, "smd165", floppy_image_device::default_mfm_floppy_formats); EPSON_SIO(config, m_sio_output, nullptr); m_sio_output->rx_callback().set(DEVICE_SELF, FUNC(epson_pf10_device::rxc_w)); @@ -109,7 +107,7 @@ epson_pf10_device::epson_pf10_device(const machine_config &mconfig, const char * void epson_pf10_device::device_start() { - m_timer = timer_alloc(0, nullptr); + m_timer = timer_alloc(FUNC(epson_pf10_device::serial_clk_tick), this); } //------------------------------------------------- @@ -118,21 +116,17 @@ void epson_pf10_device::device_start() void epson_pf10_device::device_reset() { - m_timer->adjust(attotime::zero, 0, attotime::from_hz(38400 * 8)); + m_timer->adjust(attotime::zero, 0, attotime::from_hz(38400 * 16)); } //------------------------------------------------- -// device_timer - handler timer events +// serial_clk_tick - tick the CPU's external +// serial clock //------------------------------------------------- -void epson_pf10_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +TIMER_CALLBACK_MEMBER( epson_pf10_device::serial_clk_tick ) { - switch (id) - { - case 0: - m_cpu->m6801_clock_serial(); - break; - } + m_cpu->clock_serial(); } @@ -140,42 +134,42 @@ void epson_pf10_device::device_timer(emu_timer &timer, device_timer_id id, int p // CPU //************************************************************************** -READ8_MEMBER( epson_pf10_device::port1_r ) +uint8_t epson_pf10_device::port1_r() { logerror("%s: port1_r(%02x)\n", tag(), m_port1); return m_port1; } -WRITE8_MEMBER( epson_pf10_device::port1_w ) +void epson_pf10_device::port1_w(uint8_t data) { logerror("%s: port1_w(%02x)\n", tag(), data); } -READ8_MEMBER( epson_pf10_device::port2_r ) +uint8_t epson_pf10_device::port2_r() { logerror("%s: port2_r(%02x)\n", tag(), m_port2); return m_port2; } -WRITE8_MEMBER( epson_pf10_device::port2_w ) +void epson_pf10_device::port2_w(uint8_t data) { if (m_floppy->get_device() != nullptr) m_floppy->get_device()->mon_w(data & PORT2_MON); logerror("%s: port2_w(%02x)\n", tag(), data); } -READ8_MEMBER( epson_pf10_device::fdc_r ) +uint8_t epson_pf10_device::fdc_r(offs_t offset) { logerror("%s: fdc_r @ %04x\n", tag(), offset); return 0xff; } -WRITE8_MEMBER( epson_pf10_device::fdc_w ) +void epson_pf10_device::fdc_w(offs_t offset, uint8_t data) { logerror("%s: fdc_w @ %04x (%02x)\n", tag(), offset, data); } -WRITE8_MEMBER( epson_pf10_device::fdc_tc_w ) +void epson_pf10_device::fdc_tc_w(uint8_t data) { logerror("%s: fdc_tc_w(%02x)\n", tag(), data); } @@ -189,7 +183,7 @@ WRITE8_MEMBER( epson_pf10_device::fdc_tc_w ) // rxc_w - rx input //------------------------------------------------- -WRITE_LINE_MEMBER( epson_pf10_device::rxc_w ) +void epson_pf10_device::rxc_w(int state) { m_rxc = state; m_sio_input->rx_w(m_hd6303_tx & m_rxc); @@ -199,7 +193,7 @@ WRITE_LINE_MEMBER( epson_pf10_device::rxc_w ) // pinc_w - pin input //------------------------------------------------- -WRITE_LINE_MEMBER( epson_pf10_device::pinc_w ) +void epson_pf10_device::pinc_w(int state) { m_pinc = state; m_sio_input->pin_w(m_pinc); @@ -209,7 +203,7 @@ WRITE_LINE_MEMBER( epson_pf10_device::pinc_w ) // hd6303_tx_w - rx output //------------------------------------------------- -WRITE_LINE_MEMBER( epson_pf10_device::hd6303_tx_w ) +void epson_pf10_device::hd6303_tx_w(int state) { m_hd6303_tx = state; m_sio_input->rx_w(m_hd6303_tx & m_rxc); |