From f6053b1e7d0b372ac24cfecdd07af4d973473ec4 Mon Sep 17 00:00:00 2001 From: shattered Date: Tue, 15 Feb 2022 16:25:09 +0000 Subject: Minor code cleanup; moved 'krokha' to arcade section. (#9262) --- src/mame/arcade.flt | 1 + src/mame/drivers/bitgraph.cpp | 2 +- src/mame/drivers/blit.cpp | 2 +- src/mame/drivers/dvk_kcgd.cpp | 2 +- src/mame/drivers/dvk_ksm.cpp | 2 +- src/mame/drivers/ec184x.cpp | 2 +- src/mame/drivers/eurocom2.cpp | 2 +- src/mame/drivers/gridcomp.cpp | 2 +- src/mame/drivers/hp95lx.cpp | 2 +- src/mame/drivers/ibm6580.cpp | 2 +- src/mame/drivers/krokha.cpp | 13 ++++++----- src/mame/drivers/ms0515.cpp | 2 +- src/mame/drivers/ms6102.cpp | 2 +- src/mame/drivers/poisk1.cpp | 2 +- src/mame/drivers/sm7238.cpp | 42 +++++++++++++++------------------ src/mame/drivers/superga2.cpp | 38 +++++++++++++++--------------- src/mame/drivers/tosh1000.cpp | 2 +- src/mame/machine/km035.cpp | 54 +++++++++++-------------------------------- src/mame/machine/km035.h | 5 +--- src/mame/mess.flt | 1 - 20 files changed, 73 insertions(+), 107 deletions(-) diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt index 3a15176d3e1..d63174a136c 100644 --- a/src/mame/arcade.flt +++ b/src/mame/arcade.flt @@ -669,6 +669,7 @@ kontest.cpp kopunch.cpp kpontoon.cpp kpython.cpp +krokha.cpp ksayakyu.cpp ksys573.cpp kungfur.cpp diff --git a/src/mame/drivers/bitgraph.cpp b/src/mame/drivers/bitgraph.cpp index a7101206a7b..02230139c0e 100644 --- a/src/mame/drivers/bitgraph.cpp +++ b/src/mame/drivers/bitgraph.cpp @@ -82,7 +82,7 @@ #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGPIA(...) LOGMASKED(LOG_PIA, __VA_ARGS__) diff --git a/src/mame/drivers/blit.cpp b/src/mame/drivers/blit.cpp index d75273aa559..c1aef0bceb8 100644 --- a/src/mame/drivers/blit.cpp +++ b/src/mame/drivers/blit.cpp @@ -49,7 +49,7 @@ #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGPIA(...) LOGMASKED(LOG_PIA, __VA_ARGS__) diff --git a/src/mame/drivers/dvk_kcgd.cpp b/src/mame/drivers/dvk_kcgd.cpp index a4f3d5a787e..f5721346792 100644 --- a/src/mame/drivers/dvk_kcgd.cpp +++ b/src/mame/drivers/dvk_kcgd.cpp @@ -63,7 +63,7 @@ static constexpr int KCGD_PAGE_1 = 005574; #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGVRAM(...) LOGMASKED(LOG_VRAM, __VA_ARGS__) diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp index 607c4ddf932..a0d1c776757 100644 --- a/src/mame/drivers/dvk_ksm.cpp +++ b/src/mame/drivers/dvk_ksm.cpp @@ -84,7 +84,7 @@ static constexpr int KSM_STATUSLINE_VRAM = 0xF8B0; #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp index 04cc0ee5ac7..cad90a9e95f 100644 --- a/src/mame/drivers/ec184x.cpp +++ b/src/mame/drivers/ec184x.cpp @@ -30,7 +30,7 @@ #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) diff --git a/src/mame/drivers/eurocom2.cpp b/src/mame/drivers/eurocom2.cpp index 00f75a8f6b6..eb49331f07f 100644 --- a/src/mame/drivers/eurocom2.cpp +++ b/src/mame/drivers/eurocom2.cpp @@ -57,7 +57,7 @@ static constexpr int VC_DISP_VERT = 256; #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) diff --git a/src/mame/drivers/gridcomp.cpp b/src/mame/drivers/gridcomp.cpp index c21df36d8cb..3b7c0bb294e 100644 --- a/src/mame/drivers/gridcomp.cpp +++ b/src/mame/drivers/gridcomp.cpp @@ -88,7 +88,7 @@ #define LOG_DEBUG (1U << 2) #define VERBOSE (LOG_GENERAL) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) diff --git a/src/mame/drivers/hp95lx.cpp b/src/mame/drivers/hp95lx.cpp index 6d837e8057b..260d04329b5 100644 --- a/src/mame/drivers/hp95lx.cpp +++ b/src/mame/drivers/hp95lx.cpp @@ -81,7 +81,7 @@ #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_GENERAL) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) diff --git a/src/mame/drivers/ibm6580.cpp b/src/mame/drivers/ibm6580.cpp index 8c5838cd0e6..f73ad8928a4 100644 --- a/src/mame/drivers/ibm6580.cpp +++ b/src/mame/drivers/ibm6580.cpp @@ -181,7 +181,7 @@ Notes on floppy drive: #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) diff --git a/src/mame/drivers/krokha.cpp b/src/mame/drivers/krokha.cpp index 399f29c69a3..f1b7f5aa502 100644 --- a/src/mame/drivers/krokha.cpp +++ b/src/mame/drivers/krokha.cpp @@ -28,6 +28,7 @@ #include "cpu/i8085/i8085.h" #include "sound/spkrdev.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -121,7 +122,7 @@ uint32_t krokha_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap uint16_t ma = 0xe0 + y; for (uint8_t ra = 0; ra < 8; ra++) { - for (uint16_t x = ma; x < ma + 64*32; x += 32) + for (uint16_t x = ma; x < ma + 64 * 32; x += 32) { uint16_t chr = m_p_videoram[x] << 3; uint8_t gfx = m_p_chargen[chr | ra]; @@ -146,9 +147,9 @@ void krokha_state::krokha(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(50); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // XXX - m_screen->set_size(64*8, 32*8); - m_screen->set_visarea(9*8, (48+9)*8-1, 0*8, 32*8-1); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); + m_screen->set_size(64 * 8, 32 * 8); + m_screen->set_visarea(9 * 8, (48 + 9) * 8 - 1, 0 * 8, 32 * 8 - 1); m_screen->set_screen_update(FUNC(krokha_state::screen_update)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_IRQ0); @@ -169,5 +170,5 @@ ROM_END /* Driver */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP( 1990, krokha, 0, 0, krokha, krokha, krokha_state, empty_init, "SKB Kontur", "Krokha", 0 ) +// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT, COMPANY FULLNAME +GAME( 1990, krokha, 0, krokha, krokha, krokha_state, empty_init, ROT0, "SKB Kontur", "Krokha", 0 ) diff --git a/src/mame/drivers/ms0515.cpp b/src/mame/drivers/ms0515.cpp index 63fc8d2ba9e..8bb0c34c5ba 100644 --- a/src/mame/drivers/ms0515.cpp +++ b/src/mame/drivers/ms0515.cpp @@ -53,7 +53,7 @@ #define LOG_SYSREG (1U << 2) //#define VERBOSE (LOG_GENERAL | LOG_BANK | LOG_SYSREG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGBANK(format, ...) LOGMASKED(LOG_BANK, "%11.6f at %s: " format, machine().time().as_double(), machine().describe_context(), __VA_ARGS__) diff --git a/src/mame/drivers/ms6102.cpp b/src/mame/drivers/ms6102.cpp index df750d1e3b0..a9dc17d9a51 100644 --- a/src/mame/drivers/ms6102.cpp +++ b/src/mame/drivers/ms6102.cpp @@ -50,7 +50,7 @@ #define VERBOSE (LOG_GENERAL) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" diff --git a/src/mame/drivers/poisk1.cpp b/src/mame/drivers/poisk1.cpp index 9e499ce26e7..27c2d5369d5 100644 --- a/src/mame/drivers/poisk1.cpp +++ b/src/mame/drivers/poisk1.cpp @@ -48,7 +48,7 @@ #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) diff --git a/src/mame/drivers/sm7238.cpp b/src/mame/drivers/sm7238.cpp index 037dbee0c1f..4cf7648a552 100644 --- a/src/mame/drivers/sm7238.cpp +++ b/src/mame/drivers/sm7238.cpp @@ -11,6 +11,7 @@ - graphics options - colors - document hardware and ROM variants, verify if pixel stretching is done + - verify blink frequency ****************************************************************************/ @@ -21,26 +22,27 @@ #include "machine/bankdev.h" #include "machine/clock.h" #include "machine/i8251.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" #include "machine/km035.h" #include "machine/nvram.h" +#include "machine/pic8259.h" +#include "machine/pit8253.h" + #include "emupal.h" #include "screen.h" -//#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf -#include "logmacro.h" +static constexpr int KSM_COLUMNS_MAX = 132; +static constexpr int KSM_TOTAL_HORZ = KSM_COLUMNS_MAX * 10; +static constexpr int KSM_DISP_HORZ = KSM_COLUMNS_MAX * 8; -#define KSM_COLUMNS_MAX 132 +static constexpr int KSM_TOTAL_VERT = 260; +static constexpr int KSM_DISP_VERT = 250; -#define KSM_TOTAL_HORZ (KSM_COLUMNS_MAX*10) -#define KSM_DISP_HORZ (KSM_COLUMNS_MAX*8) -#define KSM_TOTAL_VERT 260 -#define KSM_DISP_VERT 250 +//#define VERBOSE (LOG_DEBUG) +//#define LOG_OUTPUT_FUNC osd_printf_info +#include "logmacro.h" class sm7238_state : public driver_device @@ -68,8 +70,6 @@ public: , m_screen(*this, "screen") { } - static constexpr feature_type unemulated_features() { return feature::KEYBOARD; } - void sm7238(machine_config &config); private: @@ -97,7 +97,7 @@ private: } m_video; virtual void machine_reset() override; - virtual void video_start() override; + required_device m_maincpu; required_device m_nvram; required_device m_videobank; @@ -156,10 +156,6 @@ void sm7238_state::machine_reset() m_videobank->set_bank(0); } -void sm7238_state::video_start() -{ -} - void sm7238_state::control_w(uint8_t data) { LOG("Control Write: %02xh: lut %d nvram %d c2 %d iack %d\n", @@ -237,7 +233,7 @@ uint32_t sm7238_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap uint8_t ctl2 = 0; uint16_t sy = 0, ma = 0; bool double_width = false, double_height = false, bottom_half = false; - bool blink((m_screen->frame_number() % 30) > 14); // XXX guess + bool blink((m_screen->frame_number() % 30) > 14); for (uint8_t y = 0; y < 26; y++) { @@ -356,7 +352,7 @@ GFXDECODE_END void sm7238_state::sm7238(machine_config &config) { - I8080(config, m_maincpu, 16.5888_MHz_XTAL/9); + I8080(config, m_maincpu, 16.5888_MHz_XTAL / 9); m_maincpu->set_addrmap(AS_PROGRAM, &sm7238_state::sm7238_mem); m_maincpu->set_addrmap(AS_IO, &sm7238_state::sm7238_io); m_maincpu->in_inta_func().set("pic8259", FUNC(pic8259_device::acknowledge)); @@ -378,19 +374,19 @@ void sm7238_state::sm7238(machine_config &config) m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); PIT8253(config, m_t_hblank, 0); - m_t_hblank->set_clk<1>(16.384_MHz_XTAL/9); // XXX workaround -- keyboard is slower and doesn't sync otherwise + m_t_hblank->set_clk<1>(16.384_MHz_XTAL / 9); // FIXME -- keyboard is slower and doesn't sync otherwise m_t_hblank->out_handler<1>().set(FUNC(sm7238_state::write_keyboard_clock)); PIT8253(config, m_t_vblank, 0); - m_t_vblank->set_clk<2>(16.5888_MHz_XTAL/9); + m_t_vblank->set_clk<2>(16.5888_MHz_XTAL / 9); m_t_vblank->out_handler<2>().set(FUNC(sm7238_state::write_printer_clock)); PIT8253(config, m_t_color, 0); PIT8253(config, m_t_iface, 0); - m_t_iface->set_clk<1>(16.5888_MHz_XTAL/9); + m_t_iface->set_clk<1>(16.5888_MHz_XTAL / 9); m_t_iface->out_handler<1>().set(m_i8251line, FUNC(i8251_device::write_txc)); - m_t_iface->set_clk<2>(16.5888_MHz_XTAL/9); + m_t_iface->set_clk<2>(16.5888_MHz_XTAL / 9); m_t_iface->out_handler<2>().set(m_i8251line, FUNC(i8251_device::write_rxc)); // serial connection to host diff --git a/src/mame/drivers/superga2.cpp b/src/mame/drivers/superga2.cpp index e8806a89cb5..75f7edd4f3b 100644 --- a/src/mame/drivers/superga2.cpp +++ b/src/mame/drivers/superga2.cpp @@ -2,7 +2,7 @@ // copyright-holders:R. Belmont, Sergey Svishchev /*************************************************************************** - Super Games ][ + Nippel Super Games ][ An arcade board designed to run modified games from Apple ][. Most of Apple hardware is missing, keyboard port is reused for joysticks. @@ -39,15 +39,15 @@ class superga2_state : public driver_device { public: - superga2_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, A2_CPU_TAG), - m_screen(*this, "screen"), - m_ram(*this, RAM_TAG), - m_video(*this, A2_VIDEO_TAG), - m_a2common(*this, "a2common"), - m_speaker(*this, "speaker"), - m_softlatch(*this, "softlatch") + superga2_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, A2_CPU_TAG) + , m_screen(*this, "screen") + , m_ram(*this, RAM_TAG) + , m_video(*this, A2_VIDEO_TAG) + , m_a2common(*this, "a2common") + , m_speaker(*this, "speaker") + , m_softlatch(*this, "softlatch") { } static constexpr feature_type imperfect_features() { return feature::PALETTE; } @@ -72,8 +72,8 @@ public: uint8_t switches_r(offs_t offset); uint8_t reset_r(offs_t offset); - void kuzmich(machine_config &config); - void kuzmich_map(address_map &map); + void superga2(machine_config &config); + void superga2_map(address_map &map); private: int m_speaker_state; @@ -185,7 +185,7 @@ void superga2_state::ram_w(offs_t offset, uint8_t data) } } -void superga2_state::kuzmich_map(address_map &map) +void superga2_state::superga2_map(address_map &map) { map(0x0000, 0xbfff).rw(FUNC(superga2_state::ram_r), FUNC(superga2_state::ram_w)); map(0xc000, 0xc000).mirror(0xf).portr("P1").nopw(); @@ -198,7 +198,7 @@ void superga2_state::kuzmich_map(address_map &map) INPUT PORTS ***************************************************************************/ -static INPUT_PORTS_START( kuzmich ) +static INPUT_PORTS_START( superga2 ) PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) @@ -210,11 +210,11 @@ static INPUT_PORTS_START( kuzmich ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) INPUT_PORTS_END -void superga2_state::kuzmich(machine_config &config) +void superga2_state::superga2(machine_config &config) { /* basic machine hardware */ M6502(config, m_maincpu, 1021800); - m_maincpu->set_addrmap(AS_PROGRAM, &superga2_state::kuzmich_map); + m_maincpu->set_addrmap(AS_PROGRAM, &superga2_state::superga2_map); APPLE2_VIDEO(config, m_video, XTAL(14'318'181)).set_screen(m_screen); APPLE2_COMMON(config, m_a2common, XTAL(14'318'181)); @@ -229,7 +229,7 @@ void superga2_state::kuzmich(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); /* soft switches */ - F9334(config, m_softlatch); // F14 (labeled 74LS259 on some boards and in the Apple ][ Reference Manual) + F9334(config, m_softlatch); m_softlatch->q_out_cb<0>().set(m_video, FUNC(a2_video_device::txt_w)); m_softlatch->q_out_cb<1>().set(m_video, FUNC(a2_video_device::mix_w)); m_softlatch->q_out_cb<2>().set(m_video, FUNC(a2_video_device::scr_w)); @@ -251,5 +251,5 @@ ROM_START(kuzmich) ROM_LOAD("ke.bin", 0x0000, 0x8000, CRC(102d246b) SHA1(492dcdf0cc31190a97057a69010e2c9c23b6e59d)) ROM_END -// YEAR NAME PARENT MACHINE INPUT CLASS INIT COMPANY FULLNAME -GAME( 199?, kuzmich, 0, kuzmich, kuzmich, superga2_state, empty_init, ROT0, "Nippel", "Kuzmich-Egorych", MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT, COMPANY FULLNAME +GAME( 199?, kuzmich, 0, superga2, superga2, superga2_state, empty_init, ROT0, "Nippel", "Kuzmich-Egorych", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/tosh1000.cpp b/src/mame/drivers/tosh1000.cpp index 90edf5c7684..15871eb5e52 100644 --- a/src/mame/drivers/tosh1000.cpp +++ b/src/mame/drivers/tosh1000.cpp @@ -57,7 +57,7 @@ #define LOG_DEBUG (1U << 2) //#define VERBOSE (LOG_DEBUG) -//#define LOG_OUTPUT_FUNC printf +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" diff --git a/src/mame/machine/km035.cpp b/src/mame/machine/km035.cpp index cda51fb4ce8..c233717a9c6 100644 --- a/src/mame/machine/km035.cpp +++ b/src/mame/machine/km035.cpp @@ -60,12 +60,12 @@ void km035_device::device_add_mconfig(machine_config &config) I8035(config, m_maincpu, XTAL(4'608'000)); m_maincpu->set_addrmap(AS_PROGRAM, &km035_device::km035_map); m_maincpu->bus_out_cb().set(FUNC(km035_device::bus_w)); - m_maincpu->p1_in_cb().set(FUNC(km035_device::p1_r)); + m_maincpu->p1_in_cb().set([this] () { return m_p1; }); m_maincpu->p1_out_cb().set(FUNC(km035_device::p1_w)); - m_maincpu->p2_in_cb().set(FUNC(km035_device::p2_r)); + m_maincpu->p2_in_cb().set([this] () { return m_p2; }); m_maincpu->p2_out_cb().set(FUNC(km035_device::p2_w)); - m_maincpu->t0_in_cb().set(FUNC(km035_device::t0_r)); - m_maincpu->t1_in_cb().set(FUNC(km035_device::t1_r)); + m_maincpu->t0_in_cb().set([this] () { return m_keylatch; }); + m_maincpu->t1_in_cb().set([this] () { return m_rx; }); SPEAKER(config, "mono").front_center(); BEEP(config, m_speaker, 3250).add_route(ALL_OUTPUTS, "mono", 0.50); @@ -248,7 +248,7 @@ INPUT_PORTS_END ioport_constructor km035_device::device_input_ports() const { - return INPUT_PORTS_NAME( km035 ); + return INPUT_PORTS_NAME(km035); } //************************************************************************** @@ -260,12 +260,12 @@ ioport_constructor km035_device::device_input_ports() const //------------------------------------------------- km035_device::km035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, KM035, tag, owner, clock), - m_maincpu(*this, KM035_CPU_TAG), - m_speaker(*this, KM035_SPK_TAG), - m_kbd(*this, "KBD%u", 0), - m_tx_handler(*this), - m_rts_handler(*this) + : device_t(mconfig, KM035, tag, owner, clock) + , m_maincpu(*this, KM035_CPU_TAG) + , m_speaker(*this, KM035_SPK_TAG) + , m_kbd(*this, "KBD%u", 0) + , m_tx_handler(*this) + , m_rts_handler(*this) { } @@ -290,7 +290,7 @@ void km035_device::device_reset() } -WRITE_LINE_MEMBER( km035_device::write_rxd ) +WRITE_LINE_MEMBER(km035_device::write_rxd) { LOG("write_rxd %d\n", state); m_maincpu->set_input_line(MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE); @@ -320,7 +320,7 @@ void km035_device::p1_w(uint8_t data) LOGDBG("p1_w %02x = row %d col %d tx %d\n", data, (data>>4)&15, data&7, !BIT(data, 3)); m_p1 = data; - sense = m_kbd[(data>>4) & 15]->read(); + sense = m_kbd[(data >> 4) & 15]->read(); m_keylatch = BIT(sense, (data & 7)); if (m_keylatch) LOG("keypress at row %d col %d\n", (data>>4)&15, data&7); @@ -335,16 +335,6 @@ void km035_device::p2_w(uint8_t data) m_p2 = data; } -uint8_t km035_device::p1_r() -{ - return m_p1; -} - -uint8_t km035_device::p2_r() -{ - return m_p2; -} - //------------------------------------------------- // bus_w - //------------------------------------------------- @@ -353,21 +343,3 @@ void km035_device::bus_w(uint8_t data) { LOGDBG("bus_w %02x\n", data); } - -//------------------------------------------------- -// t0_r - -//------------------------------------------------- - -READ_LINE_MEMBER( km035_device::t0_r ) -{ - return m_keylatch; -} - -//------------------------------------------------- -// t1_r - -//------------------------------------------------- - -READ_LINE_MEMBER( km035_device::t1_r ) -{ - return m_rx; -} diff --git a/src/mame/machine/km035.h b/src/mame/machine/km035.h index e3f1823f97d..4d342737c23 100644 --- a/src/mame/machine/km035.h +++ b/src/mame/machine/km035.h @@ -27,6 +27,7 @@ public: DECLARE_WRITE_LINE_MEMBER( write_rxd ); void km035_map(address_map &map); + protected: // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -52,10 +53,6 @@ private: void bus_w(uint8_t data); void p1_w(uint8_t data); void p2_w(uint8_t data); - uint8_t p1_r(); - uint8_t p2_r(); - DECLARE_READ_LINE_MEMBER( t0_r ); - DECLARE_READ_LINE_MEMBER( t1_r ); }; // device type definition diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 9811701cdca..459a0456d2e 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -528,7 +528,6 @@ korgm1.cpp korgws.cpp korgz3.cpp kramermc.cpp -krokha.cpp kron.cpp krz2000.cpp ktm3.cpp -- cgit v1.2.3