mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
exidy.c: try to avoid postload, review appreciated (nw)
This commit is contained in:
parent
c810f562f8
commit
11fc352eb7
@ -186,21 +186,13 @@ CUSTOM_INPUT_MEMBER(exidy_state::teetert_input_r)
|
|||||||
|
|
||||||
WRITE8_MEMBER(exidy_state::fax_bank_select_w)
|
WRITE8_MEMBER(exidy_state::fax_bank_select_w)
|
||||||
{
|
{
|
||||||
m_fax_bank = data;
|
membank("bank1")->set_entry(data & 0x1f);
|
||||||
|
|
||||||
|
if ((data & 0x1f) > 0x17)
|
||||||
|
logerror("Banking to unpopulated ROM bank %02X!\n", data & 0x1f);
|
||||||
|
|
||||||
fax_bank_restore();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void exidy_state::fax_bank_restore()
|
|
||||||
{
|
|
||||||
UINT8 *RAM = memregion("maincpu")->base();
|
|
||||||
|
|
||||||
membank("bank1")->set_base(&RAM[0x10000 + (0x2000 * (m_fax_bank & 0x1f))]);
|
|
||||||
if ((m_fax_bank & 0x1f) > 0x17)
|
|
||||||
logerror("Banking to unpopulated ROM bank %02X!\n", m_fax_bank & 0x1f);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
@ -1548,11 +1540,7 @@ DRIVER_INIT_MEMBER(exidy_state,fax)
|
|||||||
|
|
||||||
exidy_video_config(0x04, 0x04, TRUE);
|
exidy_video_config(0x04, 0x04, TRUE);
|
||||||
|
|
||||||
/* reset the ROM bank */
|
membank("bank1")->configure_entries(0, 32, memregion("maincpu")->base() + 0x10000, 0x2000);
|
||||||
fax_bank_select_w(space,0,0);
|
|
||||||
|
|
||||||
save_item(NAME(m_fax_bank));
|
|
||||||
machine().save().register_postload(save_prepost_delegate(FUNC(exidy_state::fax_bank_restore), this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@ public:
|
|||||||
UINT8 m_collision_invert;
|
UINT8 m_collision_invert;
|
||||||
int m_is_2bpp;
|
int m_is_2bpp;
|
||||||
UINT8 m_int_condition;
|
UINT8 m_int_condition;
|
||||||
int m_fax_bank;
|
|
||||||
bitmap_ind16 m_background_bitmap;
|
bitmap_ind16 m_background_bitmap;
|
||||||
bitmap_ind16 m_motion_object_1_vid;
|
bitmap_ind16 m_motion_object_1_vid;
|
||||||
bitmap_ind16 m_motion_object_2_vid;
|
bitmap_ind16 m_motion_object_2_vid;
|
||||||
@ -110,7 +109,6 @@ public:
|
|||||||
inline int sprite_1_enabled();
|
inline int sprite_1_enabled();
|
||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void check_collision();
|
void check_collision();
|
||||||
void fax_bank_restore();
|
|
||||||
|
|
||||||
/* Targ and Spectar samples */
|
/* Targ and Spectar samples */
|
||||||
int m_max_freq;
|
int m_max_freq;
|
||||||
|
Loading…
Reference in New Issue
Block a user