Skip to content

Commit c38680b

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 798d1d8 + acf0aea commit c38680b

18 files changed

+776
-173
lines changed

hash/megacd.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ Black screen, requires sub CPU to be overclocked by 1.5x
17361736
</part>
17371737
</software>
17381738

1739-
<software name="blckhole">
1739+
<software name="blackhj" cloneof="blackh">
17401740
<!-- source toseciso
17411741
<rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)[!].cue" size="3363" crc="8739246c" />
17421742
<rom name="Black Hole Assault (1992)(Micronet)(NTSC)(JP)(Track 01 of 23)[!].iso" size="12238848" crc="ae2463cc" />
@@ -3303,7 +3303,7 @@ Requires [32X] add-on
33033303
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Sega - Tec Toy)(NTSC)(Br)(en)(Track 1 of 2)[!].iso" size="567900160" crc="0def7fd1" />
33043304
<rom name="Cadillacs and Dinosaurs - The Second Cataclysm (1994)(Sega - Tec Toy)(NTSC)(Br)(en)(Track 2 of 2)[!].wav" size="877340" crc="4e0b4ee8" />
33053305
-->
3306-
<description>Cadillacs and Dinosaurs - The Second Cataclysm (Bra)</description>
3306+
<description>Cadillacs and Dinosaurs - The Second Cataclysm (Brazil)</description>
33073307
<year>1994</year>
33083308
<publisher>Tec Toy</publisher>
33093309
<info name="serial" value="063496"/>
@@ -10199,7 +10199,7 @@ Requires [disc swap]
1019910199
<rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 2 of 2).img" size="517830432" crc="7d03c12f" md5="765aa3e041b84aa867052d00d347afdb" sha1="6a119169b3ce0ed59afe9c63240f7a446206fdf1"/>
1020010200
<rom name="Media (CD-ROM)\Night Trap (Rerelease) (1994)(Digital Pictures)(US) - (Disc 2 of 2).sub" size="21135936" crc="7a7d2c9e" md5="e70ac43455d2ac0d3a09c8d93a073a8e" sha1="da0b4fad1a393f9fa4b8f3f580e9af42c7695189"/>
1020110201
-->
10202-
<description>Night Trap (USA, Re-Release)</description>
10202+
<description>Night Trap (USA, re-release)</description>
1020310203
<year>1995</year>
1020410204
<publisher>Sega</publisher>
1020510205
<notes><![CDATA[
@@ -12920,7 +12920,7 @@ Black screen, requires sub CPU to be overclocked by 1.5x
1292012920
<rom name="Silpheed (Japan) (Demo) (Fixed Dump) (Track 1).bin" size="369174624" crc="6b59f551" />
1292112921
<rom name="Silpheed (Japan) (Demo) (Fixed Dump) (Track 2).bin" size="1058400" crc="648c227c" />
1292212922
-->
12923-
<description>Silpheed Hibaihin (Japan) (fixed)</description>
12923+
<description>Silpheed Hibaihin (Japan, fixed)</description>
1292412924
<year>1993</year>
1292512925
<publisher>Game Arts</publisher>
1292612926
<info name="serial" value="ST-45054"/>

scripts/src/bus.lua

+4
Original file line numberDiff line numberDiff line change
@@ -4120,6 +4120,8 @@ if (BUSES["TI99"]~=null) then
41204120
MAME_DIR .. "src/devices/bus/ti99/internal/genkbd.h",
41214121
MAME_DIR .. "src/devices/bus/ti99/internal/ioport.cpp",
41224122
MAME_DIR .. "src/devices/bus/ti99/internal/ioport.h",
4123+
MAME_DIR .. "src/devices/bus/ti99/internal/splitter.cpp",
4124+
MAME_DIR .. "src/devices/bus/ti99/internal/splitter.h",
41234125
MAME_DIR .. "src/devices/bus/ti99/colorbus/busmouse.cpp",
41244126
MAME_DIR .. "src/devices/bus/ti99/colorbus/busmouse.h",
41254127
MAME_DIR .. "src/devices/bus/ti99/colorbus/colorbus.cpp",
@@ -4186,6 +4188,8 @@ if (BUSES["TI99"]~=null) then
41864188
MAME_DIR .. "src/devices/bus/ti99/peb/tn_ide.h",
41874189
MAME_DIR .. "src/devices/bus/ti99/peb/tn_usbsm.cpp",
41884190
MAME_DIR .. "src/devices/bus/ti99/peb/tn_usbsm.h",
4191+
MAME_DIR .. "src/devices/bus/ti99/sidecar/arcturus.cpp",
4192+
MAME_DIR .. "src/devices/bus/ti99/sidecar/arcturus.h",
41894193
}
41904194
end
41914195

src/devices/bus/ti99/internal/genboard.cpp

+15-6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
out: CSR*: v9938 read
3434
3535
out: RAMENX*: SRAM expansion
36+
out: RAMENU*: Ultimate SRAM expansion. This is actually done by a small
37+
daughterboard, not directly in the Gate Array.
38+
3639
out: RAMEN*: SRAM
3740
out: ROMEN*: EPROM
3841
out: AB0, AB1, AB2: Mapped address bits (2^15, 2^14, 2^13)
@@ -145,9 +148,9 @@
145148
1 0111 110. .... .... .... address block cxxx
146149
1 0111 111. .... .... .... address block exxx
147150
148-
1 1... .... .... .... .... on-board bus or external bus (unclear)
149-
1 10.. .... .... .... .... Future expansion
150-
1 1100 .... .... .... .... Future expansion
151+
1 1... .... .... .... .... on-board bus
152+
1 10.. .... .... .... .... Future expansion (Ultimate SRAM expansion)
153+
1 1100 .... .... .... .... Future expansion (Ultimate SRAM expansion)
151154
152155
1 1101 0... .... .... .... on-board sram (32K) - Optional 32 KiB expansion, 0 WS
153156
1 1101 1... .... .... .... on-board sram (32K) - stock 32 KiB SRAM, 0 WS
@@ -738,8 +741,8 @@ const geneve_gate_array_device::physentry_t geneve_gate_array_device::s_physmap[
738741
{
739742
{ 0x00, 0x3f, MPDRAM, "DRAM" },
740743
{ 0x40, 0x3f, MPEXP, "Future exp (on-board)" },
741-
{ 0xc0, 0x1f, MPSRAMF, "Future SRAM exp" },
742-
{ 0xe0, 0x07, MPSRAMF, "Future SRAM exp" },
744+
{ 0xc0, 0x1f, MPSRAMU, "Ultimate SRAM exp" },
745+
{ 0xe0, 0x07, MPSRAMU, "Ultimate SRAM exp" },
743746
{ 0xe8, 0x03, MPSRAMX, "SRAM exp" },
744747
{ 0xec, 0x03, MPSRAM, "SRAM" },
745748
{ 0xf0, 0x0f, MPEPROM, "Boot ROM/PFM" },
@@ -816,7 +819,7 @@ bool geneve_gate_array_device::accessing_dram_s(int function)
816819

817820
bool geneve_gate_array_device::accessing_sram_s(int function)
818821
{
819-
return (function == MPSRAM) || (function == MPSRAMX) || (function == MPSRAMF);
822+
return (function == MPSRAM) || (function == MPSRAMX) || (function == MPSRAMU);
820823
}
821824

822825
bool geneve_gate_array_device::accessing_devs_s(int function)
@@ -953,6 +956,12 @@ int geneve_gate_array_device::ramenx_out()
953956
return (dec->function == MPSRAMX)? ASSERT_LINE : CLEAR_LINE;
954957
}
955958

959+
int geneve_gate_array_device::ramenu_out()
960+
{
961+
decdata* dec = (m_debug)? &m_decdebug : &m_decoded;
962+
return (dec->function == MPSRAMU)? ASSERT_LINE : CLEAR_LINE;
963+
}
964+
956965
int geneve_gate_array_device::rtcen_out()
957966
{
958967
decdata* dec = (m_debug)? &m_decdebug : &m_decoded;

src/devices/bus/ti99/internal/genboard.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,12 @@ class geneve_gate_array_device : public device_t
8181
int csr_out();
8282
int csw_out();
8383
int rtcen_out();
84-
int romen_out();
85-
int ramen_out();
86-
int ramenx_out();
84+
85+
int romen_out(); // Boot EPROM access
86+
int ramen_out(); // Stock SRAM access
87+
int ramenx_out(); // 32K expanded SRAM access
88+
int ramenu_out(); // Full 384K SRAM access
89+
8790
int snden_out();
8891
int dben_out();
8992
int gaready_out();
@@ -154,7 +157,7 @@ class geneve_gate_array_device : public device_t
154157
MPEPROM,
155158
MPSRAM,
156159
MPSRAMX,
157-
MPSRAMF,
160+
MPSRAMU,
158161
MBOX,
159162

160163
CARTPROT

src/devices/bus/ti99/internal/ioport.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@
7878

7979
#include "emu.h"
8080
#include "ioport.h"
81+
#include "splitter.h"
8182
#include "bus/ti99/peb/peribox.h"
83+
#include "bus/ti99/sidecar/arcturus.h"
8284

8385
DEFINE_DEVICE_TYPE(TI99_IOPORT, bus::ti99::internal::ioport_device, "ti99_ioport", "TI-99 I/O Port")
8486

@@ -174,9 +176,21 @@ void ioport_attached_device::set_ready(int state)
174176
void ti99_ioport_options_plain(device_slot_interface &device)
175177
{
176178
device.option_add("peb", TI99_PERIBOX);
179+
device.option_add("splitter", TI99_IOSPLIT);
180+
device.option_add("arcturus", TI99_ARCTURUS);
177181
}
178182

179183
void ti99_ioport_options_evpc(device_slot_interface &device)
180184
{
181185
device.option_add("peb", TI99_PERIBOX_EV);
186+
device.option_add("splitter", TI99_IOSPLIT);
187+
device.option_add("arcturus", TI99_ARCTURUS);
188+
}
189+
190+
// Used for the splitter (to avoid getting multiple EVPCs in the system)
191+
void ti99_ioport_options_evpc1(device_slot_interface &device)
192+
{
193+
device.option_add("peb", TI99_PERIBOX_EV1);
194+
device.option_add("splitter", TI99_IOSPLIT);
195+
device.option_add("arcturus", TI99_ARCTURUS);
182196
}

src/devices/bus/ti99/internal/ioport.h

+1
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,6 @@ DECLARE_DEVICE_TYPE_NS(TI99_IOPORT, bus::ti99::internal, ioport_device)
103103

104104
void ti99_ioport_options_plain(device_slot_interface &device);
105105
void ti99_ioport_options_evpc(device_slot_interface &device);
106+
void ti99_ioport_options_evpc1(device_slot_interface &device);
106107

107108
#endif /* __TI99IOPORT__ */
+190
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
// license:LGPL-2.1+
2+
// copyright-holders:Michael Zapf
3+
/****************************************************************************
4+
I/O port splitter
5+
6+
The I/O port splitter connects to the TI-99/4(A) console at its I/O port
7+
and provides two I/O ports. That way, two Peripheral Expansion boxes or
8+
one PEB and a sidecar chain may be connected.
9+
10+
| Port 2
11+
v
12+
+---+
13+
+----------------+ | |
14+
| TI-99/4(A) |---+ +--+
15+
+------------+---+ Splitter | <-- Port 1
16+
| oooooooooo | |----------+
17+
| oooooooooo | |
18+
+-----------------
19+
20+
The splitter was designed 2015 by Jim Fetzner (as Tekumel Software)
21+
22+
March 2025, Michael Zapf
23+
24+
*****************************************************************************/
25+
26+
#include "emu.h"
27+
#include "ioport.h"
28+
#include "splitter.h"
29+
#include "bus/ti99/peb/peribox.h"
30+
31+
#define LOG_WARN (1U << 1) // Warnings
32+
#define LOG_CONFIG (1U << 2) // Configuration
33+
#define LOG_INT (1U << 3)
34+
#define LOG_READY (1U << 4)
35+
36+
// #define VERBOSE (LOG_CONFIG | LOG_WARN)
37+
38+
#include "logmacro.h"
39+
40+
DEFINE_DEVICE_TYPE(TI99_IOSPLIT, bus::ti99::internal::ioport_splitter_device, "ti99_iosplit", "TI-99 I/O Port Splitter")
41+
42+
namespace bus::ti99::internal {
43+
44+
#define PORT1 "port1"
45+
#define PORT2 "port2"
46+
47+
ioport_splitter_device::ioport_splitter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
48+
: ioport_attached_device(mconfig, type, tag, owner, clock),
49+
m_port1(*this, PORT1),
50+
m_port2(*this, PORT2)
51+
{
52+
}
53+
54+
ioport_splitter_device::ioport_splitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
55+
: ioport_splitter_device(mconfig, TI99_IOSPLIT, tag, owner, clock)
56+
{
57+
}
58+
59+
void ioport_splitter_device::readz(offs_t offset, uint8_t *value)
60+
{
61+
// With a proper configuration, only one device on one of the branches
62+
// will respond.
63+
if (m_port1 != nullptr)
64+
m_port1->readz(offset, value);
65+
66+
if (m_port2 != nullptr)
67+
m_port2->readz(offset, value);
68+
}
69+
70+
void ioport_splitter_device::write(offs_t offset, uint8_t data)
71+
{
72+
if (m_port1 != nullptr)
73+
m_port1->write(offset, data);
74+
75+
if (m_port2 != nullptr)
76+
m_port2->write(offset, data);
77+
}
78+
79+
void ioport_splitter_device::setaddress_dbin(offs_t offset, int state)
80+
{
81+
if (m_port1 != nullptr)
82+
m_port1->setaddress_dbin(offset, state);
83+
84+
if (m_port2 != nullptr)
85+
m_port2->setaddress_dbin(offset, state);
86+
}
87+
88+
void ioport_splitter_device::crureadz(offs_t offset, uint8_t *value)
89+
{
90+
if (m_port1 != nullptr)
91+
m_port1->crureadz(offset, value);
92+
93+
if (m_port2 != nullptr)
94+
m_port2->crureadz(offset, value);
95+
}
96+
97+
void ioport_splitter_device::cruwrite(offs_t offset, uint8_t data)
98+
{
99+
if (m_port1 != nullptr)
100+
m_port1->cruwrite(offset, data);
101+
102+
if (m_port2 != nullptr)
103+
m_port2->cruwrite(offset, data);
104+
}
105+
106+
void ioport_splitter_device::memen_in(int state)
107+
{
108+
if (m_port1 != nullptr)
109+
m_port1->memen_in(state);
110+
111+
if (m_port2 != nullptr)
112+
m_port2->memen_in(state);
113+
}
114+
115+
void ioport_splitter_device::msast_in(int state)
116+
{
117+
if (m_port1 != nullptr)
118+
m_port1->msast_in(state);
119+
120+
if (m_port2 != nullptr)
121+
m_port2->msast_in(state);
122+
}
123+
124+
void ioport_splitter_device::clock_in(int state)
125+
{
126+
if (m_port1 != nullptr)
127+
m_port1->clock_in(state);
128+
129+
if (m_port2 != nullptr)
130+
m_port2->clock_in(state);
131+
}
132+
133+
void ioport_splitter_device::reset_in(int state)
134+
{
135+
if (m_port1 != nullptr)
136+
m_port1->reset_in(state);
137+
138+
if (m_port2 != nullptr)
139+
m_port2->reset_in(state);
140+
}
141+
142+
template<int port>
143+
void ioport_splitter_device::extint(int state)
144+
{
145+
LOGMASKED(LOG_INT, "propagating INTA from port %d to console: %d\n", port, state);
146+
if (state==ASSERT_LINE)
147+
m_inta_flag |= port; // 1 or 2
148+
else
149+
m_inta_flag &= ~port; // 1 or 2
150+
151+
set_extint((m_inta_flag != 0)? ASSERT_LINE : CLEAR_LINE);
152+
}
153+
154+
template<int port>
155+
void ioport_splitter_device::ready(int state)
156+
{
157+
LOGMASKED(LOG_READY, "Incoming READY=%d from port %d\n", state, port);
158+
// We store the inverse state
159+
if (state==CLEAR_LINE)
160+
m_ready_flag |= port; // 1 or 2
161+
else
162+
m_ready_flag &= ~port; // 1 or 2
163+
164+
set_ready((m_ready_flag != 0)? CLEAR_LINE : ASSERT_LINE);
165+
}
166+
167+
void ioport_splitter_device::device_start()
168+
{
169+
LOG("Starting I/O Port Splitter\n");
170+
}
171+
172+
173+
void ioport_splitter_device::device_config_complete()
174+
{
175+
m_inta_flag = 0;
176+
m_ready_flag = 0;
177+
}
178+
179+
void ioport_splitter_device::device_add_mconfig(machine_config &config)
180+
{
181+
TI99_IOPORT(config, m_port1, 1, ti99_ioport_options_evpc1, nullptr);
182+
TI99_IOPORT(config, m_port2, 2, ti99_ioport_options_evpc1, nullptr);
183+
184+
m_port1->extint_cb().set(FUNC(ioport_splitter_device::extint<1>));
185+
m_port2->extint_cb().set(FUNC(ioport_splitter_device::extint<2>));
186+
m_port1->ready_cb().set(FUNC(ioport_splitter_device::ready<1>));
187+
m_port2->ready_cb().set(FUNC(ioport_splitter_device::ready<2>));
188+
}
189+
190+
} // end namespace bus::ti99::internal

0 commit comments

Comments
 (0)