mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
msoccer2: add factory test,
robotadv: remove timer device
This commit is contained in:
parent
3a40a6e572
commit
6edf776ee2
@ -6,7 +6,7 @@ Excalibur Mirage
|
||||
|
||||
It's Excalibur's first chess computer, and also Ron Nelson's official return to
|
||||
chess programming. The x/y motorized magnet is similar to the one used in
|
||||
Fidelity Phantom (and Milton Bradley Phantom before that).
|
||||
Fidelity Phantom (and Milton Bradley Grand·Master before that).
|
||||
|
||||
Before moving a piece, wait until the computer is done with its own move. After
|
||||
capturing a piece, select the captured piece from the MAME sensorboard spawn
|
||||
@ -256,7 +256,7 @@ void mirage_state::realign_magnet_pos()
|
||||
m_motor_pos[i] += inc * 4;
|
||||
m_motor_drift[i] -= inc;
|
||||
|
||||
logerror("motor %C drift error (%d total)\n", 'X' + i, m_motor_drift[i]);
|
||||
logerror("motor %c drift error (%d total)\n", 'X' + i, m_motor_drift[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
Fidelity Phantom (model 6100)
|
||||
|
||||
Fidelity licensed the design of the Milton/Phantom motorized chessboard and released
|
||||
their own version. It has a small LCD panel added, the rest looks nearly the same from
|
||||
the outside. After Fidelity was taken over by H+G, it was rereleased in 1990 as the
|
||||
Mephisto Phantom. This is assumed to be identical.
|
||||
Fidelity licensed (or perhaps bought) the design of Milton Bradley's Grand·Master
|
||||
motorized chessboard and released their own version. It has a small LCD panel added,
|
||||
the rest looks nearly the same from the outside. After Fidelity was taken over by H+G,
|
||||
it was rereleased in 1990 as the Mephisto Phantom. This is assumed to be identical.
|
||||
|
||||
At boot-up, the computer will do a self-test, the user can start playing after the
|
||||
motor has moved to the upper-right corner. The computer will continue positioning
|
||||
|
@ -1109,8 +1109,7 @@ class mbaskb2_state : public hh_cop400_state
|
||||
public:
|
||||
mbaskb2_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
hh_cop400_state(mconfig, type, tag),
|
||||
m_subcpu(*this, "subcpu"),
|
||||
m_on_timer(*this, "on_timer")
|
||||
m_subcpu(*this, "subcpu")
|
||||
{ }
|
||||
|
||||
void mbaskb2(machine_config &config);
|
||||
@ -1119,11 +1118,13 @@ public:
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(switch_r);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
required_device<cop400_cpu_device> m_subcpu;
|
||||
required_device<timer_device> m_on_timer;
|
||||
|
||||
attotime m_on_time;
|
||||
|
||||
void update_display();
|
||||
void shared_write_l(u8 data);
|
||||
@ -1133,10 +1134,16 @@ private:
|
||||
u8 sub_read_in();
|
||||
};
|
||||
|
||||
void mbaskb2_state::machine_start()
|
||||
{
|
||||
hh_cop400_state::machine_start();
|
||||
save_item(NAME(m_on_time));
|
||||
}
|
||||
|
||||
void mbaskb2_state::machine_reset()
|
||||
{
|
||||
hh_cop400_state::machine_reset();
|
||||
m_on_timer->adjust(attotime::from_msec(5));
|
||||
m_on_time = machine().time() + attotime::from_msec(5);
|
||||
}
|
||||
|
||||
// handlers
|
||||
@ -1185,7 +1192,7 @@ CUSTOM_INPUT_MEMBER(mbaskb2_state::switch_r)
|
||||
{
|
||||
// The power switch is off-1-2, and the game relies on power-on starting at 1,
|
||||
// otherwise msoccer2 boots up to what looks like a factory test mode.
|
||||
return (m_inputs[3]->read() & 1) | (m_on_timer->enabled() ? 1 : 0);
|
||||
return (machine().time() < m_on_time && ~m_inputs[4]->read() & 1) ? 1 : (m_inputs[3]->read() & 1);
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( mbaskb2 )
|
||||
@ -1210,6 +1217,9 @@ static INPUT_PORTS_START( mbaskb2 )
|
||||
PORT_CONFNAME( 0x01, 0x01, DEF_STR( Difficulty ) )
|
||||
PORT_CONFSETTING( 0x01, "1" )
|
||||
PORT_CONFSETTING( 0x00, "2" )
|
||||
|
||||
PORT_START("IN.4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( msoccer2 )
|
||||
@ -1219,6 +1229,11 @@ static INPUT_PORTS_START( msoccer2 )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Low/High Kick")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("Score")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("Teammate")
|
||||
|
||||
PORT_MODIFY("IN.4")
|
||||
PORT_CONFNAME( 0x01, 0x00, "Factory Test" ) PORT_CONDITION("IN.3", 0x01, EQUALS, 0x00)
|
||||
PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_CONFSETTING( 0x01, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
// config
|
||||
@ -1247,8 +1262,6 @@ void mbaskb2_state::mbaskb2(machine_config &config)
|
||||
|
||||
config.set_perfect_quantum(m_maincpu);
|
||||
|
||||
TIMER(config, "on_timer").configure_generic(nullptr);
|
||||
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 7);
|
||||
m_display->set_segmask(0xc0, 0x7f);
|
||||
|
@ -11550,7 +11550,8 @@ ROM_END
|
||||
"Radio Shack-12", but there's no title prefix on the box.
|
||||
- World: Computerized Arcade, Radio Shack brand, model 60-2159A, COP421 MCU,
|
||||
see hh_cop400.cpp driver
|
||||
- World: Computerized Arcade, Radio Shack brand, model 60-2495, hardware unknown.
|
||||
- World: Computerized Arcade, Radio Shack brand, model 60-2495, 28-pin Motorola
|
||||
LSC417570DW, 6805 family or custom?
|
||||
- Mexico: Fabuloso Fred, published by Ensueño Toys (also released as
|
||||
9-button version, a clone of Mego Fabulous Fred)
|
||||
|
||||
|
@ -884,7 +884,7 @@ void vegas_state::cpu_io_w(offs_t offset, uint8_t data)
|
||||
case 0xfe: digit = '-'; break;
|
||||
case 0xff: digit = 'Z'; break;
|
||||
}
|
||||
//popmessage("System LED: %C", digit);
|
||||
//popmessage("System LED: %c", digit);
|
||||
LOGMASKED(LOG_SIO, "%s: cpu_io_w System LED offset %X = %02X '%c'\n", machine().describe_context(), offset, data, digit);
|
||||
break;
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ TODO:
|
||||
#include "machine/clock.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/sensorboard.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/sn76496.h"
|
||||
#include "video/pwm.h"
|
||||
|
||||
@ -92,6 +91,7 @@ private:
|
||||
s32 m_counter[4] = { };
|
||||
attotime m_pwm_accum[4];
|
||||
attotime m_pwm_last;
|
||||
emu_timer *m_refresh_timer;
|
||||
|
||||
void main_map(address_map &map);
|
||||
void io_map(address_map &map);
|
||||
@ -103,10 +103,9 @@ private:
|
||||
u8 input_r();
|
||||
u8 counters_r();
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(refresh_timer) { refresh(); }
|
||||
void init_board(u8 data);
|
||||
void clear_board(u8 data);
|
||||
void refresh();
|
||||
void refresh(s32 param = 0);
|
||||
void update_counters();
|
||||
void update_limits();
|
||||
void update_clawpos(double *x, double *y);
|
||||
@ -121,6 +120,8 @@ private:
|
||||
|
||||
void robotadv_state::machine_start()
|
||||
{
|
||||
m_refresh_timer = timer_alloc(FUNC(robotadv_state::refresh), this);
|
||||
|
||||
// resolve outputs
|
||||
m_piece_hand.resolve();
|
||||
m_out_motor.resolve();
|
||||
@ -321,7 +322,7 @@ void robotadv_state::update_piece(double x, double y)
|
||||
}
|
||||
}
|
||||
|
||||
void robotadv_state::refresh()
|
||||
void robotadv_state::refresh(s32 param)
|
||||
{
|
||||
if (machine().side_effects_disabled())
|
||||
return;
|
||||
@ -342,6 +343,8 @@ void robotadv_state::refresh()
|
||||
const int open = (m_limits & 1) ? 0x800 : 0; // put open state on x bit 11
|
||||
m_out_pos[0] = int((x + 15.0) * 50.0 + 0.5) | open;
|
||||
m_out_pos[1] = int((y + 15.0) * 50.0 + 0.5);
|
||||
|
||||
m_refresh_timer->adjust(attotime::from_hz(60));
|
||||
}
|
||||
|
||||
|
||||
@ -524,8 +527,6 @@ void robotadv_state::robotadv(machine_config &config)
|
||||
irq_clock.set_pulse_width(attotime::from_usec(10)); // guessed
|
||||
irq_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
|
||||
|
||||
TIMER(config, "refresh_timer").configure_periodic(FUNC(robotadv_state::refresh_timer), attotime::from_hz(60));
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
|
||||
|
||||
SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
|
||||
|
Loading…
Reference in New Issue
Block a user