summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2018-02-22 13:23:26 +0000
committer smf- <smf-@users.noreply.github.com>2018-02-22 13:23:50 +0000
commitd53fed6b1e7e334d49bc02472a18ac27ebbe3e3c (patch)
tree7edeb86d9ca9d5001db7555c9a41a78761cbbb36
parent5deafe11fb003eb4575e5e14f24b7fdb0c8b1a64 (diff)
ti8* Re-implemented ipl disable, which was removed in https://github.com/mamedev/mame/commit/080dc67abaeeb8b05ec2283526ad51bb9dbac6d2 [smf]
-rw-r--r--src/mame/drivers/ti85.cpp4
-rw-r--r--src/mame/includes/ti85.h3
-rw-r--r--src/mame/machine/ti85.cpp43
3 files changed, 47 insertions, 3 deletions
diff --git a/src/mame/drivers/ti85.cpp b/src/mame/drivers/ti85.cpp
index d10c46324c2..8f39f16ff4d 100644
--- a/src/mame/drivers/ti85.cpp
+++ b/src/mame/drivers/ti85.cpp
@@ -361,8 +361,8 @@ ADDRESS_MAP_END
ADDRESS_MAP_START(ti85_state::ti83p_asic_mem)
AM_RANGE(0x0000, 0x3fff) AM_DEVREADWRITE("membank1", address_map_bank_device, read8, write8)
- AM_RANGE(0x4000, 0x7fff) AM_DEVREADWRITE("membank2", address_map_bank_device, read8, write8)
- AM_RANGE(0x8000, 0xbfff) AM_DEVREADWRITE("membank3", address_map_bank_device, read8, write8)
+ AM_RANGE(0x4000, 0x7fff) AM_DEVWRITE("membank2", address_map_bank_device, write8) AM_READ(ti83p_membank2_r)
+ AM_RANGE(0x8000, 0xbfff) AM_DEVWRITE("membank3", address_map_bank_device, write8) AM_READ(ti83p_membank3_r)
AM_RANGE(0xc000, 0xffff) AM_DEVREADWRITE("membank4", address_map_bank_device, read8, write8)
ADDRESS_MAP_END
diff --git a/src/mame/includes/ti85.h b/src/mame/includes/ti85.h
index 0095dd5250a..67d1eff90aa 100644
--- a/src/mame/includes/ti85.h
+++ b/src/mame/includes/ti85.h
@@ -211,7 +211,8 @@ public:
DECLARE_WRITE8_MEMBER(ti83pse_ctimer3_loop_w);
DECLARE_READ8_MEMBER(ti83pse_ctimer3_count_r);
DECLARE_WRITE8_MEMBER(ti83pse_ctimer3_count_w);
-
+ DECLARE_READ8_MEMBER(ti83p_membank2_r);
+ DECLARE_READ8_MEMBER(ti83p_membank3_r);
void ti8x_update_bank(address_space &space, uint8_t bank, uint8_t *base, uint8_t page, bool is_ram);
void update_ti85_memory();
diff --git a/src/mame/machine/ti85.cpp b/src/mame/machine/ti85.cpp
index be098565c09..b13d862d8dc 100644
--- a/src/mame/machine/ti85.cpp
+++ b/src/mame/machine/ti85.cpp
@@ -269,6 +269,49 @@ MACHINE_RESET_MEMBER(ti85_state,ti85)
m_PCR = 0xc0;
}
+READ8_MEMBER(ti85_state::ti83p_membank2_r)
+{
+ /// http://wikiti.brandonw.net/index.php?title=83Plus:State_of_the_calculator_at_boot
+ /// should only trigger when fetching opcodes
+ if (m_booting && !machine().side_effect_disabled())
+ {
+ m_booting = false;
+
+ if (m_model == TI83P)
+ {
+ update_ti83p_memory();
+ }
+ else
+ {
+ update_ti83pse_memory();
+ }
+ }
+
+ return m_membank2->read8(space, offset);
+}
+
+READ8_MEMBER(ti85_state::ti83p_membank3_r)
+{
+ /// http://wikiti.brandonw.net/index.php?title=83Plus:State_of_the_calculator_at_boot
+ /// should only trigger when fetching opcodes
+ /// should be using port 6 instead of 4
+ if (m_booting && (m_ti83p_port4 & 1) && !machine().side_effect_disabled())
+ {
+ m_booting = false;
+
+ if (m_model == TI83P)
+ {
+ update_ti83p_memory();
+ }
+ else
+ {
+ update_ti83pse_memory();
+ }
+ }
+
+ return m_membank3->read8(space, offset);
+}
+
MACHINE_RESET_MEMBER(ti85_state,ti83p)
{
m_PCR = 0x00;