diff options
Diffstat (limited to 'src/mame/drivers/hp9845.cpp')
-rw-r--r-- | src/mame/drivers/hp9845.cpp | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp index b104ef1e7b7..f8a20913c4d 100644 --- a/src/mame/drivers/hp9845.cpp +++ b/src/mame/drivers/hp9845.cpp @@ -25,7 +25,6 @@ // - Correct character generator ROMs (a huge "thank you" to Ansgar Kueckes for the dumps!) // - 98775 light pen controller // - Display softkeys on 45C & 45T -// - HLE of integral printer // What's not yet in: // - Better naming of tape drive image (it's now "magt1" and "magt2", should be "t15" and "t14") // - Better documentation of this file @@ -33,6 +32,7 @@ // - Speed, as usual // - Light pen tracing sometimes behaves erratically in 45C and 45T // What will probably never be in: +// - Integral printer (firmware and character generator ROMs are very difficult to dump) // - Fast LPU processor (dump of microcode PROMs is not available) #include "emu.h" @@ -48,7 +48,6 @@ #include "hp9845b.lh" -#include "machine/hp9845_printer.h" // Debugging #define VERBOSE 0 @@ -188,7 +187,6 @@ constexpr unsigned LP_FOV = 9; // Field of view constexpr unsigned LP_XOFFSET = 5; // x-offset of LP (due to delay in hit recognition) // Peripheral Addresses (PA) -#define PRINTER_PA 0 #define IO_SLOT_FIRST_PA 1 #define IO_SLOT_LAST_PA 12 #define GVIDEO_PA 13 @@ -525,8 +523,6 @@ void hp9845_base_state::machine_reset() m_beeper->set_state(0); - m_prt_irl = false; - logerror("STS=%04x FLG=%04x\n" , m_sts_status , m_flg_status); } @@ -712,8 +708,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp9845_base_state::kb_scan) // Key pressed, store scancode & generate IRL //logerror("idx=%u msl=%d\n" , max_seq_idx , max_seq_len); m_kb_scancode = max_seq_idx; + irq_w(0 , 1); BIT_SET(m_kb_status, 0); - update_kb_prt_irq(); // Special case: pressing stop key sets LPU "status" flag if (max_seq_idx == 0x47) { @@ -736,8 +732,8 @@ READ16_MEMBER(hp9845_base_state::kb_status_r) WRITE16_MEMBER(hp9845_base_state::kb_irq_clear_w) { + irq_w(0 , 0); BIT_CLR(m_kb_status, 0); - update_kb_prt_irq(); m_lpu->status_w(0); if (BIT(data , 15)) { @@ -747,12 +743,6 @@ WRITE16_MEMBER(hp9845_base_state::kb_irq_clear_w) } } -void hp9845_base_state::update_kb_prt_irq() -{ - bool state = BIT(m_kb_status , 0) || m_prt_irl; - irq_w(0 , state); -} - TIMER_DEVICE_CALLBACK_MEMBER(hp9845_base_state::beeper_off) { m_beeper->set_state(0); @@ -766,22 +756,6 @@ WRITE8_MEMBER(hp9845_base_state::pa_w) } } -WRITE_LINE_MEMBER(hp9845_base_state::prt_irl_w) -{ - m_prt_irl = state; - update_kb_prt_irq(); -} - -WRITE_LINE_MEMBER(hp9845_base_state::prt_flg_w) -{ - flg_w(PRINTER_PA , state); -} - -WRITE_LINE_MEMBER(hp9845_base_state::prt_sts_w) -{ - sts_w(PRINTER_PA , state); -} - WRITE_LINE_MEMBER(hp9845_base_state::t14_irq_w) { irq_w(T14_PA , state); @@ -1072,7 +1046,7 @@ void hp9845b_state::video_fill_buff(bool buff_idx) // Limit on accesses per row reached break; } - m_video_word = prog_space.read_word(m_video_mar); + m_video_word = prog_space.read_word(m_video_mar << 1); if (m_video_load_mar) { // Load new address into MAR after start of a new frame or NWA instruction if (m_video_first_mar) { @@ -1646,7 +1620,7 @@ void hp9845ct_base_state::video_fill_buff(bool buff_idx) // Limit on accesses per row reached break; } - m_video_word = prog_space.read_word(m_video_mar); + m_video_word = prog_space.read_word(m_video_mar << 1); if (m_video_load_mar) { // Load new address into MAR after start of a new frame or NWA instruction if (m_video_first_mar) { @@ -3721,9 +3695,6 @@ ADDRESS_MAP_END static ADDRESS_MAP_START(ppu_io_map , AS_IO , 16 , hp9845_base_state) ADDRESS_MAP_UNMAP_LOW - // PA = 0, IC = 0..1 - // Internal printer - AM_RANGE(HP_MAKE_IOADDR(PRINTER_PA , 0) , HP_MAKE_IOADDR(PRINTER_PA , 1)) AM_DEVREADWRITE("printer" , hp9845_printer_device , printer_r , printer_w) // PA = 0, IC = 2 // Keyboard scancode input AM_RANGE(HP_MAKE_IOADDR(0 , 2) , HP_MAKE_IOADDR(0 , 2)) AM_READ(kb_scancode_r) @@ -3820,12 +3791,6 @@ static MACHINE_CONFIG_START(hp9845_base) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("192K") MCFG_RAM_EXTRA_OPTIONS("64K, 320K, 448K") - - // Internal printer - MCFG_DEVICE_ADD("printer" , HP9845_PRINTER , 0) - MCFG_9845PRT_IRL_HANDLER(WRITELINE(hp9845_base_state , prt_irl_w)) - MCFG_9845PRT_FLG_HANDLER(WRITELINE(hp9845_base_state , prt_flg_w)) - MCFG_9845PRT_STS_HANDLER(WRITELINE(hp9845_base_state , prt_sts_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_START(hp9845b) |