ti99: Added new cartridge type paged7 for TI-CALC.

This commit is contained in:
Michael Zapf 2017-06-24 16:05:07 +02:00
parent d28c2b807e
commit 9814aba49e
3 changed files with 103 additions and 2 deletions

View file

@ -5020,4 +5020,21 @@
</part>
</software>
<!-- Softlist entry for TI-CALC. -->
<software name="ticalc">
<description>TI-CALC</description>
<year>1983</year>
<publisher>Texas Instruments</publisher>
<info name="serial" value="PHM 3213"/>
<part name="cart" interface="ti99_cart">
<feature name="pcb" value="paged7" />
<dataarea name="grom" size="0x2000">
<rom name="phm3213_g3.bin" size="0x1800" crc="d68df037" sha1="fce2fb8928018492d30256588d3040ef5c654faa" offset="0x0000" />
</dataarea>
<dataarea name="rom" size="0x4000">
<rom name="phm3213_r1.bin" size="0x2000" crc="0451b0f9" sha1="fce0f47d07cdda537ae5c9b9c831978423da854f" offset="0x0000" />
<rom name="phm3213_r2.bin" size="0x2000" crc="80749ad6" sha1="018b9c847645dd682cad1113e3d7a4c9f231f685" offset="0x2000" />
</dataarea>
</part>
</software>
</softwarelist>

View file

@ -49,7 +49,8 @@ enum
PCB_PAGED378,
PCB_PAGED377,
PCB_PAGEDCRU,
PCB_GROMEMU
PCB_GROMEMU,
PCB_PAGED7
};
static const pcb_type pcbdefs[] =
@ -65,6 +66,7 @@ static const pcb_type pcbdefs[] =
{ PCB_PAGED377, "paged377" },
{ PCB_PAGEDCRU, "pagedcru" },
{ PCB_GROMEMU, "gromemu" },
{ PCB_PAGED7, "paged7" },
{ 0, nullptr}
};
@ -77,6 +79,7 @@ static const pcb_type sw_pcbdefs[] =
{ PCB_SUPER, "super" },
{ PCB_MBX, "mbx" },
{ PCB_GROMEMU, "gromemu" },
{ PCB_PAGED7, "paged7" },
{ 0, nullptr}
};
@ -257,6 +260,10 @@ image_init_result ti99_cartridge_device::call_load()
if (TRACE_CONFIG) logerror("Paged PCB 16K\n");
m_pcb = std::make_unique<ti99_paged16k_cartridge>();
break;
case PCB_PAGED7:
if (TRACE_CONFIG) logerror("Paged PCB 7000\n");
m_pcb = std::make_unique<ti99_paged7_cartridge>();
break;
case PCB_MINIMEM:
if (TRACE_CONFIG) logerror("Minimem PCB\n");
m_pcb = std::make_unique<ti99_minimem_cartridge>();
@ -860,7 +867,7 @@ WRITE8_MEMBER(ti99_super_cartridge::cruwrite)
| |= RAM =| |
|=== ROM bank 0 ==| |===== ROM bank 1 ====| 6ffe = 01
| |
|===== ROM bank 3 ====| 6ffe = 02
|===== ROM bank 2 ====| 6ffe = 02
| |
|===== ROM bank 3 ====| 6ffe = 03
@ -934,6 +941,74 @@ WRITE8_MEMBER(ti99_mbx_cartridge::write)
}
}
/*****************************************************************************
Cartridge type: paged7
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 mapper: 7000, 7002, 7004, 7006
GROM space
6000 77ff 8000 97ff a000 b7ff c000 d7ff e000 f7ff
|== GROM3 ==|...|== GROM4 ==|...|== GROM5 ==|...|== GROM6 ==|...|== GROM7 ==|
ROM space
6000 7000 7fff
| | |
| |===== ROM bank 0 ====| write to 7000
| | |
|=== ROM bank 0 =========|===== ROM bank 1 ====| write to 7002
| |
|===== ROM bank 2 ====| write to 7004
| |
|===== ROM bank 3 ====| write to 7006
This is very similar to the MBX scheme, only that the bank switch is
done by writing to the first words of the 7000 space. Also, there is no
additional RAM.
******************************************************************************/
/* Read function for the paged7 cartridge. */
READ8Z_MEMBER(ti99_paged7_cartridge::readz)
{
if (m_romspace_selected)
{
if (m_rom_ptr!=nullptr)
{
if ((offset & 0x1000)==0x0000) // 6000 area
*value = m_rom_ptr[offset];
else // 7000 area
*value = m_rom_ptr[(offset & 0x0fff) | (m_rom_page << 12)];
if (TRACE_READ) m_cart->logerror("%04x(%04x) -> %02x\n", offset + 0x6000, offset | (m_rom_page<<13), *value);
}
}
else
{
gromreadz(space, offset, value, mem_mask);
}
}
/* Write function for the paged7 cartridge. */
WRITE8_MEMBER(ti99_paged7_cartridge::write)
{
if (m_romspace_selected)
{
// 0111 0000 0000 0110
if ((offset & 0x1ff9) == 0x1000) // Mapper
{
// Valid values are 0, 1, 2, 3
m_rom_page = (offset>>1) & 3;
if (TRACE_BANKSWITCH) if ((offset & 1)==0) m_cart->logerror("Set ROM page = %d (writing to %04x)\n", m_rom_page, (offset | 0x6000));
}
}
else
{
gromwrite(space, offset, data, mem_mask);
}
}
/*****************************************************************************
Cartridge type: paged379i
This cartridge consists of one 16 KiB, 32 KiB, 64 KiB, or 128 KiB EEPROM

View file

@ -272,6 +272,15 @@ public:
DECLARE_WRITE8_MEMBER(write) override;
};
/*********** Paged7 cartridge (late carts) ********************/
class ti99_paged7_cartridge : public ti99_cartridge_pcb
{
public:
DECLARE_READ8Z_MEMBER(readz) override;
DECLARE_WRITE8_MEMBER(write) override;
};
/********************** Mini Memory ***********************************/
class ti99_minimem_cartridge : public ti99_cartridge_pcb