Skip to content

Commit

Permalink
harddriv, racedrivc: swap coin inputs,
Browse files Browse the repository at this point in the history
galastrm: fix coin counter 2
  • Loading branch information
happppp committed Jun 21, 2023
1 parent be908cd commit e4b6211
Show file tree
Hide file tree
Showing 12 changed files with 223 additions and 217 deletions.
269 changes: 134 additions & 135 deletions src/mame/atari/harddriv.cpp
Expand Up @@ -339,132 +339,131 @@ A046901
*
*************************************/

harddriv_state::harddriv_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock),
/* device_video_interface(mconfig, *this, false), */
m_maincpu(*this, "maincpu"),
m_gsp(*this, "gsp"),
m_msp(*this, "msp"),
m_adsp(*this, "adsp"),
m_jsacpu(*this, "jsacpu"),
m_dsp32(*this, "dsp32"),
m_ds3sdsp(*this, "ds3sdsp"),
m_ds3xdsp(*this, "ds3xdsp"),
m_ds3sdsp_region(*this, "ds3sdsp"),
m_ds3xdsp_region(*this, "ds3xdsp"),
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac"),
m_harddriv_sound(*this, "harddriv_sound"),
m_jsa(*this, "jsa"),
m_screen(*this, "screen"),
m_duartn68681(*this, "duartn68681"),
m_adc8(*this, "adc8"),
m_lamps(*this, "lamp%u", 1U),
m_sel(*this, "SEL%u", 1U),
m_wheel(*this, "wheel"),
m_hd34010_host_access(0),
m_msp_ram(*this, "msp_ram"),
m_dsk_ram(nullptr),
m_dsk_rom(nullptr),
m_dsk_10c(*this, "dsk_10c"),
m_dsk_30c(*this, "dsk_30c"),
m_dsk_pio_access(0),
m_m68k_sloop_base(nullptr),
m_m68k_sloop_alt_base(nullptr),
m_200e(*this, "200e"),
m_210e(*this, "210e"),
m_adsp_data_memory(*this, "adsp_data"),
m_adsp_pgm_memory(*this, "adsp_pgm_memory"),
m_ds3sdsp_data_memory(*this, "ds3sdsp_data"),
m_ds3sdsp_pgm_memory(*this, "ds3sdsp_pgm"),
m_ds3xdsp_pgm_memory(*this, "ds3xdsp_pgm"),
m_dsp32_ram(*this, "dsp32_ram"),
m_gsp_protection(nullptr),
m_gsp_speedup_pc(0),
m_msp_speedup_addr(nullptr),
m_msp_speedup_pc(0),
m_ds3_speedup_addr(nullptr),
m_ds3_speedup_pc(0),
m_ds3_transfer_pc(0),
m_gsp_multisync(0),
m_gsp_vram(*this, "gsp_vram"),
m_gsp_control_lo(*this, "gsp_control_lo"),
m_gsp_control_hi(*this, "gsp_control_hi"),
m_gsp_paletteram_lo(*this, "gsp_palram_lo", 1024*2, ENDIANNESS_LITTLE),
m_gsp_paletteram_hi(*this, "gsp_palram_hi", 1024*2, ENDIANNESS_LITTLE),
m_in0(*this, "IN0"),
m_sw1(*this, "SW1"),
m_a80000(*this, "a80000"),
m_12badc(*this, "12BADC.%u", 0),
m_irq_state(0),
m_gsp_irq_state(0),
m_msp_irq_state(0),
m_adsp_irq_state(0),
m_ds3sdsp_irq_state(0),
m_duart_irq_state(0),
m_last_gsp_shiftreg(0),
m_m68k_zp1(0),
m_m68k_zp2(0),
m_m68k_adsp_buffer_bank(0),
m_adsp_halt(0),
m_adsp_br(0),
m_adsp_xflag(0),
m_adsp_sim_address(0),
m_adsp_som_address(0),
m_adsp_eprom_base(0),
m_sim_memory(*this, "user1"),
m_adsp_pgm_memory_word(nullptr),
m_ds3_sdata_memory(nullptr),
m_ds3_sdata_memory_size(0),
m_ds3_gcmd(0),
m_ds3_gflag(0),
m_ds3_g68irqs(0),
m_ds3_gfirqs(0),
m_ds3_g68flag(0),
m_ds3_send(0),
m_ds3_reset(0),
m_ds3_gdata(0),
m_ds3_g68data(0),
m_ds3_sim_address(0),
m_ds3_scmd(0),
m_ds3_sflag(0),
m_ds3_s68irqs(0),
m_ds3_sfirqs(0),
m_ds3_s68flag(0),
m_ds3_sreset(0),
m_ds3_sdata(0),
m_ds3_s68data(0),
m_ds3_sdata_address(0),
m_ds3sdsp_timer_en(0),
m_ds3sdsp_sdata(0),
m_ds3sdsp_internal_timer(*this, "ds3sdsp_timer"),
m_ds3xdsp_timer_en(0),
m_ds3xdsp_sdata(0),
m_ds3xdsp_internal_timer(*this, "ds3xdsp_timer"),
m_adc_control(0),
m_adc12_select(0),
m_adc12_byte(0),
m_adc12_data(0),
m_hdc68k_last_wheel(0),
m_hdc68k_last_port1(0),
m_hdc68k_wheel_edge(0),
m_hdc68k_shifter_state(0),
m_st68k_sloop_bank(0),
m_st68k_last_alt_sloop_offset(0),
m_next_msp_sync(0),
m_vram_mask(0),
m_shiftreg_enable(0),
m_gsp_shiftreg_source(nullptr),
m_gfx_finescroll(0),
m_gfx_palettebank(0),
m_duart(*this, "duartn68681"),
m_asic65(*this, "asic65"),
m_sound_int_state(0),
m_video_int_state(0),
m_palette(*this, "palette"),
m_slapstic(*this, "slapstic"),
m_slapstic_bank(*this, "slapstic_bank"),
m_rs232(*this, "rs232")
harddriv_state::harddriv_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
m_maincpu(*this, "maincpu"),
m_gsp(*this, "gsp"),
m_msp(*this, "msp"),
m_adsp(*this, "adsp"),
m_jsacpu(*this, "jsacpu"),
m_dsp32(*this, "dsp32"),
m_ds3sdsp(*this, "ds3sdsp"),
m_ds3xdsp(*this, "ds3xdsp"),
m_ds3sdsp_region(*this, "ds3sdsp"),
m_ds3xdsp_region(*this, "ds3xdsp"),
m_ldac(*this, "ldac"),
m_rdac(*this, "rdac"),
m_harddriv_sound(*this, "harddriv_sound"),
m_jsa(*this, "jsa"),
m_screen(*this, "screen"),
m_duartn68681(*this, "duartn68681"),
m_adc8(*this, "adc8"),
m_lamps(*this, "lamp%u", 1U),
m_sel(*this, "SEL%u", 1U),
m_wheel(*this, "wheel"),
m_hd34010_host_access(0),
m_msp_ram(*this, "msp_ram"),
m_dsk_ram(nullptr),
m_dsk_rom(nullptr),
m_dsk_10c(*this, "dsk_10c"),
m_dsk_30c(*this, "dsk_30c"),
m_dsk_pio_access(0),
m_m68k_sloop_base(nullptr),
m_m68k_sloop_alt_base(nullptr),
m_200e(*this, "200e"),
m_210e(*this, "210e"),
m_adsp_data_memory(*this, "adsp_data"),
m_adsp_pgm_memory(*this, "adsp_pgm_memory"),
m_ds3sdsp_data_memory(*this, "ds3sdsp_data"),
m_ds3sdsp_pgm_memory(*this, "ds3sdsp_pgm"),
m_ds3xdsp_pgm_memory(*this, "ds3xdsp_pgm"),
m_dsp32_ram(*this, "dsp32_ram"),
m_gsp_protection(nullptr),
m_gsp_speedup_pc(0),
m_msp_speedup_addr(nullptr),
m_msp_speedup_pc(0),
m_ds3_speedup_addr(nullptr),
m_ds3_speedup_pc(0),
m_ds3_transfer_pc(0),
m_gsp_multisync(0),
m_gsp_vram(*this, "gsp_vram"),
m_gsp_control_lo(*this, "gsp_control_lo"),
m_gsp_control_hi(*this, "gsp_control_hi"),
m_gsp_paletteram_lo(*this, "gsp_palram_lo", 1024*2, ENDIANNESS_LITTLE),
m_gsp_paletteram_hi(*this, "gsp_palram_hi", 1024*2, ENDIANNESS_LITTLE),
m_in0(*this, "IN0"),
m_sw1(*this, "SW1"),
m_a80000(*this, "a80000"),
m_12badc(*this, "12BADC.%u", 0),
m_irq_state(0),
m_gsp_irq_state(0),
m_msp_irq_state(0),
m_adsp_irq_state(0),
m_ds3sdsp_irq_state(0),
m_duart_irq_state(0),
m_last_gsp_shiftreg(0),
m_m68k_zp1(0),
m_m68k_zp2(0),
m_m68k_adsp_buffer_bank(0),
m_adsp_halt(0),
m_adsp_br(0),
m_adsp_xflag(0),
m_adsp_sim_address(0),
m_adsp_som_address(0),
m_adsp_eprom_base(0),
m_sim_memory(*this, "user1"),
m_adsp_pgm_memory_word(nullptr),
m_ds3_sdata_memory(nullptr),
m_ds3_sdata_memory_size(0),
m_ds3_gcmd(0),
m_ds3_gflag(0),
m_ds3_g68irqs(0),
m_ds3_gfirqs(0),
m_ds3_g68flag(0),
m_ds3_send(0),
m_ds3_reset(0),
m_ds3_gdata(0),
m_ds3_g68data(0),
m_ds3_sim_address(0),
m_ds3_scmd(0),
m_ds3_sflag(0),
m_ds3_s68irqs(0),
m_ds3_sfirqs(0),
m_ds3_s68flag(0),
m_ds3_sreset(0),
m_ds3_sdata(0),
m_ds3_s68data(0),
m_ds3_sdata_address(0),
m_ds3sdsp_timer_en(0),
m_ds3sdsp_sdata(0),
m_ds3sdsp_internal_timer(*this, "ds3sdsp_timer"),
m_ds3xdsp_timer_en(0),
m_ds3xdsp_sdata(0),
m_ds3xdsp_internal_timer(*this, "ds3xdsp_timer"),
m_adc_control(0),
m_adc12_select(0),
m_adc12_byte(0),
m_adc12_data(0),
m_hdc68k_last_wheel(0),
m_hdc68k_last_port1(0),
m_hdc68k_wheel_edge(0),
m_hdc68k_shifter_state(0),
m_st68k_sloop_bank(0),
m_st68k_last_alt_sloop_offset(0),
m_next_msp_sync(0),
m_vram_mask(0),
m_shiftreg_enable(0),
m_gsp_shiftreg_source(nullptr),
m_gfx_finescroll(0),
m_gfx_palettebank(0),
m_duart(*this, "duartn68681"),
m_asic65(*this, "asic65"),
m_sound_int_state(0),
m_video_int_state(0),
m_palette(*this, "palette"),
m_slapstic(*this, "slapstic"),
m_slapstic_bank(*this, "slapstic_bank"),
m_rs232(*this, "rs232")
{
int i;

Expand Down Expand Up @@ -508,11 +507,11 @@ harddriv_state::harddriv_state(const machine_config &mconfig, device_type type,
class harddriv_new_state : public driver_device
{
public:
harddriv_new_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_mainpcb(*this, "mainpcb")
, m_leftpcb(*this, "leftpcb")
, m_rightpcb(*this, "rightpcb")
harddriv_new_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_mainpcb(*this, "mainpcb"),
m_leftpcb(*this, "leftpcb"),
m_rightpcb(*this, "rightpcb")
{ }

void steeltal1_machine(machine_config &config);
Expand Down Expand Up @@ -790,8 +789,8 @@ static INPUT_PORTS_START( harddriv )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 12-bit EOC */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainpcb:adc8", adc0808_device, eoc_r)
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )

PORT_START("mainpcb:SW1") /* 600002 */
PORT_DIPNAME( 0x01, 0x01, "SW1:8" )
Expand Down Expand Up @@ -996,8 +995,8 @@ static INPUT_PORTS_START( racedrivc )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 12-bit EOC */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainpcb:adc8", adc0808_device, eoc_r)
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )

PORT_START("mainpcb:SW1") /* 60c002 */
PORT_DIPNAME( 0x01, 0x01, "SW1:8" )
Expand Down
9 changes: 6 additions & 3 deletions src/mame/atari/harddriv.h
Expand Up @@ -99,7 +99,6 @@ class harddriv_state : public device_t
void sound_int_write_line(int state);

protected:

void init_video();
INTERRUPT_GEN_MEMBER(hd68k_irq_gen);
TIMER_CALLBACK_MEMBER(deferred_adsp_bank_switch);
Expand Down Expand Up @@ -268,7 +267,6 @@ class harddriv_state : public device_t
void hdds3xdsp_serial_tx_callback(uint32_t data);
uint32_t hdds3xdsp_serial_rx_callback();


void adsp_data_map(address_map &map);
void adsp_program_map(address_map &map);
void driver_68k_map(address_map &map);
Expand Down Expand Up @@ -579,6 +577,7 @@ class harddriv_sound_board_device : public device_t
int hdsnddsp_get_bio();
};


/* Hard Drivin' */

class harddriv_board_device_state : public harddriv_state
Expand All @@ -592,6 +591,7 @@ class harddriv_board_device_state : public harddriv_state
// virtual void device_reset();
};


/* Hard Drivin' Compact */

class harddrivc_board_device_state : public harddriv_state
Expand All @@ -605,6 +605,7 @@ class harddrivc_board_device_state : public harddriv_state
// virtual void device_reset();
};


/* Race Drivin' */

class racedriv_board_device_state : public harddriv_state
Expand All @@ -629,6 +630,7 @@ class racedrivb1_board_device_state : public racedriv_board_device_state
virtual void device_start() override;
};


/* Race Drivin' Compact */

class racedrivc_board_device_state : public harddriv_state
Expand Down Expand Up @@ -677,6 +679,7 @@ class stunrun_board_device_state : public harddriv_state
// virtual void device_reset();
};


/* Steel Talons */

class steeltal_board_device_state : public harddriv_state
Expand Down Expand Up @@ -711,7 +714,6 @@ class steeltalp_board_device_state : public steeltal_board_device_state
};



/* Street Drivin' */

class strtdriv_board_device_state : public harddriv_state
Expand All @@ -725,6 +727,7 @@ class strtdriv_board_device_state : public harddriv_state
// virtual void device_reset();
};


/* Hard Drivin' Airbourne */

class hdrivair_board_device_state : public harddriv_state
Expand Down

0 comments on commit e4b6211

Please sign in to comment.