ti99: Allow for RAM-only standard cartridges (Myarc Exbasic II).

This commit is contained in:
Michael Zapf 2019-07-08 23:35:00 +02:00
parent 39dc220851
commit de833af7b9
2 changed files with 30 additions and 2 deletions

View File

@ -5037,4 +5037,18 @@
</dataarea>
</part>
</software>
<!-- Softlist entry for Myarc Extended Basic II. Actually a RAM-only cartridge, to be used with the myarcmem expansion card. -->
<software name="myxbii">
<description>Myarc Extended Basic II</description>
<info name="usage" value="Requires myarcmem expansion card and 128K.OS disk"/>
<year>1985</year>
<publisher>Myarc Inc.</publisher>
<part name="cart" interface="ti99_cart">
<feature name="pcb" value="standard"/>
<dataarea name="ram" size="8192">
</dataarea>
</part>
</software>
</softwarelist>

View File

@ -440,7 +440,7 @@ const tiny_rom_entry *ti99_cartridge_device::device_rom_region() const
ROM space
6000 7000 7fff
| | |
|========== ROM1 ============|
|========== ROM1 ============| (or RAM, e.g. in Myarc XB II)
***************************************************************************/
@ -501,6 +501,12 @@ READ8Z_MEMBER(ti99_cartridge_pcb::readz)
{
*value = m_rom_ptr[offset & 0x1fff];
}
else
{
// Check if we have RAM in the ROM socket
if ((offset & 0x1fff) < m_ram_size)
*value = m_ram_ptr[offset & 0x1fff];
}
}
else
{
@ -513,7 +519,15 @@ void ti99_cartridge_pcb::write(offs_t offset, uint8_t data)
{
if (m_romspace_selected)
{
LOGMASKED(LOG_WARN, "Cannot write to ROM space at %04x\n", offset);
if (m_ram_ptr == nullptr) LOGMASKED(LOG_WARN, "Cannot write to cartridge ROM space at %04x\n", offset | 0x6000);
else
{
// Check if we have RAM in the ROM socket
if ((offset & 0x1fff) < m_ram_size)
m_ram_ptr[offset & 0x1fff] = data;
else
LOGMASKED(LOG_WARN, "Cannot write to cartridge RAM space at %04x\n", offset | 0x6000);
}
}
else
{