exidy.c: try to avoid postload, review appreciated (nw)

This commit is contained in:
Osso13 2015-01-20 19:39:00 +01:00
parent c810f562f8
commit 11fc352eb7
2 changed files with 5 additions and 19 deletions

View File

@ -186,21 +186,13 @@ CUSTOM_INPUT_MEMBER(exidy_state::teetert_input_r)
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);
/* reset the ROM bank */
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));
membank("bank1")->configure_entries(0, 32, memregion("maincpu")->base() + 0x10000, 0x2000);
}

View File

@ -73,7 +73,6 @@ public:
UINT8 m_collision_invert;
int m_is_2bpp;
UINT8 m_int_condition;
int m_fax_bank;
bitmap_ind16 m_background_bitmap;
bitmap_ind16 m_motion_object_1_vid;
bitmap_ind16 m_motion_object_2_vid;
@ -110,7 +109,6 @@ public:
inline int sprite_1_enabled();
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void check_collision();
void fax_bank_restore();
/* Targ and Spectar samples */
int m_max_freq;