mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
dominator: identify buttons (nw)
This commit is contained in:
parent
a36dd336b8
commit
f7f0fed6ba
@ -22,17 +22,12 @@ DEFINE_DEVICE_TYPE(LC7582, lc7582_device, "lc7582", "Sanyo LC7582 LCD Driver")
|
||||
// constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
lc7582_device::lc7582_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
|
||||
device_t(mconfig, type, tag, owner, clock),
|
||||
lc7582_device::lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
device_t(mconfig, LC7582, tag, owner, clock),
|
||||
m_latch{0, 0},
|
||||
m_write_segs(*this)
|
||||
{ }
|
||||
|
||||
lc7582_device::lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
lc7582_device(mconfig, LC7582, tag, owner, clock)
|
||||
{ }
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
|
@ -43,12 +43,11 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(inh_w) { m_blank = bool(state); refresh_output(); }
|
||||
|
||||
protected:
|
||||
lc7582_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_post_load() override { refresh_output(); }
|
||||
|
||||
private:
|
||||
void refresh_output();
|
||||
|
||||
int m_data = 0;
|
||||
|
@ -14,11 +14,11 @@ Hardware notes:
|
||||
Sphinx Galaxy is assumed to be on similar hardware.
|
||||
|
||||
The chess engine is by Frans Morsch, older versions (before 2.05) were buggy.
|
||||
It's also used in the newer Mephisto Modena.
|
||||
Hold Pawn + Knight buttons at boot for test mode, it will tell the version number.
|
||||
This engine was also used in the newer Mephisto Modena.
|
||||
|
||||
TODO:
|
||||
- artwork
|
||||
- buttons
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
@ -159,7 +159,7 @@ READ8_MEMBER(dominator_state::input_r)
|
||||
|
||||
void dominator_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x1fff).ram(); //.share("nvram");
|
||||
map(0x0000, 0x1fff).ram().share("nvram");
|
||||
map(0x4000, 0x400f).rw(FUNC(dominator_state::input_r), FUNC(dominator_state::leds_w));
|
||||
map(0x4010, 0x4010).w(FUNC(dominator_state::control_w));
|
||||
//map(0x7f00, 0x7fff).nopr(); // mid-opcode dummy read
|
||||
@ -174,24 +174,24 @@ void dominator_state::main_map(address_map &map)
|
||||
|
||||
static INPUT_PORTS_START( dominator )
|
||||
PORT_START("IN.0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4)
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5)
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6)
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7)
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8)
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Move")
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back")
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Pawn")
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Knight")
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Bishop")
|
||||
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_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Queen")
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("King")
|
||||
|
||||
PORT_START("IN.1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W)
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E)
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R)
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T)
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y)
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U)
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I)
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Multi Move")
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Hint")
|
||||
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Replay")
|
||||
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("Library/Clear")
|
||||
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_C) PORT_NAME("Color/Sound")
|
||||
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Enter Position")
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -209,6 +209,8 @@ void dominator_state::dominator(machine_config &config)
|
||||
const attotime irq_period = attotime::from_hz(4_MHz_XTAL / 0x2000); // from 4020
|
||||
m_maincpu->set_periodic_int(FUNC(dominator_state::nmi_line_pulse), irq_period);
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
|
||||
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
|
||||
m_board->set_delay(attotime::from_msec(150));
|
||||
@ -217,7 +219,7 @@ void dominator_state::dominator(machine_config &config)
|
||||
LC7582(config, m_lcd, 0);
|
||||
m_lcd->write_segs().set(FUNC(dominator_state::lcd_s_w));
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(10, 8);
|
||||
PWM_DISPLAY(config, m_display).set_size(8+1, 8);
|
||||
//config.set_default_layout(layout_cxg_dominator);
|
||||
|
||||
/* sound hardware */
|
||||
|
@ -12,6 +12,7 @@ TODO:
|
||||
The problem goes away if RAM stays powered-on, but PCB has no indication of NVRAM.
|
||||
- granits chessboard buttons seem too sensitive (detects input on falling edge if held too long)
|
||||
- granits has a module slot, is it usable?
|
||||
- granits overlock + dynamic /2 cpu divider? (like SC12) instead of static /2 divider
|
||||
|
||||
*******************************************************************************
|
||||
|
||||
|
@ -2,7 +2,10 @@
|
||||
// copyright-holders:Sandro Ronco
|
||||
/**************************************************************************************************
|
||||
|
||||
Mephisto Modena
|
||||
Mephisto Modena
|
||||
|
||||
The chess engine is by Frans Morsch, same one as Sphinx Dominator 2.05.
|
||||
Hold Pawn + Knight buttons at boot for test mode.
|
||||
|
||||
**************************************************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user