diff options
author | 2017-12-22 15:02:20 -0500 | |
---|---|---|
committer | 2017-12-22 15:02:20 -0500 | |
commit | be9fea28e4d6a8860c1bafc228b3a8f174fba8a6 (patch) | |
tree | aca26be7fa1c9ca1958ace27e85d45f18be7016a | |
parent | 80ee9f3d1a0dac8bdba46035683012c11e0b0a58 (diff) |
apollo.cpp updates [Hans Ostermeyer]
- use custom name 'disk' instead of 'harddisk' to preserve previous-MAME compatibility
- fix: function keys didn't work with Num Lock on for SDL2 OSD
-rw-r--r-- | src/devices/bus/isa/omti8621.cpp | 2 | ||||
-rw-r--r-- | src/mame/machine/apollo.cpp | 3 | ||||
-rw-r--r-- | src/mame/machine/apollo_kbd.cpp | 11 | ||||
-rw-r--r-- | src/mame/machine/apollo_kbd.h | 1 |
4 files changed, 15 insertions, 2 deletions
diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index 3490b7ae7fe..176e695169a 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -64,6 +64,8 @@ public: virtual bool is_reset_on_load() const override { return 0; } virtual bool support_command_line_image_creation() const override { return 1; } virtual const char *file_extensions() const override { return "awd"; } + virtual const char *custom_instance_name() const override { return "winchester"; } + virtual const char *custom_brief_instance_name() const override { return "disk"; } virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override; protected: diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp index d13aa342fc2..af04ecc44bb 100644 --- a/src/mame/machine/apollo.cpp +++ b/src/mame/machine/apollo.cpp @@ -1316,7 +1316,8 @@ void apollo_stdio_device::device_reset() void apollo_stdio_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - device_serial_interface::device_timer(timer, id, param, ptr); +// FIXME? +// device_serial_interface::device_timer(timer, id, param, ptr); } void apollo_stdio_device::rcv_complete() // Rx completed receiving byte diff --git a/src/mame/machine/apollo_kbd.cpp b/src/mame/machine/apollo_kbd.cpp index 7db85daf53b..84202ca0a73 100644 --- a/src/mame/machine/apollo_kbd.cpp +++ b/src/mame/machine/apollo_kbd.cpp @@ -112,6 +112,7 @@ void apollo_kbd_device::device_reset() m_delay = 500; m_repeat = 33; m_last_pressed = 0; + m_numlock_state = 0; memset(m_keytime, 0, sizeof(m_keytime)); memset(m_keyon, 0, sizeof(m_keyon)); @@ -522,7 +523,15 @@ int apollo_kbd_device::push_scancode(uint8_t code, uint8_t repeat) } #if MAP_APOLLO_KEYS - if (numlock) + + // FIXME: numlock was ok for MAME with SDL1.2 but never worked for MAME with SDL2 + // nasty hack: we toggle the numlock state from the numlock Key Up transition (starting with 0 for numlock off) + if (code == 0xe6) + m_numlock_state = !m_numlock_state; + + LOG1(("scan_code = 0x%02x numlock = %d numlock_state = %d", code, numlock, m_numlock_state)); + + if (m_numlock_state) { // don't map function keys to Apollo left keypad switch (code) diff --git a/src/mame/machine/apollo_kbd.h b/src/mame/machine/apollo_kbd.h index 5097e95b722..b45fb32f212 100644 --- a/src/mame/machine/apollo_kbd.h +++ b/src/mame/machine/apollo_kbd.h @@ -147,6 +147,7 @@ private: uint16_t m_delay; // key press delay after initial press uint16_t m_repeat; // key press repeat rate uint16_t m_last_pressed; // last key pressed, for repeat key handling + uint16_t m_numlock_state; // current num lock state int m_keytime[0x80]; // time until next key press (1 ms) uint8_t m_keyon[0x80]; // is 1 if key is pressed |