mirror of
https://github.com/holub/mame
synced 2025-06-26 14:24:12 +03:00
tait8741.c: added save state support (nw)
cyclemb.c: added save state support (nw)
This commit is contained in:
parent
8545cb2b40
commit
18d3086feb
@ -84,24 +84,25 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu"),
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_gfxdecode(*this, "gfxdecode"),
|
||||||
|
m_palette(*this, "palette"),
|
||||||
m_vram(*this, "vram"),
|
m_vram(*this, "vram"),
|
||||||
m_cram(*this, "cram"),
|
m_cram(*this, "cram"),
|
||||||
m_obj1_ram(*this, "obj1_ram"),
|
m_obj1_ram(*this, "obj1_ram"),
|
||||||
m_obj2_ram(*this, "obj2_ram"),
|
m_obj2_ram(*this, "obj2_ram"),
|
||||||
m_obj3_ram(*this, "obj3_ram"),
|
m_obj3_ram(*this, "obj3_ram")
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
|
||||||
m_palette(*this, "palette")
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
|
required_device<palette_device> m_palette;
|
||||||
|
|
||||||
required_shared_ptr<UINT8> m_vram;
|
required_shared_ptr<UINT8> m_vram;
|
||||||
required_shared_ptr<UINT8> m_cram;
|
required_shared_ptr<UINT8> m_cram;
|
||||||
required_shared_ptr<UINT8> m_obj1_ram;
|
required_shared_ptr<UINT8> m_obj1_ram;
|
||||||
required_shared_ptr<UINT8> m_obj2_ram;
|
required_shared_ptr<UINT8> m_obj2_ram;
|
||||||
required_shared_ptr<UINT8> m_obj3_ram;
|
required_shared_ptr<UINT8> m_obj3_ram;
|
||||||
required_device<gfxdecode_device> m_gfxdecode;
|
|
||||||
required_device<palette_device> m_palette;
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
@ -120,11 +121,13 @@ public:
|
|||||||
DECLARE_WRITE8_MEMBER(cyclemb_flip_w);
|
DECLARE_WRITE8_MEMBER(cyclemb_flip_w);
|
||||||
DECLARE_READ8_MEMBER(skydest_i8741_0_r);
|
DECLARE_READ8_MEMBER(skydest_i8741_0_r);
|
||||||
DECLARE_WRITE8_MEMBER(skydest_i8741_0_w);
|
DECLARE_WRITE8_MEMBER(skydest_i8741_0_w);
|
||||||
|
|
||||||
DECLARE_DRIVER_INIT(skydest);
|
DECLARE_DRIVER_INIT(skydest);
|
||||||
DECLARE_DRIVER_INIT(cyclemb);
|
DECLARE_DRIVER_INIT(cyclemb);
|
||||||
|
virtual void machine_start();
|
||||||
virtual void machine_reset();
|
virtual void machine_reset();
|
||||||
virtual void video_start();
|
|
||||||
DECLARE_PALETTE_INIT(cyclemb);
|
DECLARE_PALETTE_INIT(cyclemb);
|
||||||
|
|
||||||
UINT32 screen_update_cyclemb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_cyclemb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
UINT32 screen_update_skydest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_skydest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
@ -164,10 +167,6 @@ PALETTE_INIT_MEMBER(cyclemb_state, cyclemb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cyclemb_state::video_start()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void cyclemb_state::cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
void cyclemb_state::cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
gfx_element *gfx = m_gfxdecode->gfx(0);
|
gfx_element *gfx = m_gfxdecode->gfx(0);
|
||||||
@ -593,6 +592,19 @@ static ADDRESS_MAP_START( cyclemb_sound_io, AS_IO, 8, cyclemb_state )
|
|||||||
AM_RANGE(0x40, 0x40) AM_READ(soundlatch_byte_r) AM_WRITE(soundlatch2_byte_w)
|
AM_RANGE(0x40, 0x40) AM_READ(soundlatch_byte_r) AM_WRITE(soundlatch2_byte_w)
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
|
|
||||||
|
void cyclemb_state::machine_start()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
save_item(NAME(m_mcu[i].rxd), i);
|
||||||
|
save_item(NAME(m_mcu[i].txd), i);
|
||||||
|
save_item(NAME(m_mcu[i].rst), i);
|
||||||
|
save_item(NAME(m_mcu[i].state), i);
|
||||||
|
save_item(NAME(m_mcu[i].packet_type), i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cyclemb_state::machine_reset()
|
void cyclemb_state::machine_reset()
|
||||||
{
|
{
|
||||||
skydest_i8741_reset();
|
skydest_i8741_reset();
|
||||||
@ -1030,5 +1042,5 @@ DRIVER_INIT_MEMBER(cyclemb_state,skydest)
|
|||||||
m_dsw_pc_hack = 0x554;
|
m_dsw_pc_hack = 0x554;
|
||||||
}
|
}
|
||||||
|
|
||||||
GAME( 1984, cyclemb, 0, cyclemb, cyclemb, cyclemb_state, cyclemb, ROT0, "Taito Corporation", "Cycle Maabou (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND )
|
GAME( 1984, cyclemb, 0, cyclemb, cyclemb, cyclemb_state, cyclemb, ROT0, "Taito Corporation", "Cycle Maabou (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
|
||||||
GAME( 1985, skydest, 0, skydest, skydest, cyclemb_state, skydest, ROT0, "Taito Corporation", "Sky Destroyer (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND )
|
GAME( 1985, skydest, 0, skydest, skydest, cyclemb_state, skydest, ROT0, "Taito Corporation", "Sky Destroyer (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
|
||||||
|
@ -250,6 +250,22 @@ void taito8741_4pack_device::device_start()
|
|||||||
m_port_handler_1_r.resolve_safe(0);
|
m_port_handler_1_r.resolve_safe(0);
|
||||||
m_port_handler_2_r.resolve_safe(0);
|
m_port_handler_2_r.resolve_safe(0);
|
||||||
m_port_handler_3_r.resolve_safe(0);
|
m_port_handler_3_r.resolve_safe(0);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
save_item(NAME(m_taito8741[i].toData), i);
|
||||||
|
save_item(NAME(m_taito8741[i].fromData), i);
|
||||||
|
save_item(NAME(m_taito8741[i].fromCmd), i);
|
||||||
|
save_item(NAME(m_taito8741[i].status), i);
|
||||||
|
save_item(NAME(m_taito8741[i].phase), i);
|
||||||
|
save_item(NAME(m_taito8741[i].txd), i);
|
||||||
|
save_item(NAME(m_taito8741[i].rxd), i);
|
||||||
|
save_item(NAME(m_taito8741[i].parallelselect), i);
|
||||||
|
save_item(NAME(m_taito8741[i].txpoint), i);
|
||||||
|
//save_item(NAME(m_taito8741[i].pending4a), i); //currently initialized to 0, never changes
|
||||||
|
save_item(NAME(m_taito8741[i].serial_out), i);
|
||||||
|
//save_item(NAME(m_taito8741[i].coins), i); // currently initialized but otherwise unused
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read status port */
|
/* read status port */
|
||||||
@ -344,6 +360,18 @@ void josvolly8741_4pack_device::device_start()
|
|||||||
m_port_handler_1_r.resolve_safe(0);
|
m_port_handler_1_r.resolve_safe(0);
|
||||||
m_port_handler_2_r.resolve_safe(0);
|
m_port_handler_2_r.resolve_safe(0);
|
||||||
m_port_handler_3_r.resolve_safe(0);
|
m_port_handler_3_r.resolve_safe(0);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
save_item(NAME(m_i8741[i].cmd), i);
|
||||||
|
save_item(NAME(m_i8741[i].sts), i);
|
||||||
|
save_item(NAME(m_i8741[i].txd), i);
|
||||||
|
//save_item(NAME(m_i8741[i].outport), i); //currently initialized to 0xff, never changed
|
||||||
|
save_item(NAME(m_i8741[i].rxd), i);
|
||||||
|
save_item(NAME(m_i8741[i].rst), i);
|
||||||
|
};
|
||||||
|
|
||||||
|
//save_item(NAME(m_nmi_enable)); //never changes from 0?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user