Skip to content

Commit

Permalink
misc: small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
happppp committed Dec 24, 2023
1 parent d7106cd commit d326423
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 54 deletions.
1 change: 1 addition & 0 deletions src/mame/chess/ave_arb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Auto Response Board (ARB) overview:
The electronic magnetic chessboard is the first of its kind. AVE later licensed
it to Fidelity (see fidelity/elite.cpp).
ARB is a romless system, the program ROM is on a cartridge.
Known chess modules:
Expand Down
10 changes: 5 additions & 5 deletions src/mame/chess/regence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,23 @@ void regence_state::main_map(address_map &map)
Input Ports
*******************************************************************************/

static INPUT_PORTS_START( regence )
static INPUT_PORTS_START( regence ) // see comments for German version labels
PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Changement de Position (Set Up)") // Veränderung
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME(u8"Retour en Arrière (Take Back)") // Zug Zurück
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("Nouvelle Partie (New Game)") // Neues Spiel (press after setup)
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("Nouvelle Partie (New Game)") // Neues Spiel (press after setup)
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("King")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Queen")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Rook")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Bishop")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)

PORT_START("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Son (Sound)") // Ton
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Son (Sound)") // Ton
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Niveau (Level)") // Stufe
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_CODE(KEYCODE_H) PORT_NAME("Marche/Arret (Move/Halt)") // Zug-Halt
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Noir (Black)") // Schwarz
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Blanc (White)") // Weiss
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Noir (Black)") // Schwarz
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Blanc (White)") // Weiss
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Pawn")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Knight")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
Expand Down
35 changes: 17 additions & 18 deletions src/mame/fidelity/dames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
Fidelity Dame Sensory Challenger (DSC)
Hardware notes:
- PCB label: 510-1030A01
- Z80A CPU @ 3.9MHz
- 8KB ROM(MOS 2364), 1KB RAM(2*TMM314APL)
- 4-digit 7seg panel, sensory board with 50 buttons
Instead of chess, it's a checkers game for once (international rules).
When playing it on MAME with the sensorboard device, use the modifier keys
(eg. hold CTRL to ignore sensor). The game expects the player to press a sensor
only once when doing a multiple capture.
Hardware notes:
- PCB label: 510-1030A01
- Z80A CPU @ 3.9MHz
- 8KB ROM(MOS 2364), 1KB RAM(2*TMM314APL)
- 4-digit 7seg panel, sensory board with 50 buttons
TODO:
- doesn't announce winner/loser when the game ends, or is this normal?
Expand Down Expand Up @@ -50,7 +50,6 @@ class dsc_state : public driver_device
m_inputs(*this, "IN.%u", 0)
{ }

// machine configs
void dsc(machine_config &config);

protected:
Expand All @@ -67,17 +66,16 @@ class dsc_state : public driver_device
u8 m_inp_mux = 0;
u8 m_led_select = 0;

// address maps
void main_map(address_map &map);

void init_board(int state);
u8 read_board_row(u8 row);

// I/O handlers
void update_display();
void control_w(u8 data);
void select_w(u8 data);
u8 input_r();

void init_board(int state);
u8 read_board_row(u8 row);
};

void dsc_state::machine_start()
Expand All @@ -90,11 +88,9 @@ void dsc_state::machine_start()


/*******************************************************************************
I/O
Sensorboard
*******************************************************************************/

// sensorboard handlers

void dsc_state::init_board(int state)
{
for (int i = 0; i < 20; i++)
Expand Down Expand Up @@ -131,7 +127,10 @@ u8 dsc_state::read_board_row(u8 row)
}


// TTL

/*******************************************************************************
I/O
*******************************************************************************/

void dsc_state::update_display()
{
Expand Down Expand Up @@ -202,9 +201,9 @@ static INPUT_PORTS_START( dsc )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Black King")

PORT_START("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Black")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Black Man")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("White King")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("White")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("White Man")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("RV")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("RE")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("PB")
Expand Down Expand Up @@ -232,7 +231,7 @@ void dsc_state::dsc(machine_config &config)
m_board->init_cb().set(FUNC(dsc_state::init_board));
m_board->set_size(5, 10); // 2 columns per x (eg. square 1 & 6 are same x)
m_board->set_spawnpoints(4);
m_board->set_delay(attotime::from_msec(100));
m_board->set_delay(attotime::from_msec(150));

// video hardware
PWM_DISPLAY(config, m_display).set_size(4, 8);
Expand Down
2 changes: 1 addition & 1 deletion src/mame/layout/fidel_dsc.lay
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ license:CC0-1.0

<element ref="white"><bounds x="-1" y="-1" width="119" height="108" /></element>
<group ref="sb_board"><bounds x="3" y="3" width="100" height="100" /></group>
<group ref="sb_ui"><bounds x="-14.75" y="13.625" width="12.5" height="78.75" /></group>
<group ref="sb_ui"><bounds x="-14.75" yc="53" width="12.5" height="78.75" /></group>

<!-- right side -->
<element ref="btn_white"><bounds x="107" y="14.5" width="7" height="7" /></element>
Expand Down
2 changes: 1 addition & 1 deletion src/mame/layout/fidel_rsc.lay
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ license:CC0-1.0
<element ref="green"><bounds x="-2" y="-2" width="98.5" height="89" /></element>

<group ref="sb_board"><bounds x="2" y="2" width="81" height="81" /></group>
<group ref="sb_ui"><bounds x="-13" y="11.25" width="10" height="62.5" /></group>
<group ref="sb_ui"><bounds x="-13" yc="42.5" width="10" height="62.5" /></group>

<!-- board coords -->
<element ref="text_1"><bounds x="-0.8" y="6.5" width="2" height="2" /></element>
Expand Down
27 changes: 14 additions & 13 deletions src/mame/layout/saitek_teammate.lay
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ license:CC0-1.0
<!-- build screen -->

<view name="Internal Layout">
<bounds left="3" right="151.625" top="0" bottom="89" />
<bounds left="3" right="151.875" top="-0.25" bottom="89" />

<!-- chessboard coords -->
<element ref="text_8"><bounds x="18.7" y="6" width="2" height="2" /></element>
Expand All @@ -422,23 +422,23 @@ license:CC0-1.0
<element ref="text_h"><bounds x="95" y="82.6" width="2" height="2" /></element>

<!-- right side -->
<group ref="leds1"><bounds x="103" y="10.5" width="20" height="30" /></group>
<group ref="buttons1"><bounds x="103.425" y="28.75" width="60" height="60" /></group>
<group ref="leds1"><bounds x="105.375" y="10.5" width="20" height="30" /></group>
<group ref="buttons1"><bounds x="103.675" y="28.75" width="60" height="60" /></group>

<element ref="cwhite" blend="multiply"><bounds x="0" y="0" width="170" height="90" /></element>

<group ref="leds2"><bounds x="103" y="10.5" width="20" height="30" /></group>
<group ref="buttons2"><bounds x="103.425" y="28.75" width="60" height="60" /></group>
<group ref="leds2"><bounds x="105.375" y="10.5" width="20" height="30" /></group>
<group ref="buttons2"><bounds x="103.675" y="28.75" width="60" height="60" /></group>

<!-- chessboard leds -->
<element name="0.0" ref="led"><bounds x="16.2" yc="7" width="2" height="0.9" /></element>
<element name="0.1" ref="led"><bounds x="16.2" yc="17" width="2" height="0.9" /></element>
<element name="0.2" ref="led"><bounds x="16.2" yc="27" width="2" height="0.9" /></element>
<element name="0.12" ref="led"><bounds x="16.2" yc="37" width="2" height="0.9" /></element>
<element name="0.11" ref="led"><bounds x="16.2" yc="47" width="2" height="0.9" /></element>
<element name="0.10" ref="led"><bounds x="16.2" yc="57" width="2" height="0.9" /></element>
<element name="0.9" ref="led"><bounds x="16.2" yc="67" width="2" height="0.9" /></element>
<element name="0.8" ref="led"><bounds x="16.2" yc="77" width="2" height="0.9" /></element>
<element name="0.0" ref="led"><bounds x="15.9" yc="7" width="2" height="0.9" /></element>
<element name="0.1" ref="led"><bounds x="15.9" yc="17" width="2" height="0.9" /></element>
<element name="0.2" ref="led"><bounds x="15.9" yc="27" width="2" height="0.9" /></element>
<element name="0.12" ref="led"><bounds x="15.9" yc="37" width="2" height="0.9" /></element>
<element name="0.11" ref="led"><bounds x="15.9" yc="47" width="2" height="0.9" /></element>
<element name="0.10" ref="led"><bounds x="15.9" yc="57" width="2" height="0.9" /></element>
<element name="0.9" ref="led"><bounds x="15.9" yc="67" width="2" height="0.9" /></element>
<element name="0.8" ref="led"><bounds x="15.9" yc="77" width="2" height="0.9" /></element>

<element name="0.7" ref="led"><bounds xc="26" y="85.2" width="0.9" height="2" /></element>
<element name="0.6" ref="led"><bounds xc="36" y="85.2" width="0.9" height="2" /></element>
Expand All @@ -449,6 +449,7 @@ license:CC0-1.0
<element name="0.14" ref="led"><bounds xc="86" y="85.2" width="0.9" height="2" /></element>
<element name="0.15" ref="led"><bounds xc="96" y="85.2" width="0.9" height="2" /></element>

<element ref="cwhite"><bounds xc="61" yc="42" width="80.5" height="80.5" /></element>
<group ref="sb_board"><bounds x="21" y="2" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="4.5" y="2" width="10" height="80" /></group>
</view>
Expand Down
18 changes: 9 additions & 9 deletions src/mame/saitek/intchess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,34 +227,34 @@ void intchess_state::main_map(address_map &map)
Input Ports
*******************************************************************************/

static INPUT_PORTS_START( intchess )
static INPUT_PORTS_START( intchess ) // see comments for German version labels
PORT_START("X1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A 1 / Pawn")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E 5 / Queen")
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level / Clear Square") // Spielstärke / Feld Frei
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear") // Löschen
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level / Clear Square") // Spielstärke / Feld Frei
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear") // Löschen
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Flash")

PORT_START("X2")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B 2 / Knight")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F 6 / King")
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game / Clear Board") // Neue Partie / Brett Frei
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game / Clear Board") // Neue Partie / Brett Frei
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") // Eingabe
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back") // Zurück

PORT_START("X3")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C 3 / Bishop")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G 7 / White")
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Mode") // Modus
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Find") // Check
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Mode") // Modus
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Find") // Check
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Next Best") // Altern

PORT_START("X4")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D 4 / Rook")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H 8 / Black")
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Record") // Speichern
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Place") // Setzen
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Step") // Vor
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Record") // Speichern
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Place") // Setzen
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Step") // Vor

PORT_START("RESET")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, intchess_state, reset_button, 0) PORT_NAME("Reset") // Start
Expand Down
14 changes: 7 additions & 7 deletions src/mame/saitek/leonardo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class leo_state : public driver_device
void update_display();
void mux_w(u8 data);
void leds_w(u8 data);
u8 unk_r();
void unk_w(u8 data);
u8 p1_r();
void p1_w(u8 data);
void exp_rts_w(int state);

u8 p2_r();
Expand Down Expand Up @@ -195,15 +195,15 @@ void leo_state::leds_w(u8 data)
update_display();
}

u8 leo_state::unk_r()
u8 leo_state::p1_r()
{
// ?
// ? this is where 6301 port 1 is, but 6303 doesn't have port 1
return 0xff;
}

void leo_state::unk_w(u8 data)
void leo_state::p1_w(u8 data)
{
// ?
// ? " (toggles bit 0)
}

void leo_state::exp_rts_w(int state)
Expand Down Expand Up @@ -289,7 +289,7 @@ void leo_state::p6_w(u8 data)

void leo_state::main_map(address_map &map)
{
map(0x0002, 0x0002).rw(FUNC(leo_state::unk_r), FUNC(leo_state::unk_w)); // external
map(0x0002, 0x0002).rw(FUNC(leo_state::p1_r), FUNC(leo_state::p1_w)); // external
map(0x4000, 0x5fff).ram().share("nvram");
map(0x6000, 0x6000).w(FUNC(leo_state::mux_w));
map(0x7000, 0x7000).w(FUNC(leo_state::leds_w));
Expand Down

0 comments on commit d326423

Please sign in to comment.