summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author miodragm <mmicko@gmail.com>2014-10-25 10:32:04 +0200
committer miodragm <mmicko@gmail.com>2014-10-25 10:32:04 +0200
commit45b1c02ed55ad242f9c3cda07870c63f17ac82e6 (patch)
treef97b3f9d71bb0376b14356075c3a1cd7c0c4f59b
parent82b448adf8e71f645a76a6475ea6914b32b6a8fb (diff)
parentcd9047f67c5b4bf58eae7e1bbf72f0a74e9de336 (diff)
Merge branch 'Jonimoose-ti85_changes_for_upstream'
-rwxr-xr-x[-rw-r--r--]src/mess/drivers/ti85.c38
-rwxr-xr-x[-rw-r--r--]src/mess/includes/ti85.h11
-rwxr-xr-x[-rw-r--r--]src/mess/machine/ti85.c101
-rw-r--r--src/mess/mess.lst3
4 files changed, 114 insertions, 39 deletions
diff --git a/src/mess/drivers/ti85.c b/src/mess/drivers/ti85.c
index 87c667233b2..ca7e6658d3e 100644..100755
--- a/src/mess/drivers/ti85.c
+++ b/src/mess/drivers/ti85.c
@@ -1,5 +1,6 @@
/***************************************************************************
TI-85 and TI-86 drivers by Krzysztof Strzecha
+TI-83 Plus, TI-84 Plus, and Siliver Edition support by Jon Sturm
Notes:
1. After start TI-85 waits for ON key interrupt, so press ON key to start
@@ -342,6 +343,12 @@ static ADDRESS_MAP_START( ti83pse_banked_mem , AS_PROGRAM, 8, ti85_state )
AM_RANGE(0x200000, 0x21BFFF) AM_RAM AM_SHARE("nvram")
ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( ti84p_banked_mem , AS_PROGRAM, 8, ti85_state )
+ AM_RANGE(0x0000, 0xfffff) AM_DEVREADWRITE("flash", intelfsh8_device, read, write)
+ AM_RANGE(0x200000, 0x21BFFF) AM_RAM AM_SHARE("nvram")
+ADDRESS_MAP_END
+
static ADDRESS_MAP_START( ti83p_banked_mem , AS_PROGRAM, 8, ti85_state )
AM_RANGE(0x00000, 0x7ffff) AM_DEVREADWRITE("flash", intelfsh8_device, read, write)
AM_RANGE(0x100000, 0x107fff) AM_RAM AM_SHARE("nvram")
@@ -730,17 +737,31 @@ static MACHINE_CONFIG_DERIVED( ti83pse, ti83p )
MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti83pse )
- MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti83pse )
MCFG_DEVICE_REPLACE("flash", FUJITSU_29F160T, 0)
//MCFG_TI83PSERIAL_ADD( "tiserial" )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( ti84p, ti83pse )
- MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
- //MCFG_TI83PSERIAL_ADD( "tiserial" )
+ MCFG_DEVICE_MODIFY("membank1")
+ MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+
+ MCFG_DEVICE_MODIFY("membank2")
+ MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+
+ MCFG_DEVICE_MODIFY("membank3")
+ MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+
+ MCFG_DEVICE_MODIFY("membank4")
+ MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+
+ MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84p )
+ MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( ti84pse, ti83pse )
+ MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84pse )
+MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( ti73, ti83p )
//MCFG_DEVICE_REMOVE( "tiserial" )
@@ -888,13 +909,12 @@ ROM_START (ti84pse)
ROM_END
ROM_START (ti84p)
- ROM_REGION (0x100000, "flash",0)
- ROM_DEFAULT_BIOS("v241")
- ROM_SYSTEM_BIOS( 0, "v241", "V 2.41" )
- ROMX_LOAD( "ti84v241.bin", 0x00000, 0x100000, CRC(5758db36) SHA1(7daa4f22e9b5dc8a1cc8fd31bceece9fa8b43515), ROM_BIOS(1) )
+ ROM_REGION (0x100000, "flash",0)
+ ROM_DEFAULT_BIOS("b100v255mp")
+ ROM_SYSTEM_BIOS( 0, "b100v255mp", "Boot 1.00 OS V 2.55MP" )
+ ROMX_LOAD( "ti84pb100v255mp.bin", 0x00000, 0x100000, CRC(4AF31251) SHA1(8F67269346644B87E7CD0F353F5F4030E787CF57), ROM_BIOS(1) )
ROM_END
-
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
COMP( 1990, ti81, 0, 0, ti81, ti81, driver_device, 0, "Texas Instruments", "TI-81", GAME_NO_SOUND )
COMP( 1992, ti85, 0, 0, ti85d, ti85, driver_device, 0, "Texas Instruments", "TI-85", GAME_NO_SOUND )
@@ -906,4 +926,4 @@ COMP( 1998, ti73, 0, 0, ti73, ti82, driver_device, 0, "T
COMP( 1999, ti83p, 0, 0, ti83p, ti82, driver_device, 0, "Texas Instruments", "TI-83 Plus", GAME_NO_SOUND )
COMP( 2001, ti83pse, 0, 0, ti83pse, ti82, driver_device, 0, "Texas Instruments", "TI-83 Plus Silver Edition", GAME_NO_SOUND )
COMP( 2004, ti84p, 0, 0, ti84p, ti82, driver_device, 0, "Texas Instruments", "TI-84 Plus", GAME_NO_SOUND )
-COMP( 2004, ti84pse, 0, 0, ti83pse, ti82, driver_device, 0, "Texas Instruments", "TI-84 Plus Silver Edition", GAME_NO_SOUND )
+COMP( 2004, ti84pse, 0, 0, ti84pse, ti82, driver_device, 0, "Texas Instruments", "TI-84 Plus Silver Edition", GAME_NO_SOUND )
diff --git a/src/mess/includes/ti85.h b/src/mess/includes/ti85.h
index ffec16c1c95..40c98d9ea52 100644..100755
--- a/src/mess/includes/ti85.h
+++ b/src/mess/includes/ti85.h
@@ -16,7 +16,7 @@
/* model */
-typedef enum {
+enum ti85_model {
TI81,
TI81v2,
TI82,
@@ -27,7 +27,7 @@ typedef enum {
TI83PSE,
TI84P,
TI84PSE
-} ti85_models;
+};
typedef struct
{
@@ -74,6 +74,8 @@ public:
optional_device<address_map_bank_device> m_membank3;
optional_device<address_map_bank_device> m_membank4;
+ ti85_model m_model;
+
UINT8 m_LCD_memory_base;
UINT8 m_LCD_contrast;
UINT8 m_LCD_status;
@@ -167,11 +169,14 @@ public:
DECLARE_PALETTE_INIT(ti85);
DECLARE_MACHINE_RESET(ti85);
DECLARE_MACHINE_RESET(ti83p);
- DECLARE_MACHINE_RESET(ti83pse);
DECLARE_PALETTE_INIT(ti82);
DECLARE_MACHINE_START(ti86);
DECLARE_MACHINE_START(ti83p);
DECLARE_MACHINE_START(ti83pse);
+ DECLARE_MACHINE_START(ti84pse);
+ DECLARE_MACHINE_START(ti84p);
+ void ti8xpse_init_common();
+
UINT32 screen_update_ti85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(ti85_timer_callback);
TIMER_CALLBACK_MEMBER(ti83_timer1_callback);
diff --git a/src/mess/machine/ti85.c b/src/mess/machine/ti85.c
index 60293e973c8..44fc0d0ae9f 100644..100755
--- a/src/mess/machine/ti85.c
+++ b/src/mess/machine/ti85.c
@@ -1,5 +1,6 @@
/***************************************************************************
TI-85 driver by Krzysztof Strzecha
+ TI-83 Plus, TI-84 Plus, and Siliver Edition support by Jon Sturm
Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
I/O ports)
@@ -236,6 +237,8 @@ void ti85_state::update_ti86_memory ()
void ti85_state::machine_start()
{
+ m_model = TI85;
+
address_space &space = m_maincpu->space(AS_PROGRAM);
m_bios = memregion("bios")->base();
@@ -277,33 +280,38 @@ MACHINE_RESET_MEMBER(ti85_state,ti83p)
m_PCR = 0xc0;
m_ti8x_memory_page_0 = 0;//0x1f;
- m_ti8x_memory_page_1 = 0x1f;
- m_ti8x_memory_page_2 = 0;
- m_ti8x_memory_page_3 = 0;
- m_ti83p_port4 = 1;
- update_ti83p_memory();
- m_maincpu->set_pc(0x8000);
-}
-
-MACHINE_RESET_MEMBER(ti85_state,ti83pse)
-{
- m_red_out = 0x00;
- m_white_out = 0x00;
- m_PCR = 0xc0;
+ if (m_model == TI83P)
+ {
+ m_ti8x_memory_page_1 = 0x1f;
+ }
+ else if (m_model == TI84P)
+ {
+ m_ti8x_memory_page_1 = 0x3f;
+ }
+ else
+ {
+ m_ti8x_memory_page_1 = 0x7f;
+ }
- m_ti8x_memory_page_0 = 0;//0x1f;
- m_ti8x_memory_page_1 = 0x7f;
m_ti8x_memory_page_2 = 0;
m_ti8x_memory_page_3 = 0;
m_ti83p_port4 = 1;
- update_ti83pse_memory();
+ if (m_model == TI83P)
+ {
+ update_ti83p_memory();
+ }
+ else
+ {
+ update_ti83pse_memory();
+ }
m_maincpu->set_pc(0x8000);
}
MACHINE_START_MEMBER(ti85_state,ti83p)
{
+ m_model = TI83P;
//address_space &space = m_maincpu->space(AS_PROGRAM);
//m_bios = memregion("flash")->base();
@@ -326,13 +334,17 @@ MACHINE_START_MEMBER(ti85_state,ti83p)
m_ti83p_port4 = 1;
m_flash_unlocked = 0;
- ti85_state::update_ti83p_memory ();
+ ti85_state::update_ti83p_memory();
+ m_maincpu->set_pc(0x8000); //this is a hack due to incomplete memory mapping emulation
+
machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
machine().scheduler().timer_pulse(attotime::from_hz(512), timer_expired_delegate(FUNC(ti85_state::ti83_timer2_callback),this));
- /* save states and debugging */
- save_item(NAME(m_timer_interrupt_mask));
+
+ /* save states and debugging */
+ save_item(NAME(m_timer_interrupt_status));
+ save_item(NAME(m_timer_interrupt_mask));
save_item(NAME(m_ti8x_memory_page_0));
save_item(NAME(m_ti8x_memory_page_1));
save_item(NAME(m_ti8x_memory_page_2));
@@ -340,7 +352,7 @@ MACHINE_START_MEMBER(ti85_state,ti83p)
save_item(NAME(m_ti83p_port4));
}
-MACHINE_START_MEMBER(ti85_state,ti83pse)
+void ti85_state::ti8xpse_init_common()
{
//address_space &space = m_maincpu->space(AS_PROGRAM);
//address_space &asic = ADDRESS_MAP_NAME(ti83p_asic_mem);
@@ -352,7 +364,7 @@ MACHINE_START_MEMBER(ti85_state,ti83pse)
m_ON_interrupt_status = 0;
m_ON_pressed = 0;
m_ti8x_memory_page_0 = 00;//0x7f;
- m_ti8x_memory_page_1 = 0x7f;
+ m_ti8x_memory_page_1 = (m_model != TI84P ) ? 0x7f : 0x3f ;
m_ti8x_memory_page_2 = 0;
m_ti8x_memory_page_3 = 0;
m_LCD_memory_base = 0;
@@ -365,8 +377,8 @@ MACHINE_START_MEMBER(ti85_state,ti83pse)
m_ti83p_port4 = 1;
m_flash_unlocked = 0;
- ti85_state::update_ti83p_memory();
- m_maincpu->set_pc(0x8000);
+ ti85_state::update_ti83pse_memory();
+ m_maincpu->set_pc(0x8000);//same as above, hack to work around incomplete memory mapping emulation
machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
@@ -376,7 +388,7 @@ MACHINE_START_MEMBER(ti85_state,ti83pse)
m_crystal_timer2 = timer_alloc(CRYSTAL_TIMER2);
m_crystal_timer3 = timer_alloc(CRYSTAL_TIMER3);
- /* save states and debugging */
+ /* save states and debugging */
save_item(NAME(m_ctimer_interrupt_status));
save_item(NAME(m_timer_interrupt_status));
save_item(NAME(m_ti8x_memory_page_0));
@@ -386,6 +398,28 @@ MACHINE_START_MEMBER(ti85_state,ti83pse)
save_item(NAME(m_ti83p_port4));
}
+
+MACHINE_START_MEMBER(ti85_state,ti83pse)
+{
+ m_model = TI84PSE;
+
+ ti8xpse_init_common();
+}
+
+MACHINE_START_MEMBER(ti85_state,ti84pse)
+{
+ m_model = TI83PSE;
+
+ ti8xpse_init_common();
+}
+
+MACHINE_START_MEMBER(ti85_state,ti84p)
+{
+ m_model = TI84P;
+
+ ti8xpse_init_common();
+}
+
MACHINE_START_MEMBER(ti85_state,ti86)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
@@ -763,13 +797,28 @@ WRITE8_MEMBER(ti85_state::ti83pse_port_0005_w)
WRITE8_MEMBER(ti85_state::ti83pse_port_0006_w)
{
- m_ti8x_memory_page_1 = data; //& ((data&0x80) ? 0x41 : 0x7f);
+
+ if ((m_model == TI84P) && (data < 0x80))
+ {
+ m_ti8x_memory_page_1 = data & 0x3f;
+ }
+ else
+ {
+ m_ti8x_memory_page_1 = data;
+ }
update_ti83pse_memory();
}
WRITE8_MEMBER(ti85_state::ti83pse_port_0007_w)
{
- m_ti8x_memory_page_2 = data; //& ((data&0x80) ? 0x41 : 0x7f);
+ if ((m_model == TI84P) && (data < 0x80))
+ {
+ m_ti8x_memory_page_2 = data & 0x3f;
+ }
+ else
+ {
+ m_ti8x_memory_page_2 = data;
+ }
update_ti83pse_memory();
}
diff --git a/src/mess/mess.lst b/src/mess/mess.lst
index 2a878093bd0..ba231c948a7 100644
--- a/src/mess/mess.lst
+++ b/src/mess/mess.lst
@@ -1067,8 +1067,9 @@ ti83 // 1996 TI-83 (Z80 6 MHz)
ti86 // 1997 TI-86 (Z80 6 MHz)
ti83p // 1999 TI-83 Plus (Z80 6 MHz)
ti83pse // 2001 TI-83 Plus Silver Edition
-//ti84p // 2004 TI-84 Plus
+ti84p // 2004 TI-84 Plus
ti84pse // 2004 TI-84 Plus Silver Edition
+//ti84cse // 2013 TI-84 Plus C Silver Edition (color screen)
ti89 // 1998 TI-89
ti92 // 1995 TI-92
ti92p // 1999 TI-92 Plus