emulate the dual stack System 32 games as dual stack (f1 exhaust note and air rescue)

these games use a sub-board over the main board, underneath the ROM boards to connect 2 system 32 stacks, the board contains shared RAM, it is not a network connection.

the games are designed to ONLY operate with the full setup, infact if you remove the sub-board the or either PCB stack the PCBs simply don't boot or display anything because they wait for values in the shared RAM, we were currently hacking around this to run them as a single screen, however this meant that the air rescue title screen was cut in half etc.

by emulating both stacks and the shared RAM I was able to finally remove the hacks.

I haven't touched f1lap because
This commit is contained in:
David Haywood 2015-06-10 19:11:14 +01:00
parent 923f5e3650
commit eefbf671bb
3 changed files with 1068 additions and 609 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,24 +10,12 @@
#include "sound/multipcm.h"
class segas32_state : public driver_device
class segas32_state : public device_t
{
public:
segas32_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_z80_shared_ram(*this,"z80_shared_ram"),
m_ga2_dpram(*this,"ga2_dpram"),
m_system32_workram(*this,"workram"),
m_system32_videoram(*this,"videoram", 0),
m_system32_spriteram(*this,"spriteram", 0),
m_system32_paletteram(*this,"paletteram", 0) ,
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_multipcm(*this, "sega"),
m_eeprom(*this, "eeprom"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
segas32_state(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
required_shared_ptr<UINT8> m_z80_shared_ram;
optional_shared_ptr<UINT8> m_ga2_dpram;
@ -43,6 +31,9 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<timer_device> m_irq_timer_0;
required_device<timer_device> m_irq_timer_1;
typedef void (segas32_state::*sys32_output_callback)(int which, UINT16 data);
@ -82,7 +73,6 @@ public:
sys32_output_callback m_sw1_output;
sys32_output_callback m_sw2_output;
sys32_output_callback m_sw3_output;
UINT16* m_dual_pcb_comms;
UINT16 *m_system32_protram;
UINT16 m_system32_displayenable[2];
UINT16 m_system32_tilebank_external;
@ -175,41 +165,11 @@ public:
DECLARE_WRITE8_MEMBER(sound_bank_hi_w);
DECLARE_READ8_MEMBER(sound_dummy_r);
DECLARE_WRITE8_MEMBER(sound_dummy_w);
DECLARE_WRITE16_MEMBER(dual_pcb_comms_w);
DECLARE_READ16_MEMBER(dual_pcb_comms_r);
DECLARE_READ16_MEMBER(dual_pcb_masterslave);
DECLARE_READ16_MEMBER(arescue_handshake_r);
DECLARE_READ16_MEMBER(arescue_slavebusy_r);
DECLARE_WRITE16_MEMBER(f1en_comms_echo_w);
DECLARE_WRITE8_MEMBER(multipcm_bank_w);
DECLARE_WRITE8_MEMBER(scross_bank_w);
DECLARE_DRIVER_INIT(titlef);
DECLARE_DRIVER_INIT(slipstrm);
DECLARE_DRIVER_INIT(radm);
DECLARE_DRIVER_INIT(holo);
DECLARE_DRIVER_INIT(svf);
DECLARE_DRIVER_INIT(jleague);
DECLARE_DRIVER_INIT(arescue);
DECLARE_DRIVER_INIT(jpark);
DECLARE_DRIVER_INIT(ga2);
DECLARE_DRIVER_INIT(scross);
DECLARE_DRIVER_INIT(spidman);
DECLARE_DRIVER_INIT(sonicp);
DECLARE_DRIVER_INIT(f1en);
DECLARE_DRIVER_INIT(dbzvrvs);
DECLARE_DRIVER_INIT(brival);
DECLARE_DRIVER_INIT(harddunk);
DECLARE_DRIVER_INIT(arabfgt);
DECLARE_DRIVER_INIT(sonic);
DECLARE_DRIVER_INIT(alien3);
DECLARE_DRIVER_INIT(darkedge);
DECLARE_DRIVER_INIT(radr);
DECLARE_DRIVER_INIT(f1lap);
DECLARE_DRIVER_INIT(orunners);
TILE_GET_INFO_MEMBER(get_tile_info);
DECLARE_MACHINE_RESET(system32);
DECLARE_VIDEO_START(system32);
DECLARE_VIDEO_START(multi32);
UINT32 screen_update_system32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
UINT32 screen_update_multi32_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
UINT32 screen_update_multi32_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@ -272,7 +232,71 @@ public:
void clear_sound_irq(int which);
void darkedge_fd1149_vblank();
void f1lap_fd1149_vblank();
void init_alien3(void);
void init_arescue(int m_hasdsp);
void init_arabfgt(void);
void init_brival(void);
void init_darkedge(void);
void init_dbzvrvs(void);
void init_f1en(void);
void init_f1lap(void);
void init_ga2(void);
void init_harddunk(void);
void init_holo(void);
void init_jpark(void);
void init_orunners(void);
void init_radm(void);
void init_radr(void);
void init_scross(void);
void init_slipstrm(void);
void init_sonic(void);
void init_sonicp(void);
void init_spidman(void);
void init_svf(void);
void init_jleague(void);
void init_titlef(void);
protected:
virtual void device_start();
virtual void device_reset();
};
class segas32_regular_state : public segas32_state
{
public:
segas32_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const;
// virtual void device_start();
// virtual void device_reset();
};
class segas32_v25_state : public segas32_state
{
public:
segas32_v25_state(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const;
virtual void device_start();
// virtual void device_reset();
};
class sega_multi32_state : public segas32_state
{
public:
sega_multi32_state(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const;
virtual void device_start();
// virtual void device_reset();
};
/*----------- defined in machine/segas32.c -----------*/
extern const UINT8 ga2_v25_opcode_table[];
extern const device_type SEGA_S32_PCB;

View File

@ -245,22 +245,18 @@ void segas32_state::common_start(int multi32)
m_solid_ffff = auto_alloc_array(machine(), UINT16, 512);
memset(m_solid_ffff, 0xff, sizeof(m_solid_ffff[0]) * 512);
memset(m_system32_videoram, 0x00, 0x20000);
/* initialize videoram */
m_system32_videoram[0x1ff00/2] = 0x8000;
memset(m_mixer_control, 0xff, sizeof(m_mixer_control[0][0]) * 0x80 );
}
VIDEO_START_MEMBER(segas32_state,system32)
{
common_start(0);
}
VIDEO_START_MEMBER(segas32_state,multi32)
{
common_start(1);
}
/*************************************