mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
ti99: Fixed MBX cartridge type, introduced new paged type, updated softlist with re-dumped versions
This commit is contained in:
parent
a89d4d4ee6
commit
8ae00de983
1724
hash/ti99_cart.xml
1724
hash/ti99_cart.xml
File diff suppressed because it is too large
Load Diff
@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
#define TRACE_RPK 0
|
#define TRACE_RPK 0
|
||||||
#define TRACE_CHANGE 0
|
#define TRACE_CHANGE 0
|
||||||
#define TRACE_ILLWRITE 0
|
#define TRACE_ILLWRITE 1
|
||||||
#define TRACE_CONFIG 0
|
#define TRACE_CONFIG 0
|
||||||
#define TRACE_READ 0
|
#define TRACE_READ 0
|
||||||
#define TRACE_WRITE 0
|
#define TRACE_WRITE 0
|
||||||
@ -648,9 +648,15 @@ machine_config_constructor multi_conn_device::device_mconfig_additions() const
|
|||||||
return MACHINE_CONFIG_NAME( multi_slot );
|
return MACHINE_CONFIG_NAME( multi_slot );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INPUT_CHANGED_MEMBER( multi_conn_device::switch_changed )
|
||||||
|
{
|
||||||
|
if (TRACE_CHANGE) logerror("Slot changed %d - %d\n", (int)((UINT64)param & 0x07), newval);
|
||||||
|
m_active_slot = m_fixed_slot = newval - 1;
|
||||||
|
}
|
||||||
|
|
||||||
INPUT_PORTS_START(multi_slot)
|
INPUT_PORTS_START(multi_slot)
|
||||||
PORT_START( "CARTSLOT" )
|
PORT_START( "CARTSLOT" )
|
||||||
PORT_DIPNAME( 0x0f, 0x00, "Multi-cartridge slot" )
|
PORT_DIPNAME( 0x0f, 0x00, "Multi-cartridge slot" ) PORT_CHANGED_MEMBER(DEVICE_SELF, multi_conn_device, switch_changed, 0)
|
||||||
PORT_DIPSETTING( 0x00, "Auto" )
|
PORT_DIPSETTING( 0x00, "Auto" )
|
||||||
PORT_DIPSETTING( 0x01, "Slot 1" )
|
PORT_DIPSETTING( 0x01, "Slot 1" )
|
||||||
PORT_DIPSETTING( 0x02, "Slot 2" )
|
PORT_DIPSETTING( 0x02, "Slot 2" )
|
||||||
@ -1123,7 +1129,8 @@ ioport_constructor gkracker_device::device_input_ports() const
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PCB_STANDARD=1,
|
PCB_STANDARD=1,
|
||||||
PCB_PAGED,
|
PCB_PAGED12K,
|
||||||
|
PCB_PAGED16K,
|
||||||
PCB_MINIMEM,
|
PCB_MINIMEM,
|
||||||
PCB_SUPER,
|
PCB_SUPER,
|
||||||
PCB_MBX,
|
PCB_MBX,
|
||||||
@ -1137,7 +1144,8 @@ enum
|
|||||||
static const pcb_type pcbdefs[] =
|
static const pcb_type pcbdefs[] =
|
||||||
{
|
{
|
||||||
{ PCB_STANDARD, "standard" },
|
{ PCB_STANDARD, "standard" },
|
||||||
{ PCB_PAGED, "paged" },
|
{ PCB_PAGED12K, "paged12k" },
|
||||||
|
{ PCB_PAGED16K, "paged" },
|
||||||
{ PCB_MINIMEM, "minimem" },
|
{ PCB_MINIMEM, "minimem" },
|
||||||
{ PCB_SUPER, "super" },
|
{ PCB_SUPER, "super" },
|
||||||
{ PCB_MBX, "mbx" },
|
{ PCB_MBX, "mbx" },
|
||||||
@ -1153,7 +1161,8 @@ static const pcb_type pcbdefs[] =
|
|||||||
static const pcb_type sw_pcbdefs[] =
|
static const pcb_type sw_pcbdefs[] =
|
||||||
{
|
{
|
||||||
{ PCB_STANDARD, "standard" },
|
{ PCB_STANDARD, "standard" },
|
||||||
{ PCB_PAGED, "paged" },
|
{ PCB_PAGED12K, "paged12k" },
|
||||||
|
{ PCB_PAGED16K, "paged16k" },
|
||||||
{ PCB_MINIMEM, "minimem" },
|
{ PCB_MINIMEM, "minimem" },
|
||||||
{ PCB_SUPER, "super" },
|
{ PCB_SUPER, "super" },
|
||||||
{ PCB_MBX, "mbx" },
|
{ PCB_MBX, "mbx" },
|
||||||
@ -1192,13 +1201,13 @@ void ti99_cartridge_device::prepare_cartridge()
|
|||||||
|
|
||||||
for (int i=0; i < 5; i++) m_pcb->m_grom[i] = nullptr;
|
for (int i=0; i < 5; i++) m_pcb->m_grom[i] = nullptr;
|
||||||
|
|
||||||
m_pcb->m_grom_size = m_softlist? get_software_region_length("grom_socket") : m_rpk->get_resource_length("grom_socket");
|
m_pcb->m_grom_size = m_softlist? get_software_region_length("grom") : m_rpk->get_resource_length("grom_socket");
|
||||||
if (TRACE_CONFIG) logerror("grom_socket.size=0x%04x\n", m_pcb->m_grom_size);
|
if (TRACE_CONFIG) logerror("grom_socket.size=0x%04x\n", m_pcb->m_grom_size);
|
||||||
|
|
||||||
if (m_pcb->m_grom_size > 0)
|
if (m_pcb->m_grom_size > 0)
|
||||||
{
|
{
|
||||||
regg = memregion(CARTGROM_TAG);
|
regg = memregion(CARTGROM_TAG);
|
||||||
grom_ptr = m_softlist? get_software_region("grom_socket") : m_rpk->get_contents_of_socket("grom_socket");
|
grom_ptr = m_softlist? get_software_region("grom") : m_rpk->get_contents_of_socket("grom_socket");
|
||||||
memcpy(regg->base(), grom_ptr, m_pcb->m_grom_size);
|
memcpy(regg->base(), grom_ptr, m_pcb->m_grom_size);
|
||||||
m_pcb->m_grom_ptr = regg->base(); // for gromemu
|
m_pcb->m_grom_ptr = regg->base(); // for gromemu
|
||||||
m_pcb->m_grom_address = 0; // for gromemu
|
m_pcb->m_grom_address = 0; // for gromemu
|
||||||
@ -1211,25 +1220,29 @@ void ti99_cartridge_device::prepare_cartridge()
|
|||||||
if (m_pcb->m_grom_size > 0x8000) m_pcb->set_grom_pointer(4, subdevice(GROM7_TAG));
|
if (m_pcb->m_grom_size > 0x8000) m_pcb->set_grom_pointer(4, subdevice(GROM7_TAG));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pcb->m_rom_size = m_softlist? get_software_region_length("rom_socket") : m_rpk->get_resource_length("rom_socket");
|
m_pcb->m_rom_size = m_softlist? get_software_region_length("rom") : m_rpk->get_resource_length("rom_socket");
|
||||||
if (m_pcb->m_rom_size > 0)
|
if (m_pcb->m_rom_size > 0)
|
||||||
{
|
{
|
||||||
if (TRACE_CONFIG) logerror("rom_socket.size=0x%04x\n", m_pcb->m_rom_size);
|
if (TRACE_CONFIG) logerror("rom size=0x%04x\n", m_pcb->m_rom_size);
|
||||||
regr = memregion(CARTROM_TAG);
|
regr = memregion(CARTROM_TAG);
|
||||||
rom_ptr = m_softlist? get_software_region("rom_socket") : m_rpk->get_contents_of_socket("rom_socket");
|
rom_ptr = m_softlist? get_software_region("rom") : m_rpk->get_contents_of_socket("rom_socket");
|
||||||
memcpy(regr->base(), rom_ptr, m_pcb->m_rom_size);
|
memcpy(regr->base(), rom_ptr, m_pcb->m_rom_size);
|
||||||
// Set both pointers to the same region for now
|
// Set both pointers to the same region for now
|
||||||
m_pcb->m_rom_ptr = regr->base();
|
m_pcb->m_rom_ptr = regr->base();
|
||||||
}
|
}
|
||||||
|
|
||||||
rom2_length = m_softlist? get_software_region_length("rom2_socket") : m_rpk->get_resource_length("rom2_socket");
|
// Softlist uses only one ROM area, no second socket
|
||||||
if (rom2_length > 0)
|
if (!m_softlist)
|
||||||
{
|
{
|
||||||
// sizes do not differ between rom and rom2
|
rom2_length = m_rpk->get_resource_length("rom2_socket");
|
||||||
// We use the large cartrom space for the second bank as well
|
if (rom2_length > 0)
|
||||||
regr = memregion(CARTROM_TAG);
|
{
|
||||||
rom_ptr = m_softlist? get_software_region("rom2_socket") : m_rpk->get_contents_of_socket("rom2_socket");
|
// sizes do not differ between rom and rom2
|
||||||
memcpy(regr->base() + 0x2000, rom_ptr, rom2_length);
|
// We use the large cartrom space for the second bank as well
|
||||||
|
regr = memregion(CARTROM_TAG);
|
||||||
|
rom_ptr = m_rpk->get_contents_of_socket("rom2_socket");
|
||||||
|
memcpy(regr->base() + 0x2000, rom_ptr, rom2_length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// (NV)RAM cartridges
|
// (NV)RAM cartridges
|
||||||
@ -1326,9 +1339,13 @@ bool ti99_cartridge_device::call_load()
|
|||||||
if (TRACE_CONFIG) logerror("Standard PCB\n");
|
if (TRACE_CONFIG) logerror("Standard PCB\n");
|
||||||
m_pcb = new ti99_standard_cartridge();
|
m_pcb = new ti99_standard_cartridge();
|
||||||
break;
|
break;
|
||||||
case PCB_PAGED:
|
case PCB_PAGED12K:
|
||||||
if (TRACE_CONFIG) logerror("Paged PCB\n");
|
if (TRACE_CONFIG) logerror("Paged PCB 12K\n");
|
||||||
m_pcb = new ti99_paged_cartridge();
|
m_pcb = new ti99_paged12k_cartridge();
|
||||||
|
break;
|
||||||
|
case PCB_PAGED16K:
|
||||||
|
if (TRACE_CONFIG) logerror("Paged PCB 16K\n");
|
||||||
|
m_pcb = new ti99_paged16k_cartridge();
|
||||||
break;
|
break;
|
||||||
case PCB_MINIMEM:
|
case PCB_MINIMEM:
|
||||||
if (TRACE_CONFIG) logerror("Minimem PCB\n");
|
if (TRACE_CONFIG) logerror("Minimem PCB\n");
|
||||||
@ -1505,7 +1522,18 @@ const device_type TI99CART = &device_creator<ti99_cartridge_device>;
|
|||||||
Some cartridges also have RAM, and some allow for switching between
|
Some cartridges also have RAM, and some allow for switching between
|
||||||
ROMs.
|
ROMs.
|
||||||
|
|
||||||
Unlike in the previous implementation we do not model it as a full device.
|
Standard cartridge
|
||||||
|
|
||||||
|
GROM space
|
||||||
|
6000 77ff 8000 97ff a000 b7ff c000 d7ff e000 f7ff
|
||||||
|
|== GROM3 ==|...|== GROM4 ==|...|== GROM5 ==|...|== GROM6 ==|...|== GROM7 ==|
|
||||||
|
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|========== ROM1 ============|
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
ti99_cartridge_pcb::ti99_cartridge_pcb()
|
ti99_cartridge_pcb::ti99_cartridge_pcb()
|
||||||
@ -1623,15 +1651,83 @@ WRITE_LINE_MEMBER(ti99_cartridge_pcb::gclock_in)
|
|||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
Cartridge type: Paged (Extended Basic)
|
Cartridge type: Paged (12K, Extended Basic)
|
||||||
This cartridge consists of GROM memory and 2 pages of standard ROM.
|
|
||||||
|
The Extended Basic cartridge consists of several GROMs which are
|
||||||
|
treated in the usual way, and two ROMs (4K and 8K).
|
||||||
|
|
||||||
|
GROM space
|
||||||
|
6000 77ff 8000 97ff a000 b7ff c000 d7ff e000 f7ff
|
||||||
|
|== GROM3 ==|...|== GROM4 ==|...|== GROM5 ==|...|== GROM6 ==|...|== GROM7 ==|
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
| |==== ROM2a ===| Bank 0 write to 6000, 6004, ... 7ffc
|
||||||
|
|=== ROM1 ====| |
|
||||||
|
|==== ROM2b ===| Bank 1 write to 6002, 6006, ... 7ffe
|
||||||
|
|
||||||
|
The 4K ROM is mapped into the 6000-6FFF space.
|
||||||
|
The 8K ROM is actually composed of two banks of 4K which are mapped into
|
||||||
|
the 7000-7FFF space. Bank 0 is visible after a write access to 6000 / 6004 /
|
||||||
|
6008 ... , while bank 1 is visible after writing to 6002 / 6006 / 600A / ...
|
||||||
|
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
READ8Z_MEMBER(ti99_paged12k_cartridge::readz)
|
||||||
|
{
|
||||||
|
if (m_romspace_selected)
|
||||||
|
{
|
||||||
|
// rom_ptr: 0000-0fff = rom1
|
||||||
|
// 2000-2fff = rom2a
|
||||||
|
// 3000-3fff = rom2b
|
||||||
|
if ((offset & 0x1000)==0)
|
||||||
|
*value = m_rom_ptr[offset & 0x0fff];
|
||||||
|
else
|
||||||
|
*value = m_rom_ptr[(offset & 0x0fff) | 0x2000 | (m_rom_page << 12)];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Will not return anything when not selected (preceding gsq=ASSERT)
|
||||||
|
gromreadz(space, offset, value, mem_mask);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_MEMBER(ti99_paged12k_cartridge::write)
|
||||||
|
{
|
||||||
|
if (m_romspace_selected)
|
||||||
|
{
|
||||||
|
m_rom_page = (offset >> 1) & 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Will not change anything when not selected (preceding gsq=ASSERT)
|
||||||
|
gromwrite(space, offset, data, mem_mask);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Cartridge type: Paged (16K)
|
||||||
|
|
||||||
|
GROM space
|
||||||
|
6000 77ff 8000 97ff a000 b7ff c000 d7ff e000 f7ff
|
||||||
|
|== GROM3 ==|...|== GROM4 ==|...|== GROM5 ==|...|== GROM6 ==|...|== GROM7 ==|
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|========== ROM1 ===========| Bank 0 write to 6000, 6004, ... 7ffc
|
||||||
|
| | |
|
||||||
|
|========== ROM2 ===========| Bank 1 write to 6002, 6006, ... 7ffe
|
||||||
|
|
||||||
|
This cartridge consists of GROM memory and 2 pages of standard ROM.
|
||||||
The page is set by writing any value to a location in
|
The page is set by writing any value to a location in
|
||||||
the address area, where an even word offset sets the page to 0 and an
|
the address area, where an even word offset sets the page to 0 and an
|
||||||
odd word offset sets the page to 1 (e.g. 6000 = bank 0, and
|
odd word offset sets the page to 1 (e.g. 6000 = bank 0, and
|
||||||
6002 = bank 1).
|
6002 = bank 1).
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
READ8Z_MEMBER(ti99_paged_cartridge::readz)
|
READ8Z_MEMBER(ti99_paged16k_cartridge::readz)
|
||||||
{
|
{
|
||||||
if (m_romspace_selected)
|
if (m_romspace_selected)
|
||||||
{
|
{
|
||||||
@ -1644,7 +1740,7 @@ READ8Z_MEMBER(ti99_paged_cartridge::readz)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(ti99_paged_cartridge::write)
|
WRITE8_MEMBER(ti99_paged16k_cartridge::write)
|
||||||
{
|
{
|
||||||
if (m_romspace_selected)
|
if (m_romspace_selected)
|
||||||
{
|
{
|
||||||
@ -1659,9 +1755,20 @@ WRITE8_MEMBER(ti99_paged_cartridge::write)
|
|||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
Cartridge type: Mini Memory
|
Cartridge type: Mini Memory
|
||||||
GROM: 6 KiB (occupies G>6000 to G>7800)
|
GROM: 6 KiB (occupies G>6000 to G>77ff)
|
||||||
ROM: 4 KiB (romfile is actually 8 K long, second half with zeros, 0x6000-0x6fff)
|
ROM: 4 KiB (6000-6fff)
|
||||||
persistent RAM: 4 KiB (0x7000-0x7fff)
|
RAM: 4 KiB (7000-7fff, battery-backed)
|
||||||
|
|
||||||
|
GROM space
|
||||||
|
6000 77ff
|
||||||
|
|== GROM3 ==|
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|=== ROM1 ====| |
|
||||||
|
|=== NVRAM ===|
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* Read function for the minimem cartridge. */
|
/* Read function for the minimem cartridge. */
|
||||||
@ -1717,10 +1824,26 @@ WRITE8_MEMBER(ti99_minimem_cartridge::write)
|
|||||||
assigns a number in the selection screen. Switching the RAM banks in this
|
assigns a number in the selection screen. Switching the RAM banks in this
|
||||||
cartridge is achieved by setting CRU bits (the system serial interface).
|
cartridge is achieved by setting CRU bits (the system serial interface).
|
||||||
|
|
||||||
GROM: Editor/Assembler GROM
|
GROM: Editor/Assembler GROM
|
||||||
ROM: none
|
ROM: none
|
||||||
persistent RAM: 32 KiB (0x6000-0x7fff, 4 banks)
|
RAM: 32 KiB (0x6000-0x7fff, 4 banks)
|
||||||
Banking: via CRU write
|
Banking: via CRU write
|
||||||
|
|
||||||
|
GROM space
|
||||||
|
6000 77ff
|
||||||
|
|==== GROM3 (Editor/Assm) ====|
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|======== NVRAM 0 ==========| Bank 0 CRU>0802
|
||||||
|
| | |
|
||||||
|
|======== NVRAM 1 ==========| Bank 1 CRU>0806
|
||||||
|
| | |
|
||||||
|
|======== NVRAM 2 ==========| Bank 2 CRU>080a
|
||||||
|
| | |
|
||||||
|
|======== NVRAM 3 ==========| Bank 3 CRU>080e
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* Read function for the super cartridge. */
|
/* Read function for the super cartridge. */
|
||||||
@ -1802,7 +1925,7 @@ WRITE8_MEMBER(ti99_super_cartridge::cruwrite)
|
|||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
Cartridge type: MBX
|
Cartridge type: MBX
|
||||||
GROM: up to 40 KiB
|
GROM: up to 5 GROMs (sockets for a maximum of 3 GROMs, but may be stacked)
|
||||||
ROM: up to 16 KiB (in up to 2 banks of 8KiB each)
|
ROM: up to 16 KiB (in up to 2 banks of 8KiB each)
|
||||||
RAM: 1022 B (0x6c00-0x6ffd, overrides ROM in that area)
|
RAM: 1022 B (0x6c00-0x6ffd, overrides ROM in that area)
|
||||||
ROM mapper: 6ffe
|
ROM mapper: 6ffe
|
||||||
@ -1810,6 +1933,34 @@ WRITE8_MEMBER(ti99_super_cartridge::cruwrite)
|
|||||||
TODO: Some MBX cartridges assume the presence of the MBX system
|
TODO: Some MBX cartridges assume the presence of the MBX system
|
||||||
(special user interface box with speech input/output)
|
(special user interface box with speech input/output)
|
||||||
and will not run without it. This MBX hardware is not emulated yet.
|
and will not run without it. This MBX hardware is not emulated yet.
|
||||||
|
|
||||||
|
GROM space
|
||||||
|
6000 77ff 8000 97ff a000 b7ff c000 d7ff e000 f7ff
|
||||||
|
|== GROM3 ==|...|== GROM4 ==|...|== GROM5 ==|...|== GROM6 ==|...|== GROM7 ==|
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 6c00 7000 7fff
|
||||||
|
| | | |
|
||||||
|
| | |===== ROM bank 0 ====| 6ffe = 00
|
||||||
|
| |= RAM =| |
|
||||||
|
|=== ROM bank 0 ==| |===== ROM bank 1 ====| 6ffe = 01
|
||||||
|
| |
|
||||||
|
|===== ROM bank 3 ====| 6ffe = 02
|
||||||
|
| |
|
||||||
|
|===== ROM bank 3 ====| 6ffe = 03
|
||||||
|
|
||||||
|
The 16K ROM is composed of four 4K banks, which can be selected by writing
|
||||||
|
the bank number to address 6ffe. This also affects the RAM so that the
|
||||||
|
bank number is stored in RAM and may also be read from there.
|
||||||
|
|
||||||
|
The mapper does not decode the LSB of the address, so it changes value when
|
||||||
|
a write operation is done on 6FFF. Since the TI console always writes the
|
||||||
|
odd byte first, then the even byte, the last byte written is actually 6FFE.
|
||||||
|
|
||||||
|
ROM bank 0 (ROM area 0000-0fff) is always visible in the space 6000-6bff.
|
||||||
|
|
||||||
|
RAM is implemented by two 1024x4 RAM circuits and is not affected by banking.
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* Read function for the mbx cartridge. */
|
/* Read function for the mbx cartridge. */
|
||||||
@ -1817,18 +1968,23 @@ READ8Z_MEMBER(ti99_mbx_cartridge::readz)
|
|||||||
{
|
{
|
||||||
if (m_romspace_selected)
|
if (m_romspace_selected)
|
||||||
{
|
{
|
||||||
if ((offset & 0x1c00)==0x0c00)
|
if (m_ram_ptr != nullptr && (offset & 0x1c00)==0x0c00)
|
||||||
{
|
{
|
||||||
// This is the RAM area which overrides any ROM. There is no
|
// Also reads the value of 6ffe
|
||||||
// known banking behavior for the RAM, so we must assume that
|
*value = m_ram_ptr[offset & 0x03ff];
|
||||||
// there is only one bank.
|
if (TRACE_READ) space.device().logerror("%04x (RAM) -> %02x\n", offset + 0x6000, *value);
|
||||||
if (m_ram_ptr != nullptr)
|
|
||||||
*value = m_ram_ptr[offset & 0x03ff];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_rom_ptr!=nullptr)
|
if (m_rom_ptr!=nullptr)
|
||||||
*value = m_rom_ptr[(offset & 0x1fff) | (m_rom_page<<13)];
|
{
|
||||||
|
if ((offset & 0x1000)==0) // 6000 area
|
||||||
|
*value = m_rom_ptr[offset];
|
||||||
|
else // 7000 area
|
||||||
|
*value = m_rom_ptr[(offset & 0x0fff) | (m_rom_page << 12)];
|
||||||
|
|
||||||
|
if (TRACE_READ) space.device().logerror("%04x(%04x) -> %02x\n", offset + 0x6000, offset | (m_rom_page<<13), *value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1842,16 +1998,19 @@ WRITE8_MEMBER(ti99_mbx_cartridge::write)
|
|||||||
{
|
{
|
||||||
if (m_romspace_selected)
|
if (m_romspace_selected)
|
||||||
{
|
{
|
||||||
if (offset == 0x6ffe)
|
if ((offset & 0x1c00)==0x0c00) // RAM area
|
||||||
{
|
{
|
||||||
m_rom_page = data & 1;
|
if ((offset & 0x0ffe) == 0x0ffe) // Mapper, backed by RAM; reacts to bots 6fff and 6ffe
|
||||||
return;
|
{
|
||||||
}
|
// Valid values are 0, 1, 2, 3
|
||||||
|
m_rom_page = data & 3;
|
||||||
|
if (TRACE_WRITE) if ((offset & 1)==0) space.device().logerror("Set ROM page = %d\n", data);
|
||||||
|
}
|
||||||
|
|
||||||
if ((offset & 0x1c00)==0x0c00)
|
if (m_ram_ptr != nullptr)
|
||||||
{
|
m_ram_ptr[offset & 0x03ff] = data;
|
||||||
if (m_ram_ptr == nullptr) return;
|
else
|
||||||
m_ram_ptr[offset & 0x03ff] = data;
|
if (TRACE_ILLWRITE) space.device().logerror("Write access to %04x but no RAM present\n", offset+0x6000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1890,6 +2049,19 @@ WRITE8_MEMBER(ti99_mbx_cartridge::write)
|
|||||||
>601E 0 / 0 / 0 / 0
|
>601E 0 / 0 / 0 / 0
|
||||||
|
|
||||||
The paged379i cartrige does not have any GROMs.
|
The paged379i cartrige does not have any GROMs.
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|========== ROM 1 ==========| Bank 0 Write to 601e
|
||||||
|
| | |
|
||||||
|
|========== ROM 2 ==========| Bank 1 Write to 601c
|
||||||
|
| | |
|
||||||
|
| ... |
|
||||||
|
| | |
|
||||||
|
|========== ROM 16 =========| Bank 15 Write to 6000
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* Read function for the paged379i cartridge. */
|
/* Read function for the paged379i cartridge. */
|
||||||
@ -1928,6 +2100,17 @@ WRITE8_MEMBER(ti99_paged379i_cartridge::write)
|
|||||||
|
|
||||||
The cartridge may also be used without GROM.
|
The cartridge may also be used without GROM.
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|========== ROM 1 ==========| Bank 0 Write to 6000
|
||||||
|
| | |
|
||||||
|
|========== ROM 2 ==========| Bank 1 Write to 6002
|
||||||
|
| | |
|
||||||
|
| ... |
|
||||||
|
| | |
|
||||||
|
|========== ROM 64 =========| Bank 63 Write to 607e
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* Read function for the paged378 cartridge. */
|
/* Read function for the paged378 cartridge. */
|
||||||
@ -1953,6 +2136,19 @@ WRITE8_MEMBER(ti99_paged378_cartridge::write)
|
|||||||
This type is intended for high-capacity cartridges of up to 2 MiB
|
This type is intended for high-capacity cartridges of up to 2 MiB
|
||||||
|
|
||||||
The paged379i cartrige does not have any GROMs.
|
The paged379i cartrige does not have any GROMs.
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|========== ROM 1 ==========| Bank 0 Write to 6000
|
||||||
|
| | |
|
||||||
|
|========== ROM 2 ==========| Bank 1 Write to 6002
|
||||||
|
| | |
|
||||||
|
| ... |
|
||||||
|
| | |
|
||||||
|
|========== ROM 256 ========| Bank 255 Write to 61fe
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* Read function for the paged377 cartridge. */
|
/* Read function for the paged377 cartridge. */
|
||||||
@ -1991,6 +2187,18 @@ WRITE8_MEMBER(ti99_paged377_cartridge::write)
|
|||||||
7 >8000 = 1000 0000 0000 0000
|
7 >8000 = 1000 0000 0000 0000
|
||||||
|
|
||||||
No GROMs used in this type.
|
No GROMs used in this type.
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|========= ROM 1 ==========| Bank 0 CRU>0802
|
||||||
|
| | |
|
||||||
|
|========= ROM 2 ==========| Bank 1 CRU>0806
|
||||||
|
| | |
|
||||||
|
...
|
||||||
|
| | |
|
||||||
|
|========= ROM 8 ==========| Bank 7 CRU>081e
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/* Read function for the pagedcru cartridge. */
|
/* Read function for the pagedcru cartridge. */
|
||||||
@ -2062,13 +2270,29 @@ WRITE8_MEMBER(ti99_pagedcru_cartridge::cruwrite)
|
|||||||
Super-MiniMemory is also included here. We assume a RAM area at addresses
|
Super-MiniMemory is also included here. We assume a RAM area at addresses
|
||||||
7000-7fff for this cartridge.
|
7000-7fff for this cartridge.
|
||||||
|
|
||||||
|
|
||||||
|
GROM space
|
||||||
|
6000 77ff 8000 97ff a000 b7ff c000 d7ff e000 ffff
|
||||||
|
|=========================== emulated GROM ================================|
|
||||||
|
|
||||||
|
ROM space
|
||||||
|
6000 7000 7fff
|
||||||
|
| | |
|
||||||
|
|========== ROM1 ===========| Bank 0 write to 6000, 6004, ... 7ffc
|
||||||
|
| | |
|
||||||
|
|========== ROM2 ===========| Bank 1 write to 6002, 6006, ... 7ffe
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
WRITE8_MEMBER(ti99_gromemu_cartridge::set_gromlines)
|
WRITE8_MEMBER(ti99_gromemu_cartridge::set_gromlines)
|
||||||
{
|
{
|
||||||
m_grom_selected = (data != CLEAR_LINE);
|
if (m_grom_ptr != nullptr)
|
||||||
m_grom_read_mode = ((offset & GROM_M_LINE)!=0);
|
{
|
||||||
m_grom_address_mode = ((offset & GROM_MO_LINE)!=0);
|
m_grom_selected = (data != CLEAR_LINE);
|
||||||
|
m_grom_read_mode = ((offset & GROM_M_LINE)!=0);
|
||||||
|
m_grom_address_mode = ((offset & GROM_MO_LINE)!=0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
READ8Z_MEMBER(ti99_gromemu_cartridge::readz)
|
READ8Z_MEMBER(ti99_gromemu_cartridge::readz)
|
||||||
|
@ -219,6 +219,7 @@ public:
|
|||||||
|
|
||||||
void insert(int index, ti99_cartridge_device* cart) override;
|
void insert(int index, ti99_cartridge_device* cart) override;
|
||||||
void remove(int index) override;
|
void remove(int index) override;
|
||||||
|
DECLARE_INPUT_CHANGED_MEMBER( switch_changed );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
@ -345,10 +346,20 @@ public:
|
|||||||
|
|
||||||
/*********** Paged cartridge (like Extended Basic) ********************/
|
/*********** Paged cartridge (like Extended Basic) ********************/
|
||||||
|
|
||||||
class ti99_paged_cartridge : public ti99_cartridge_pcb
|
class ti99_paged12k_cartridge : public ti99_cartridge_pcb
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~ti99_paged_cartridge() { };
|
~ti99_paged12k_cartridge() { };
|
||||||
|
DECLARE_READ8Z_MEMBER(readz) override;
|
||||||
|
DECLARE_WRITE8_MEMBER(write) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*********** Paged cartridge (others) ********************/
|
||||||
|
|
||||||
|
class ti99_paged16k_cartridge : public ti99_cartridge_pcb
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~ti99_paged16k_cartridge() { };
|
||||||
DECLARE_READ8Z_MEMBER(readz) override;
|
DECLARE_READ8Z_MEMBER(readz) override;
|
||||||
DECLARE_WRITE8_MEMBER(write) override;
|
DECLARE_WRITE8_MEMBER(write) override;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user