(MESS) Improve Laser 128 series support; 128EX/2 now boots DOS 3.3 and ProDOS. [Peter Ferrie, R. Belmont]

This commit is contained in:
R. Belmont 2014-08-16 21:09:19 +00:00
parent 7bd53ae557
commit ceb0758650
5 changed files with 64 additions and 5 deletions

View File

@ -43,6 +43,7 @@ machine_config_constructor a2bus_laser128_device::device_mconfig_additions() con
a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_a2bus_card_interface(mconfig, *this)
{
}
@ -99,7 +100,11 @@ UINT8 a2bus_laser128_device::read_c800(address_space &space, UINT16 offset)
return m_rom[(offset & 0x7ff) + 0x7800];
case 7:
return m_rom[(offset & 0x7ff) + 0x5c00 + m_slot7_bank];
if (offset < 0x400)
{
return m_slot7_ram[offset];
}
return m_rom[(offset & 0x3ff) + 0x6000 + m_slot7_bank];
}
return 0xff;
@ -107,11 +112,26 @@ UINT8 a2bus_laser128_device::read_c800(address_space &space, UINT16 offset)
void a2bus_laser128_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
{
if ((m_slot == 7) && (offset < 0x400))
{
m_slot7_ram[offset] = data;
}
// UDCREG
if ((m_slot == 7) && (offset == 0x7f8))
{
printf("%02x to UDCREG\n", data);
m_slot7_ram_bank = (data & 0x8) ? 0x400 : 0;
m_slot7_bank = (((data >> 4) & 0x7) * 0x400);
printf("\tRAM bank %x, ROM bank %x\n", m_slot7_ram_bank, m_slot7_bank);
}
}
bool a2bus_laser128_device::take_c800()
{
if ((m_slot == 1) || (m_slot == 2) || (m_slot == 5) || (m_slot == 7))
if ((m_slot == 1) || (m_slot == 2) || (m_slot == 5) || (m_slot == 6) || (m_slot == 7))
{
return true;
}

View File

@ -42,7 +42,8 @@ protected:
private:
UINT8 *m_rom;
int m_slot7_bank;
UINT8 m_slot7_ram[0x800];
int m_slot7_bank, m_slot7_ram_bank;
};
// device type definition

View File

@ -194,6 +194,7 @@ Address bus A0-A11 is Y0-Y11
#include "formats/ap2_dsk.h"
#include "includes/apple2.h"
#include "cpu/z80/z80.h"
#include "machine/appldriv.h"
#include "bus/a2bus/a2bus.h"
#include "bus/a2bus/a2lang.h"
@ -222,6 +223,7 @@ Address bus A0-A11 is Y0-Y11
#include "bus/a2bus/a2corvus.h"
#include "bus/a2bus/a2mcms.h"
#include "bus/a2bus/a2dx1.h"
#include "bus/a2bus/timemasterho.h"
#include "bus/a2bus/a2estd80col.h"
#include "bus/a2bus/a2eext80col.h"
#include "bus/a2bus/a2eramworks3.h"
@ -1019,10 +1021,11 @@ static SLOT_INTERFACE_START(apple2_cards)
SLOT_INTERFACE("ultratermenh", A2BUS_ULTRATERMENH) /* Videx UltraTerm (enhanced //e) */
SLOT_INTERFACE("aevm80", A2BUS_VTC2) /* Applied Engineering ViewMaster 80 */
SLOT_INTERFACE("parallel", A2BUS_PIC) /* Apple Parallel Interface Card */
SLOT_INTERFACE("corvus", A2BUS_CORVUS) /* Corvus flat-cable HDD interface (must go in slot 6) */
SLOT_INTERFACE("corvus", A2BUS_CORVUS) /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */
SLOT_INTERFACE("mcms1", A2BUS_MCMS1) /* Mountain Computer Music System, card 1 of 2 */
SLOT_INTERFACE("mcms2", A2BUS_MCMS2) /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */
SLOT_INTERFACE("dx1", A2BUS_DX1) /* Decillonix DX-1 sampler card */
SLOT_INTERFACE("tm2ho", A2BUS_TIMEMASTERHO) /* Applied Engineering TimeMaster II H.O. */
SLOT_INTERFACE_END
static SLOT_INTERFACE_START(apple2eaux_cards)
@ -1253,9 +1256,29 @@ static MACHINE_CONFIG_DERIVED( apple2c_iwm, apple2c )
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
MACHINE_CONFIG_END
const applefdc_interface fdc_interface =
{
apple525_set_lines, /* set_lines */
apple525_set_enable_lines, /* set_enable_lines */
apple525_read_data, /* read_data */
apple525_write_data, /* write_data */
apple525_read_status /* read_status */
};
static const floppy_interface floppy_interface =
{
FLOPPY_STANDARD_5_25_DSHD,
LEGACY_FLOPPY_OPTIONS_NAME(apple2),
"floppy_5_25"
};
static MACHINE_CONFIG_DERIVED( laser128, apple2c )
MCFG_MACHINE_START_OVERRIDE(apple2_state,laser128)
MCFG_APPLEFDC_ADD(LASER128_UDC_TAG, fdc_interface)
MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
MCFG_A2BUS_SLOT_REMOVE("sl6")
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl1", A2BUS_LASER128, NULL)

View File

@ -27,6 +27,8 @@
#define IIC_ACIA1_TAG "acia1"
#define IIC_ACIA2_TAG "acia2"
#define LASER128_UDC_TAG "l128udc"
#define PRINTER_PORT_TAG "printer"
#define MODEM_PORT_TAG "modem"
@ -139,7 +141,8 @@ public:
m_sysconfig(*this, "a2_config"),
m_cassette(*this, "cassette"),
m_acia1(*this, IIC_ACIA1_TAG),
m_acia2(*this, IIC_ACIA2_TAG)
m_acia2(*this, IIC_ACIA2_TAG),
m_laserudc(*this, LASER128_UDC_TAG)
{ }
required_device<cpu_device> m_maincpu;
@ -157,6 +160,7 @@ public:
optional_device<cassette_image_device> m_cassette;
optional_device<mos6551_device> m_acia1, m_acia2;
optional_device<applefdc_base_device> m_laserudc;
UINT32 m_flags, m_flags_mask;
INT32 m_a2_cnxx_slot;

View File

@ -366,6 +366,11 @@ READ8_MEMBER(apple2_state::apple2_c080_r)
}
}
}
else if ((m_machinetype == LASER128) && (slot == 6))
{
offset &= 0xf;
return m_laserudc->read(offset);
}
/* now identify the device */
slotdevice = m_a2bus->get_a2bus_card(slot);
@ -410,6 +415,12 @@ WRITE8_MEMBER(apple2_state::apple2_c080_w)
}
}
}
else if ((m_machinetype == LASER128) && (slot == 6))
{
offset &= 0xf;
m_laserudc->write(space, offset, data);
return;
}
/* now identify the device */
slotdevice = m_a2bus->get_a2bus_card(slot);