Added working save states to svolleybl and the rest of rpunch.c game drivers. (nw)

This commit is contained in:
Ivan Vangelista 2014-07-11 10:49:29 +00:00
parent 9f5810aa7e
commit a3ff93c233
2 changed files with 42 additions and 20 deletions

View File

@ -117,6 +117,25 @@
#define MASTER_CLOCK 16000000
/*************************************
*
* Machine initialization
*
*************************************/
void rpunch_state::machine_start()
{
save_item(NAME(m_sound_data));
save_item(NAME(m_sound_busy));
save_item(NAME(m_ym2151_irq));
save_item(NAME(m_upd_rom_bank));
save_item(NAME(m_sprite_xoffs));
save_item(NAME(m_videoflags));
save_item(NAME(m_crtc_register));
save_item(NAME(m_bins));
save_item(NAME(m_gins));
}
/*************************************
*
* Interrupt handling
@ -814,11 +833,11 @@ DRIVER_INIT_MEMBER(rpunch_state,svolley)
*
*************************************/
GAME( 1987, rabiolep, 0, rpunch, rabiolep, rpunch_state, rabiolep, ROT0, "V-System Co.", "Rabio Lepus (Japan)", GAME_NO_COCKTAIL )
GAME( 1987, rpunch, rabiolep, rpunch, rpunch, rpunch_state, rabiolep, ROT0, "V-System Co. (Bally/Midway/Sente license)", "Rabbit Punch (US)", GAME_NO_COCKTAIL )
GAME( 1989, svolley, 0, svolley, svolley, rpunch_state, svolley, ROT0, "V-System Co.", "Super Volleyball (Japan)", GAME_NO_COCKTAIL )
GAME( 1989, svolleyk, svolley, svolley, svolley, rpunch_state, svolley, ROT0, "V-System Co.", "Super Volleyball (Korea)", GAME_NO_COCKTAIL )
GAME( 1989, svolleyu, svolley, svolley, svolley, rpunch_state, svolley, ROT0, "V-System Co. (Data East license)", "Super Volleyball (US)", GAME_NO_COCKTAIL )
GAME( 1987, rabiolep, 0, rpunch, rabiolep, rpunch_state, rabiolep, ROT0, "V-System Co.", "Rabio Lepus (Japan)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL )
GAME( 1987, rpunch, rabiolep, rpunch, rpunch, rpunch_state, rabiolep, ROT0, "V-System Co. (Bally/Midway/Sente license)", "Rabbit Punch (US)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL )
GAME( 1989, svolley, 0, svolley, svolley, rpunch_state, svolley, ROT0, "V-System Co.", "Super Volleyball (Japan)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL )
GAME( 1989, svolleyk, svolley, svolley, svolley, rpunch_state, svolley, ROT0, "V-System Co.", "Super Volleyball (Korea)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL )
GAME( 1989, svolleyu, svolley, svolley, svolley, rpunch_state, svolley, ROT0, "V-System Co. (Data East license)", "Super Volleyball (US)", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL )
// video registers are changed, and there's some kind of RAM at 090xxx, possible a different sprite scheme for the bootleg (even if the original is intact)
// the sound system seems to be ripped from the later Power Spikes (see aerofgt.c)

View File

@ -7,30 +7,39 @@ class rpunch_state : public driver_device
public:
rpunch_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_bitmapram(*this, "bitmapram"),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_upd7759(*this, "upd"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
m_palette(*this, "palette"),
m_videoram(*this, "videoram"),
m_bitmapram(*this, "bitmapram"),
m_spriteram(*this, "spriteram") { }
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<upd7759_device> m_upd7759;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<UINT16> m_videoram;
required_shared_ptr<UINT16> m_bitmapram;
required_shared_ptr<UINT16> m_spriteram;
UINT8 m_sound_data;
UINT8 m_sound_busy;
UINT8 m_ym2151_irq;
UINT8 m_upd_rom_bank;
required_shared_ptr<UINT16> m_bitmapram;
int m_sprite_palette;
tilemap_t *m_background[2];
int m_sprite_xoffs;
UINT16 m_videoflags;
UINT8 m_crtc_register;
emu_timer *m_crtc_timer;
UINT8 m_bins;
UINT8 m_gins;
required_shared_ptr<UINT16> m_spriteram;
tilemap_t *m_background[2];
emu_timer *m_crtc_timer;
DECLARE_WRITE_LINE_MEMBER(ym2151_irq_gen);
DECLARE_WRITE16_MEMBER(sound_command_w);
DECLARE_READ8_MEMBER(sound_command_r);
@ -48,22 +57,16 @@ public:
DECLARE_DRIVER_INIT(svolley);
TILE_GET_INFO_MEMBER(get_bg0_tile_info);
TILE_GET_INFO_MEMBER(get_bg1_tile_info);
virtual void machine_start();
virtual void machine_reset();
DECLARE_VIDEO_START(rpunch);
DECLARE_VIDEO_START(svolley);
int m_sprite_xoffs;
UINT32 screen_update_rpunch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(sound_command_w_callback);
TIMER_CALLBACK_MEMBER(crtc_interrupt_gen);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int stop);
void draw_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<upd7759_device> m_upd7759;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
};