diff options
author | mamehaze <mamehaze@users.noreply.github.com> | 2015-01-27 18:22:51 +0000 |
---|---|---|
committer | mamehaze <mamehaze@users.noreply.github.com> | 2015-01-27 18:22:51 +0000 |
commit | dd40bb3b09c799ca12fb5150d359dae8e30252ff (patch) | |
tree | 8afac3743675c3fe1ae8fb2bea049dc7395d75ac /src/mame/drivers/stv.c | |
parent | a9aa910a4ea57a96c80d180ef03df5090b1d42a9 (diff) |
start using callbacks for decathlete style decompression (start of refactoring) (nw)
Diffstat (limited to 'src/mame/drivers/stv.c')
-rw-r--r-- | src/mame/drivers/stv.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index 1577eceebcc..b7e7a610da3 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -1026,9 +1026,21 @@ static MACHINE_CONFIG_DERIVED( stv_5881, stv ) MCFG_SET_READ_CALLBACK(stv_state, crypt_read_callback) MACHINE_CONFIG_END + +UINT16 stv_state::crypt_read_callback_ch1(UINT32 addr) +{ + return m_maincpu->space().read_word(0x02000000 + 0x1000000 + (addr * 2)); +} + +UINT16 stv_state::crypt_read_callback_ch2(UINT32 addr) +{ + return m_maincpu->space().read_word(0x02000000 + 0x0000000 + (addr * 2)); +} + static MACHINE_CONFIG_DERIVED( stv_5838, stv ) MCFG_DEVICE_ADD("315_5838", SEGA315_5838_COMP, 0) -// MCFG_SET_5838_READ_CALLBACK(stv_state, crypt_read_callback) + MCFG_SET_5838_READ_CALLBACK_CH1(stv_state, crypt_read_callback_ch1) + MCFG_SET_5838_READ_CALLBACK_CH2(stv_state, crypt_read_callback_ch2) MACHINE_CONFIG_END |