diff --git a/src/mess/drivers/ti85.c b/src/mess/drivers/ti85.c index b71cf2a67b3..906e3778c28 100644 --- a/src/mess/drivers/ti85.c +++ b/src/mess/drivers/ti85.c @@ -188,9 +188,7 @@ TI-86 ports: #include "emu.h" #include "cpu/z80/z80.h" #include "imagedev/snapquik.h" -#include "machine/nvram.h" #include "includes/ti85.h" -#include "mcfglgcy.h" /* port i/o functions */ @@ -594,9 +592,6 @@ static MACHINE_CONFIG_DERIVED( ti86, ti85 ) MCFG_MACHINE_START_OVERRIDE(ti85_state, ti86 ) MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 ) - MCFG_DEVICE_REMOVE("nvram") - MCFG_NVRAM_HANDLER( ti86 ) - MCFG_SNAPSHOT_ADD("snapshot", ti85_state, ti8x, "sav", 0) //MCFG_TI86SERIAL_ADD( "tiserial" ) MACHINE_CONFIG_END @@ -620,9 +615,6 @@ static MACHINE_CONFIG_DERIVED( ti83p, ti81 ) MCFG_DEVICE_ADD("t6a04", T6A04, 0) MCFG_T6A04_SIZE(96, 64) - MCFG_DEVICE_REMOVE("nvram") - MCFG_NVRAM_HANDLER(ti83p) - MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) diff --git a/src/mess/includes/ti85.h b/src/mess/includes/ti85.h index 5a689c04e38..bfe6d1366df 100644 --- a/src/mess/includes/ti85.h +++ b/src/mess/includes/ti85.h @@ -10,7 +10,7 @@ #include "imagedev/snapquik.h" #include "video/t6a04.h" #include "sound/speaker.h" - +#include "machine/nvram.h" class ti85_state : public driver_device { @@ -112,10 +112,4 @@ public: DECLARE_SNAPSHOT_LOAD_MEMBER( ti8x ); }; - -/*----------- defined in machine/ti85.c -----------*/ -NVRAM_HANDLER( ti83p ); -NVRAM_HANDLER( ti86 ); - - #endif /* TI85_H_ */ diff --git a/src/mess/machine/ti85.c b/src/mess/machine/ti85.c index 45f11cc7ea1..ddc31573fdd 100644 --- a/src/mess/machine/ti85.c +++ b/src/mess/machine/ti85.c @@ -175,9 +175,9 @@ MACHINE_START_MEMBER(ti85_state,ti83p) membank("bank2")->set_base(m_bios); membank("bank3")->set_base(m_bios); membank("bank4")->set_base(m_ti8x_ram); + machine().device("nvram")->set_base(m_ti8x_ram, sizeof(UINT8)*32*1024); machine().scheduler().timer_pulse(attotime::from_hz(200), timer_expired_delegate(FUNC(ti85_state::ti85_timer_callback),this)); - } @@ -211,6 +211,7 @@ MACHINE_START_MEMBER(ti85_state,ti86) membank("bank2")->set_base(m_bios + 0x04000); membank("bank4")->set_base(m_ti8x_ram); + machine().device("nvram")->set_base(m_ti8x_ram, sizeof(UINT8)*128*1024); machine().scheduler().timer_pulse(attotime::from_hz(200), timer_expired_delegate(FUNC(ti85_state::ti85_timer_callback),this)); } @@ -498,45 +499,6 @@ WRITE8_MEMBER(ti85_state::ti83p_port_0007_w) update_ti83p_memory(); } -/* NVRAM functions */ -NVRAM_HANDLER( ti83p ) -{ - ti85_state *state = machine.driver_data(); - if (read_or_write) - { - file->write(state->m_ti8x_ram, sizeof(unsigned char)*32*1024); - } - else - { - if (file) - { - file->read(state->m_ti8x_ram, sizeof(unsigned char)*32*1024); - state->m_maincpu->set_state_int(Z80_PC,0x0c59); - } - else - memset(state->m_ti8x_ram, 0, sizeof(unsigned char)*32*1024); - } -} - -NVRAM_HANDLER( ti86 ) -{ - ti85_state *state = machine.driver_data(); - if (read_or_write) - { - file->write(state->m_ti8x_ram, sizeof(unsigned char)*128*1024); - } - else - { - if (file) - { - file->read(state->m_ti8x_ram, sizeof(unsigned char)*128*1024); - state->m_maincpu->set_state_int(Z80_PC,0x0c59); - } - else - memset(state->m_ti8x_ram, 0, sizeof(unsigned char)*128*1024); - } -} - /*************************************************************************** TI calculators snapshot files (SAV) ***************************************************************************/