From fb263d93d3ccdc4586d8127f3c4ff11663412b4d Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 26 Sep 2023 20:25:00 +0200 Subject: korg/korgm1.cpp: identify some keys --- src/mame/korg/korgm1.cpp | 60 +++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/mame/korg/korgm1.cpp b/src/mame/korg/korgm1.cpp index 5e19a0b9561..a36a71b45dd 100644 --- a/src/mame/korg/korgm1.cpp +++ b/src/mame/korg/korgm1.cpp @@ -1,6 +1,6 @@ // license:BSD-3-Clause // copyright-holders:Angelo Salese, AJR -/*************************************************************************** +/************************************************************************************************** Korg M1 (c) 1988 @@ -13,7 +13,7 @@ Notes: - MCR-04, 1024 kB x 4 banks - Radiusz Bee-Card, custom made multibank card with rotary knob, 16 x 32 kB/8 x 64 kB/4 x 128 kB -***************************************************************************/ +**************************************************************************************************/ #include "emu.h" #include "cpu/nec/v5x.h" @@ -58,7 +58,7 @@ private: void korgm1_map(address_map &map); void korgm1_io(address_map &map); - void palette_init_korgm1(palette_device &palette); + void palette_init(palette_device &palette); // devices required_device m_maincpu; @@ -91,6 +91,7 @@ void korgm1_state::pio_pa_w(u8 data) u8 korgm1_state::panel_sw_r() { + // PB6: to pin 32 of Bee Card (Card St.), 0 = card inserted return 0xc0 | m_panel_sw[m_selected_sw].read_safe(0x3f); } @@ -129,25 +130,26 @@ static INPUT_PORTS_START( korgm1 ) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW1") PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW5") PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW2") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW6") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("COMBI Mode key (SW6)") PORT_START("Y1") PORT_BIT(0x03, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW3") PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW7") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW4") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW8") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW4") // tight loops waiting for an irq, if bypassed goes in "New Song" mode + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("GLOBAL Mode key (SW8)") PORT_START("Y2") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW9") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW10") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW11") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW12") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW13") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW14") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Key Up (SW9)") PORT_CODE(KEYCODE_UP) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Key Down (SW10)") PORT_CODE(KEYCODE_DOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor A (SW11)") PORT_CODE(KEYCODE_1) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor B (SW12)") PORT_CODE(KEYCODE_2) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor C (SW13)") PORT_CODE(KEYCODE_3) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor D (SW14)") PORT_CODE(KEYCODE_4) PORT_START("Y3") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW15") + // Freezes decimal digits when editing function (stands on LEFT of 0 key) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Bank Hold key (SW15)") PORT_CODE(KEYCODE_ENTER_PAD) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW16") PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW17") PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW18") @@ -155,26 +157,26 @@ static INPUT_PORTS_START( korgm1 ) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW20") PORT_START("Y4") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW31") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW27") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW28") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW29") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW24") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 0 (SW31)") PORT_CODE(KEYCODE_0_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 1 (SW27)") PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 2 (SW28)") PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 3 (SW29)") PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 4 (SW24)") PORT_CODE(KEYCODE_4_PAD) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("Y5") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW25") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW26") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW21") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW22") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW23") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 5 (SW25)") PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 6 (SW26)") PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 7 (SW21)") PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 8 (SW22)") PORT_CODE(KEYCODE_8_PAD) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Keypad 9 (SW23)") PORT_CODE(KEYCODE_9_PAD) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("Y6") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW30") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW32") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW33") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SW34") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor E (SW30)") PORT_CODE(KEYCODE_5) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor F (SW32)") PORT_CODE(KEYCODE_6) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor G (SW33)") PORT_CODE(KEYCODE_7) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Cursor H (SW34)") PORT_CODE(KEYCODE_8) PORT_BIT(0x30, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END @@ -189,7 +191,7 @@ void korgm1_state::machine_reset() } -void korgm1_state::palette_init_korgm1(palette_device &palette) +void korgm1_state::palette_init(palette_device &palette) { palette.set_pen_color(0, rgb_t( 69, 63, 66)); palette.set_pen_color(1, rgb_t(131, 136, 139)); @@ -228,7 +230,7 @@ void korgm1_state::korgm1(machine_config &config) screen.set_visarea_full(); screen.set_palette("palette"); - PALETTE(config, "palette", FUNC(korgm1_state::palette_init_korgm1), 2); + PALETTE(config, "palette", FUNC(korgm1_state::palette_init), 2); HD44780(config, m_lcdc, 0); m_lcdc->set_lcd_size(2, 40); -- cgit v1.2.3