trunk/src/mame/drivers/chqflag.c
| r31712 | r31713 | |
| 33 | 33 | |
| 34 | 34 | WRITE8_MEMBER(chqflag_state::chqflag_bankswitch_w) |
| 35 | 35 | { |
| 36 | m_bank = data; //needed to restore the bankswitch post load |
| 37 | |
| 36 | 38 | int bankaddress; |
| 37 | 39 | UINT8 *RAM = memregion("maincpu")->base(); |
| 38 | 40 | |
| r31712 | r31713 | |
| 61 | 63 | /* other bits unknown/unused */ |
| 62 | 64 | } |
| 63 | 65 | |
| 66 | void chqflag_state::bankswitch_restore() |
| 67 | { |
| 68 | chqflag_bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, m_bank); |
| 69 | } |
| 70 | |
| 64 | 71 | WRITE8_MEMBER(chqflag_state::chqflag_vreg_w) |
| 65 | 72 | { |
| 66 | 73 | /* bits 0 & 1 = coin counters */ |
| r31712 | r31713 | |
| 281 | 288 | save_item(NAME(m_analog_ctrl)); |
| 282 | 289 | save_item(NAME(m_accel)); |
| 283 | 290 | save_item(NAME(m_wheel)); |
| 291 | save_item(NAME(m_bank)); |
| 292 | machine().save().register_postload(save_prepost_delegate(FUNC(chqflag_state::bankswitch_restore), this)); |
| 284 | 293 | } |
| 285 | 294 | |
| 286 | 295 | void chqflag_state::machine_reset() |
| r31712 | r31713 | |
| 290 | 299 | m_analog_ctrl = 0; |
| 291 | 300 | m_accel = 0; |
| 292 | 301 | m_wheel = 0; |
| 302 | m_bank = 0; |
| 293 | 303 | } |
| 294 | 304 | |
| 295 | 305 | static MACHINE_CONFIG_START( chqflag, chqflag_state ) |