summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Osso13 <mesgnet@yahoo.it>2015-01-20 19:39:00 +0100
committer Osso13 <mesgnet@yahoo.it>2015-01-20 19:39:00 +0100
commit11fc352eb7141481a32bfa0a8834f8ebeb4fa918 (patch)
tree3831d92dfb6114e9f88e50906ddce7b2504df672
parentc810f562f81e58cca25cdb5d79d92aabba02a49c (diff)
exidy.c: try to avoid postload, review appreciated (nw)
-rw-r--r--src/mame/drivers/exidy.c22
-rw-r--r--src/mame/includes/exidy.h2
2 files changed, 5 insertions, 19 deletions
diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c
index 4d88d4ef512..c2119562802 100644
--- a/src/mame/drivers/exidy.c
+++ b/src/mame/drivers/exidy.c
@@ -186,22 +186,14 @@ 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);
}
-
/*************************************
*
* Main CPU memory handlers
@@ -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);
}
diff --git a/src/mame/includes/exidy.h b/src/mame/includes/exidy.h
index 5baafe0bc34..62388b93061 100644
--- a/src/mame/includes/exidy.h
+++ b/src/mame/includes/exidy.h
@@ -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;