mirror of
https://github.com/holub/mame
synced 2025-05-02 20:46:41 +03:00
paradise.c: added missing save state, fixes penky save state problem (nw)
This commit is contained in:
parent
cd61a2736d
commit
2241d4ea94
@ -678,7 +678,7 @@ void paradise_state::machine_start()
|
||||
|
||||
save_item(NAME(m_palbank));
|
||||
save_item(NAME(m_priority));
|
||||
save_item(NAME(irq_count));
|
||||
save_item(NAME(m_irq_count));
|
||||
}
|
||||
|
||||
void paradise_state::machine_reset()
|
||||
@ -686,14 +686,14 @@ void paradise_state::machine_reset()
|
||||
m_palbank = 0;
|
||||
m_priority = 0;
|
||||
|
||||
irq_count = 0;
|
||||
m_irq_count = 0;
|
||||
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(paradise_state::paradise_irq)
|
||||
{
|
||||
if (irq_count<300)
|
||||
irq_count++;
|
||||
if (m_irq_count<300)
|
||||
m_irq_count++;
|
||||
else
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
|
||||
}
|
||||
|
@ -5,17 +5,24 @@ class paradise_state : public driver_device
|
||||
public:
|
||||
paradise_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_oki2(*this, "oki2"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_vram_0(*this, "vram_0"),
|
||||
m_vram_1(*this, "vram_1"),
|
||||
m_vram_2(*this, "vram_2"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_paletteram(*this, "paletteram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_oki2(*this, "oki2"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_spriteram(*this, "spriteram") { }
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<okim6295_device> m_oki2;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_vram_0;
|
||||
@ -29,13 +36,14 @@ public:
|
||||
tilemap_t *m_tilemap_0;
|
||||
tilemap_t *m_tilemap_1;
|
||||
tilemap_t *m_tilemap_2;
|
||||
|
||||
bitmap_ind16 m_tmpbitmap;
|
||||
UINT8 m_palbank;
|
||||
UINT8 m_priority;
|
||||
UINT8 m_pixbank;
|
||||
int m_sprite_inc;
|
||||
|
||||
int irq_count;
|
||||
int m_irq_count;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(paradise_rombank_w);
|
||||
DECLARE_WRITE8_MEMBER(torus_coin_counter_w);
|
||||
DECLARE_WRITE8_MEMBER(paradise_flipscreen_w);
|
||||
@ -48,24 +56,25 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(paradise_pixmap_w);
|
||||
DECLARE_WRITE8_MEMBER(paradise_priority_w);
|
||||
DECLARE_WRITE8_MEMBER(paradise_okibank_w);
|
||||
|
||||
DECLARE_DRIVER_INIT(torus);
|
||||
DECLARE_DRIVER_INIT(paradise);
|
||||
DECLARE_DRIVER_INIT(tgtball);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info_0);
|
||||
TILE_GET_INFO_MEMBER(get_tile_info_1);
|
||||
TILE_GET_INFO_MEMBER(get_tile_info_2);
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
|
||||
UINT32 screen_update_paradise(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_torus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_madball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
INTERRUPT_GEN_MEMBER(paradise_irq);
|
||||
|
||||
void update_pix_palbank();
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<okim6295_device> m_oki2;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
};
|
||||
|
@ -164,6 +164,7 @@ void paradise_state::video_start()
|
||||
m_tilemap_2->set_transparent_pen(0xff);
|
||||
|
||||
save_item(NAME(m_tmpbitmap));
|
||||
save_item(NAME(m_pixbank));
|
||||
}
|
||||
|
||||
|
||||
@ -179,16 +180,14 @@ WRITE8_MEMBER(paradise_state::paradise_priority_w)
|
||||
m_priority = data;
|
||||
}
|
||||
|
||||
void paradise_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
void paradise_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
UINT8 *spriteram = m_spriteram;
|
||||
int i;
|
||||
for (i = 0; i < m_spriteram.bytes() ; i += m_sprite_inc)
|
||||
for (int i = 0; i < m_spriteram.bytes() ; i += m_sprite_inc)
|
||||
{
|
||||
int code = spriteram[i + 0];
|
||||
int x = spriteram[i + 1];
|
||||
int y = spriteram[i + 2] - 2;
|
||||
int attr = spriteram[i + 3];
|
||||
int code = m_spriteram[i + 0];
|
||||
int x = m_spriteram[i + 1];
|
||||
int y = m_spriteram[i + 2] - 2;
|
||||
int attr = m_spriteram[i + 3];
|
||||
|
||||
int flipx = 0; // ?
|
||||
int flipy = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user