mirror of
https://github.com/holub/mame
synced 2025-05-31 18:11:50 +03:00
Fixed invmultis1a, invmultis2a save state problem (nw)
This commit is contained in:
parent
858ec85f74
commit
7e8606a7f2
@ -3186,14 +3186,23 @@ WRITE8_MEMBER(_8080bw_state::invmulti_eeprom_w)
|
||||
|
||||
WRITE8_MEMBER(_8080bw_state::invmulti_bank_w)
|
||||
{
|
||||
m_invmulti_bank = data; //needed to restore the bankswitch post load
|
||||
|
||||
// d0, d4, d6: bank
|
||||
int bank = (data & 1) | (data >> 3 & 2) | (data >> 4 & 4);
|
||||
membank("bank1")->set_base(memregion("maincpu")->base() + bank * 0x4000 + 0x0000);
|
||||
membank("bank2")->set_base(memregion("maincpu")->base() + bank * 0x4000 + 0x2000);
|
||||
}
|
||||
|
||||
void _8080bw_state::invmulti_bankswitch_restore()
|
||||
{
|
||||
invmulti_bank_w(m_maincpu->space(AS_PROGRAM), 0, m_invmulti_bank);
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(_8080bw_state,invmulti)
|
||||
{
|
||||
m_invmulti_bank = 0;
|
||||
|
||||
invmulti_bank_w(m_maincpu->space(AS_PROGRAM), 0, 0);
|
||||
|
||||
MACHINE_RESET_CALL_MEMBER(mw8080bw);
|
||||
@ -3219,6 +3228,9 @@ DRIVER_INIT_MEMBER(_8080bw_state,invmulti)
|
||||
// decrypt rom
|
||||
for (int i = 0; i < len; i++)
|
||||
dest[i] = BITSWAP8(src[(i & 0x100ff) | (BITSWAP8(i >> 8 & 0xff, 7,3,4,5,0,6,1,2) << 8)],0,6,5,7,4,3,1,2);
|
||||
|
||||
save_item(NAME(m_invmulti_bank));
|
||||
machine().save().register_postload(save_prepost_delegate(FUNC(_8080bw_state::invmulti_bankswitch_restore), this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
UINT8 m_schaser_background_disable;
|
||||
UINT8 m_schaser_background_select;
|
||||
UINT16 m_claybust_gun_pos;
|
||||
|
||||
int m_invmulti_bank;
|
||||
|
||||
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(sflush_80_r);
|
||||
@ -152,6 +154,7 @@ public:
|
||||
inline void set_pixel( bitmap_rgb32 &bitmap, UINT8 y, UINT8 x, const pen_t *pens, UINT8 color );
|
||||
inline void set_8_pixels( bitmap_rgb32 &bitmap, UINT8 y, UINT8 x, UINT8 data, const pen_t *pens, UINT8 fore_color, UINT8 back_color );
|
||||
void clear_extra_columns( bitmap_rgb32 &bitmap, const pen_t *pens, UINT8 color );
|
||||
void invmulti_bankswitch_restore();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user