mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
mark5: map buttons, add nvram (nw)
This commit is contained in:
parent
43f8d52f09
commit
d9c89c7e1f
@ -14,7 +14,10 @@ Mark VI/Philidor was released a year later, it was a plug-in module for the Mark
|
|||||||
It's not much stronger than Mark V(retroactively called Mark V/Travemunde).
|
It's not much stronger than Mark V(retroactively called Mark V/Travemunde).
|
||||||
|
|
||||||
Hardware notes:
|
Hardware notes:
|
||||||
- x
|
- SY6502A @ ~2MHz (19.6608MHz XTAL, bunch of 74113 dividers)
|
||||||
|
- 16KB RAM (8*HM4716AP-4N)
|
||||||
|
- 256x4 battery-backed RAM (TC5501P)
|
||||||
|
- HLCD0538, 2*HLCD0539, LCD screen with chessboard
|
||||||
|
|
||||||
3 slots:
|
3 slots:
|
||||||
- ROM module at the bottom, mandatory (4*8KB)
|
- ROM module at the bottom, mandatory (4*8KB)
|
||||||
@ -22,7 +25,7 @@ Hardware notes:
|
|||||||
- sensory board at left edge, only for MK VI
|
- sensory board at left edge, only for MK VI
|
||||||
|
|
||||||
Chess Champion Sensory Board:
|
Chess Champion Sensory Board:
|
||||||
- hardware unknown
|
- 4KB ROM (NEC D2732), TTL
|
||||||
- magnet sensors, 64 leds
|
- magnet sensors, 64 leds
|
||||||
|
|
||||||
A piece-recognition chessboard was also announced but not released. Maybe
|
A piece-recognition chessboard was also announced but not released. Maybe
|
||||||
@ -65,6 +68,7 @@ public:
|
|||||||
m_display(*this, "display%u", 0),
|
m_display(*this, "display%u", 0),
|
||||||
m_lcd(*this, "lcd%u", 0),
|
m_lcd(*this, "lcd%u", 0),
|
||||||
m_dac(*this, "dac"),
|
m_dac(*this, "dac"),
|
||||||
|
m_nvram(*this, "nvram"),
|
||||||
m_inputs(*this, "IN.%u", 0),
|
m_inputs(*this, "IN.%u", 0),
|
||||||
m_out_x(*this, "%u.%u.%u", 0U, 0U, 0U)
|
m_out_x(*this, "%u.%u.%u", 0U, 0U, 0U)
|
||||||
{ }
|
{ }
|
||||||
@ -82,6 +86,7 @@ private:
|
|||||||
required_device_array<pwm_display_device, 3> m_display;
|
required_device_array<pwm_display_device, 3> m_display;
|
||||||
required_device_array<hlcd0538_device, 3> m_lcd;
|
required_device_array<hlcd0538_device, 3> m_lcd;
|
||||||
required_device<dac_bit_interface> m_dac;
|
required_device<dac_bit_interface> m_dac;
|
||||||
|
required_shared_ptr<u8> m_nvram;
|
||||||
required_ioport_array<7+1> m_inputs;
|
required_ioport_array<7+1> m_inputs;
|
||||||
output_finder<3, 8, 34> m_out_x;
|
output_finder<3, 8, 34> m_out_x;
|
||||||
|
|
||||||
@ -89,6 +94,8 @@ private:
|
|||||||
void main_map(address_map &map);
|
void main_map(address_map &map);
|
||||||
|
|
||||||
// I/O handlers
|
// I/O handlers
|
||||||
|
DECLARE_WRITE8_MEMBER(nvram_w);
|
||||||
|
DECLARE_READ8_MEMBER(nvram_r);
|
||||||
DECLARE_WRITE8_MEMBER(lcd_data_w);
|
DECLARE_WRITE8_MEMBER(lcd_data_w);
|
||||||
DECLARE_WRITE8_MEMBER(sound_w);
|
DECLARE_WRITE8_MEMBER(sound_w);
|
||||||
DECLARE_READ8_MEMBER(sound_r);
|
DECLARE_READ8_MEMBER(sound_r);
|
||||||
@ -135,6 +142,17 @@ void mark5_state::machine_reset()
|
|||||||
I/O
|
I/O
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
WRITE8_MEMBER(mark5_state::nvram_w)
|
||||||
|
{
|
||||||
|
// nvram is only d0-d3
|
||||||
|
m_nvram[offset] = data & 0xf;
|
||||||
|
}
|
||||||
|
|
||||||
|
READ8_MEMBER(mark5_state::nvram_r)
|
||||||
|
{
|
||||||
|
return m_nvram[offset] & 0xf;
|
||||||
|
}
|
||||||
|
|
||||||
template<int N>
|
template<int N>
|
||||||
WRITE8_MEMBER(mark5_state::pwm_output_w)
|
WRITE8_MEMBER(mark5_state::pwm_output_w)
|
||||||
{
|
{
|
||||||
@ -242,7 +260,7 @@ void mark5_state::main_map(address_map &map)
|
|||||||
map(0x4400, 0x4400).mirror(0x03ff).w(FUNC(mark5_state::lcd_data_w));
|
map(0x4400, 0x4400).mirror(0x03ff).w(FUNC(mark5_state::lcd_data_w));
|
||||||
map(0x4800, 0x4800).mirror(0x03ff).rw(FUNC(mark5_state::sound_r), FUNC(mark5_state::sound_w));
|
map(0x4800, 0x4800).mirror(0x03ff).rw(FUNC(mark5_state::sound_r), FUNC(mark5_state::sound_w));
|
||||||
map(0x4c00, 0x4c00).mirror(0x03ff).rw(FUNC(mark5_state::reset_irq_r), FUNC(mark5_state::reset_irq_w));
|
map(0x4c00, 0x4c00).mirror(0x03ff).rw(FUNC(mark5_state::reset_irq_r), FUNC(mark5_state::reset_irq_w));
|
||||||
map(0x5000, 0x50ff).mirror(0x0f00).ram();
|
map(0x5000, 0x50ff).mirror(0x0f00).ram().rw(FUNC(mark5_state::nvram_r), FUNC(mark5_state::nvram_w)).share("nvram");
|
||||||
map(0x8000, 0xffff).rom();
|
map(0x8000, 0xffff).rom();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,50 +272,50 @@ void mark5_state::main_map(address_map &map)
|
|||||||
|
|
||||||
static INPUT_PORTS_START( mark5 )
|
static INPUT_PORTS_START( mark5 )
|
||||||
PORT_START("IN.0")
|
PORT_START("IN.0")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // enter pos
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Enter Position")
|
||||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) // newgame
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
|
||||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) // draw
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Draw")
|
||||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) // peripheral
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Peripheral")
|
||||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) // next simul
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Next Simult")
|
||||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) // swap
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Swap")
|
||||||
|
|
||||||
PORT_START("IN.1")
|
PORT_START("IN.1")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) // next best
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Next Best")
|
||||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) // auto
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Auto")
|
||||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) // comment
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Comment")
|
||||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) // analysis
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Analysis")
|
||||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_MINUS) // clock
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SLASH) PORT_NAME("Clock")
|
||||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_EQUALS) // clock stop
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_STOP) PORT_NAME("Stop Clock")
|
||||||
|
|
||||||
PORT_START("IN.2")
|
PORT_START("IN.2")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) // 0
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("No / 0 / CS")
|
||||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) // a
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_A) PORT_NAME("A / 1 / Pawn")
|
||||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) // 2
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_B) PORT_NAME("B / 2 / Knight")
|
||||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) // c
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(KEYCODE_C) PORT_NAME("C / 3 / Bishop")
|
||||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) // 4
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_D) PORT_NAME("D / 4 / Rook")
|
||||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) // e
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_E) PORT_NAME("E / 5 / Queen")
|
||||||
|
|
||||||
PORT_START("IN.3")
|
PORT_START("IN.3")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) // f
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_F) PORT_NAME("F / 6 / King")
|
||||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) // g
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_G) PORT_NAME("G / 7 / Black")
|
||||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) // h
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_H) PORT_NAME("H / 8 / White")
|
||||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) // 9
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_EQUALS) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("Yes / 9 / CB")
|
||||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) // take back
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Backward")
|
||||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) // forward
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Forward")
|
||||||
|
|
||||||
PORT_START("IN.4")
|
PORT_START("IN.4")
|
||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) // replay
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Replay")
|
||||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) // go
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Go")
|
||||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) // enter
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
|
||||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) // ce
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE")
|
||||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_K) // mode
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Mode")
|
||||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) // clock start
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_COMMA) PORT_NAME("Start Clock")
|
||||||
|
|
||||||
PORT_START("IN.5") // square 'd-pad'
|
PORT_START("IN.5") // square 'd-pad' (8-way, so define joystick)
|
||||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP)
|
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_UP) PORT_NAME("Cursor Up")
|
||||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN)
|
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Cursor Down")
|
||||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT)
|
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Cursor Right")
|
||||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT)
|
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Cursor Left")
|
||||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
|
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
|
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||||
|
|
||||||
@ -332,6 +350,8 @@ void mark5_state::mark5(machine_config &config)
|
|||||||
M6502(config, m_maincpu, 19.6608_MHz_XTAL / 10);
|
M6502(config, m_maincpu, 19.6608_MHz_XTAL / 10);
|
||||||
m_maincpu->set_addrmap(AS_PROGRAM, &mark5_state::main_map);
|
m_maincpu->set_addrmap(AS_PROGRAM, &mark5_state::main_map);
|
||||||
|
|
||||||
|
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
HLCD0538(config, m_lcd[0]).write_cols().set(FUNC(mark5_state::lcd_output_w<0>));
|
HLCD0538(config, m_lcd[0]).write_cols().set(FUNC(mark5_state::lcd_output_w<0>));
|
||||||
PWM_DISPLAY(config, m_display[0]).set_size(8, 26);
|
PWM_DISPLAY(config, m_display[0]).set_size(8, 26);
|
||||||
|
@ -31,7 +31,7 @@ Chess Unit:
|
|||||||
Printer Unit:
|
Printer Unit:
|
||||||
- unknown hardware, assume own CPU like the chess unit
|
- unknown hardware, assume own CPU like the chess unit
|
||||||
|
|
||||||
PSU ("permanent storage unit"?) is just a battery-backed 256x4 RAM (TC5501P)
|
PSU ("permanent storage unit"?) is just a 256x4 battery-backed RAM (TC5501P)
|
||||||
module, not sure why it was so expensive (~180DM).
|
module, not sure why it was so expensive (~180DM).
|
||||||
A chess clock accessory was also announced but unreleased.
|
A chess clock accessory was also announced but unreleased.
|
||||||
|
|
||||||
|
@ -454,7 +454,7 @@
|
|||||||
<element ref="text_p4"><bounds x="99.5" y="48.3" width="3" height="3" /></element>
|
<element ref="text_p4"><bounds x="99.5" y="48.3" width="3" height="3" /></element>
|
||||||
<element ref="text_p5"><bounds x="99.5" y="52.3" width="3" height="3" /></element>
|
<element ref="text_p5"><bounds x="99.5" y="52.3" width="3" height="3" /></element>
|
||||||
<element ref="text_p6"><bounds x="99.5" y="56.3" width="3" height="3" /></element>
|
<element ref="text_p6"><bounds x="99.5" y="56.3" width="3" height="3" /></element>
|
||||||
<bezel element="blue" blend="multiply"><bounds x="99.5" y="36" width="3" height="25" /></bezel>
|
<element ref="blue" blend="multiply"><bounds x="99.5" y="36" width="3" height="25" /></element>
|
||||||
|
|
||||||
<element ref="text_b1"><bounds x="97.1" y="65.2" width="5.2" height="1.5" /></element>
|
<element ref="text_b1"><bounds x="97.1" y="65.2" width="5.2" height="1.5" /></element>
|
||||||
<element ref="text_b2"><bounds x="97.1" y="69.2" width="5.2" height="1.5" /></element>
|
<element ref="text_b2"><bounds x="97.1" y="69.2" width="5.2" height="1.5" /></element>
|
||||||
|
Loading…
Reference in New Issue
Block a user