mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
savant: add a side_effects_disabled guard
This commit is contained in:
parent
9b09093f1b
commit
3339a55c6c
@ -792,7 +792,7 @@ static INPUT_PORTS_START( sensorboard )
|
||||
PORT_START("UI")
|
||||
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1<<0, NOTEQUALS, 0) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("Modifier 2 / Force Sensor") // hold while clicking to force sensor (ignore piece)
|
||||
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1<<0, NOTEQUALS, 0) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_NAME("Modifier 1 / Force Piece") // hold while clicking to force piece (ignore sensor)
|
||||
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_sensor_busy) // check if any sensor is busy / pressed (read-only)
|
||||
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(sensorboard_device, check_sensor_busy) // check if any sensor is busy / pressed (read-only)
|
||||
PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1<<1, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_hand, 0) PORT_NAME("Remove Piece")
|
||||
PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1<<1, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 0) PORT_NAME("Undo Buffer First")
|
||||
PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1<<1, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 1) PORT_NAME("Undo Buffer Previous")
|
||||
|
@ -826,6 +826,7 @@ ROM_END
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Drivers
|
||||
******************************************************************************/
|
||||
|
@ -61,7 +61,7 @@ Silver Bullet hardware notes:
|
||||
- buzzer, 16 leds, 8*8 chessboard buttons, module slot
|
||||
|
||||
To summarize, known MCU chip ROM serials+year:
|
||||
- 100-1020B01 (1989), The Gambit
|
||||
- 100-1020B01 (1989), The Gambit, Designer 1500, Peri Beta
|
||||
- 100-1020B02 (1986), Silver Bullet
|
||||
- 100-1020B02 (1987), The Classic
|
||||
- 100-1020C01 (1987), Gambit Voice
|
||||
|
@ -25,6 +25,7 @@ TODO:
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/f8/f8.h"
|
||||
#include "machine/f3853.h"
|
||||
@ -89,7 +90,7 @@ private:
|
||||
void nvram_w(offs_t offset, u8 data);
|
||||
u8 nvram_r(offs_t offset);
|
||||
u8 stall_r(offs_t offset);
|
||||
void stall_w(offs_t offset, u8 data);
|
||||
void stall_w(offs_t offset, u8 data = 0);
|
||||
u8 mcustatus_r();
|
||||
|
||||
void lcd1_output_w(u64 data);
|
||||
@ -102,22 +103,15 @@ private:
|
||||
void lcd_w(u8 data);
|
||||
u8 input_r();
|
||||
|
||||
bool m_wait_in;
|
||||
u8 m_inp_mux;
|
||||
u8 m_databus;
|
||||
u8 m_control;
|
||||
u64 m_lcd_data;
|
||||
bool m_wait_in = false;
|
||||
u8 m_inp_mux = 0;
|
||||
u8 m_databus = 0;
|
||||
u8 m_control = 0;
|
||||
u64 m_lcd_data = 0;
|
||||
};
|
||||
|
||||
void savant_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
m_wait_in = false;
|
||||
m_inp_mux = 0;
|
||||
m_databus = 0;
|
||||
m_control = 0;
|
||||
m_lcd_data = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_wait_in));
|
||||
save_item(NAME(m_inp_mux));
|
||||
@ -156,8 +150,11 @@ void savant_state::stall_w(offs_t offset, u8 data)
|
||||
|
||||
u8 savant_state::stall_r(offs_t offset)
|
||||
{
|
||||
m_wait_in = true;
|
||||
stall_w(offset, 0);
|
||||
if (!machine().side_effects_disabled())
|
||||
{
|
||||
m_wait_in = true;
|
||||
stall_w(offset);
|
||||
}
|
||||
|
||||
// return value is databus (see control_w)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user