mirror of
https://github.com/holub/mame
synced 2025-04-27 18:53:05 +03:00
(mess) ti85: nvram (nw)
This commit is contained in:
parent
ada22f3d1b
commit
697fd6e868
@ -188,9 +188,7 @@ TI-86 ports:
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "imagedev/snapquik.h"
|
#include "imagedev/snapquik.h"
|
||||||
#include "machine/nvram.h"
|
|
||||||
#include "includes/ti85.h"
|
#include "includes/ti85.h"
|
||||||
#include "mcfglgcy.h"
|
|
||||||
|
|
||||||
/* port i/o functions */
|
/* port i/o functions */
|
||||||
|
|
||||||
@ -594,9 +592,6 @@ static MACHINE_CONFIG_DERIVED( ti86, ti85 )
|
|||||||
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti86 )
|
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti86 )
|
||||||
MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 )
|
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_SNAPSHOT_ADD("snapshot", ti85_state, ti8x, "sav", 0)
|
||||||
//MCFG_TI86SERIAL_ADD( "tiserial" )
|
//MCFG_TI86SERIAL_ADD( "tiserial" )
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
@ -620,9 +615,6 @@ static MACHINE_CONFIG_DERIVED( ti83p, ti81 )
|
|||||||
MCFG_DEVICE_ADD("t6a04", T6A04, 0)
|
MCFG_DEVICE_ADD("t6a04", T6A04, 0)
|
||||||
MCFG_T6A04_SIZE(96, 64)
|
MCFG_T6A04_SIZE(96, 64)
|
||||||
|
|
||||||
MCFG_DEVICE_REMOVE("nvram")
|
|
||||||
MCFG_NVRAM_HANDLER(ti83p)
|
|
||||||
|
|
||||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||||
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
|
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
|
||||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "imagedev/snapquik.h"
|
#include "imagedev/snapquik.h"
|
||||||
#include "video/t6a04.h"
|
#include "video/t6a04.h"
|
||||||
#include "sound/speaker.h"
|
#include "sound/speaker.h"
|
||||||
|
#include "machine/nvram.h"
|
||||||
|
|
||||||
class ti85_state : public driver_device
|
class ti85_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -112,10 +112,4 @@ public:
|
|||||||
DECLARE_SNAPSHOT_LOAD_MEMBER( ti8x );
|
DECLARE_SNAPSHOT_LOAD_MEMBER( ti8x );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*----------- defined in machine/ti85.c -----------*/
|
|
||||||
NVRAM_HANDLER( ti83p );
|
|
||||||
NVRAM_HANDLER( ti86 );
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* TI85_H_ */
|
#endif /* TI85_H_ */
|
||||||
|
@ -175,9 +175,9 @@ MACHINE_START_MEMBER(ti85_state,ti83p)
|
|||||||
membank("bank2")->set_base(m_bios);
|
membank("bank2")->set_base(m_bios);
|
||||||
membank("bank3")->set_base(m_bios);
|
membank("bank3")->set_base(m_bios);
|
||||||
membank("bank4")->set_base(m_ti8x_ram);
|
membank("bank4")->set_base(m_ti8x_ram);
|
||||||
|
machine().device<nvram_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));
|
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("bank2")->set_base(m_bios + 0x04000);
|
||||||
|
|
||||||
membank("bank4")->set_base(m_ti8x_ram);
|
membank("bank4")->set_base(m_ti8x_ram);
|
||||||
|
machine().device<nvram_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));
|
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();
|
update_ti83p_memory();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NVRAM functions */
|
|
||||||
NVRAM_HANDLER( ti83p )
|
|
||||||
{
|
|
||||||
ti85_state *state = machine.driver_data<ti85_state>();
|
|
||||||
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<ti85_state>();
|
|
||||||
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)
|
TI calculators snapshot files (SAV)
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user