Previous 199869 Revisions Next

r31670 Saturday 16th August, 2014 at 21:09:19 UTC by R. Belmont
(MESS) Improve Laser 128 series support; 128EX/2 now boots DOS 3.3 and ProDOS. [Peter Ferrie, R. Belmont]
[src/emu/bus/a2bus]laser128.c laser128.h
[src/mess/drivers]apple2.c
[src/mess/includes]apple2.h
[src/mess/machine]apple2.c

trunk/src/emu/bus/a2bus/laser128.c
r31669r31670
4343a2bus_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) :
4444   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
4545   device_a2bus_card_interface(mconfig, *this)
46
4647{
4748}
4849
r31669r31670
99100         return m_rom[(offset & 0x7ff) + 0x7800];
100101
101102      case 7:
102         return m_rom[(offset & 0x7ff) + 0x5c00 + m_slot7_bank];
103         if (offset < 0x400)
104         {
105            return m_slot7_ram[offset];
106         }
107         return m_rom[(offset & 0x3ff) + 0x6000 + m_slot7_bank];
103108   }
104109
105110   return 0xff;
r31669r31670
107112
108113void a2bus_laser128_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
109114{
115   if ((m_slot == 7) && (offset < 0x400))
116   {
117      m_slot7_ram[offset] = data;
118   }
119
120   // UDCREG
121   if ((m_slot == 7) && (offset == 0x7f8))
122   {
123      printf("%02x to UDCREG\n", data);
124
125      m_slot7_ram_bank = (data & 0x8) ? 0x400 : 0;
126      m_slot7_bank = (((data >> 4) & 0x7) * 0x400);
127
128      printf("\tRAM bank %x, ROM bank %x\n", m_slot7_ram_bank, m_slot7_bank);
129   }
110130}
111131
112132bool a2bus_laser128_device::take_c800()
113133{
114   if ((m_slot == 1) || (m_slot == 2) || (m_slot == 5) || (m_slot == 7))
134   if ((m_slot == 1) || (m_slot == 2) || (m_slot == 5) || (m_slot == 6) || (m_slot == 7))
115135   {
116136      return true;
117137   }
trunk/src/emu/bus/a2bus/laser128.h
r31669r31670
4242
4343private:
4444   UINT8 *m_rom;
45   int m_slot7_bank;
45   UINT8 m_slot7_ram[0x800];
46   int m_slot7_bank, m_slot7_ram_bank;
4647};
4748
4849// device type definition
trunk/src/mess/machine/apple2.c
r31669r31670
366366            }
367367         }
368368      }
369      else if ((m_machinetype == LASER128) && (slot == 6))
370      {
371         offset &= 0xf;
372         return m_laserudc->read(offset);
373      }
369374
370375      /* now identify the device */
371376      slotdevice = m_a2bus->get_a2bus_card(slot);
r31669r31670
410415         }
411416      }
412417   }
418   else if ((m_machinetype == LASER128) && (slot == 6))
419   {
420      offset &= 0xf;
421      m_laserudc->write(space, offset, data);
422      return;
423   }
413424
414425   /* now identify the device */
415426   slotdevice = m_a2bus->get_a2bus_card(slot);
trunk/src/mess/includes/apple2.h
r31669r31670
2727#define IIC_ACIA1_TAG "acia1"
2828#define IIC_ACIA2_TAG "acia2"
2929
30#define LASER128_UDC_TAG "l128udc"
31
3032#define PRINTER_PORT_TAG "printer"
3133#define MODEM_PORT_TAG "modem"
3234
r31669r31670
139141      m_sysconfig(*this, "a2_config"),
140142      m_cassette(*this, "cassette"),
141143      m_acia1(*this, IIC_ACIA1_TAG),
142      m_acia2(*this, IIC_ACIA2_TAG)
144      m_acia2(*this, IIC_ACIA2_TAG),
145      m_laserudc(*this, LASER128_UDC_TAG)
143146   { }
144147
145148   required_device<cpu_device> m_maincpu;
r31669r31670
157160   optional_device<cassette_image_device> m_cassette;
158161
159162   optional_device<mos6551_device> m_acia1, m_acia2;
163   optional_device<applefdc_base_device> m_laserudc;
160164
161165   UINT32 m_flags, m_flags_mask;
162166   INT32 m_a2_cnxx_slot;
trunk/src/mess/drivers/apple2.c
r31669r31670
194194#include "formats/ap2_dsk.h"
195195#include "includes/apple2.h"
196196#include "cpu/z80/z80.h"
197#include "machine/appldriv.h"
197198
198199#include "bus/a2bus/a2bus.h"
199200#include "bus/a2bus/a2lang.h"
r31669r31670
222223#include "bus/a2bus/a2corvus.h"
223224#include "bus/a2bus/a2mcms.h"
224225#include "bus/a2bus/a2dx1.h"
226#include "bus/a2bus/timemasterho.h"
225227#include "bus/a2bus/a2estd80col.h"
226228#include "bus/a2bus/a2eext80col.h"
227229#include "bus/a2bus/a2eramworks3.h"
r31669r31670
10191021   SLOT_INTERFACE("ultratermenh", A2BUS_ULTRATERMENH)    /* Videx UltraTerm (enhanced //e) */
10201022   SLOT_INTERFACE("aevm80", A2BUS_VTC2)    /* Applied Engineering ViewMaster 80 */
10211023   SLOT_INTERFACE("parallel", A2BUS_PIC)   /* Apple Parallel Interface Card */
1022   SLOT_INTERFACE("corvus", A2BUS_CORVUS)  /* Corvus flat-cable HDD interface (must go in slot 6) */
1024   SLOT_INTERFACE("corvus", A2BUS_CORVUS)  /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */
10231025   SLOT_INTERFACE("mcms1", A2BUS_MCMS1)  /* Mountain Computer Music System, card 1 of 2 */
10241026   SLOT_INTERFACE("mcms2", A2BUS_MCMS2)  /* Mountain Computer Music System, card 2 of 2.  must be in card 1's slot + 1! */
10251027   SLOT_INTERFACE("dx1", A2BUS_DX1)    /* Decillonix DX-1 sampler card */
1028   SLOT_INTERFACE("tm2ho", A2BUS_TIMEMASTERHO)   /* Applied Engineering TimeMaster II H.O. */
10261029SLOT_INTERFACE_END
10271030
10281031static SLOT_INTERFACE_START(apple2eaux_cards)
r31669r31670
12531256   MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
12541257MACHINE_CONFIG_END
12551258
1259const applefdc_interface fdc_interface =
1260{
1261   apple525_set_lines,         /* set_lines */
1262   apple525_set_enable_lines,  /* set_enable_lines */
1263
1264   apple525_read_data,         /* read_data */
1265   apple525_write_data,    /* write_data */
1266   apple525_read_status    /* read_status */
1267};
1268
1269static const floppy_interface floppy_interface =
1270{
1271   FLOPPY_STANDARD_5_25_DSHD,
1272   LEGACY_FLOPPY_OPTIONS_NAME(apple2),
1273   "floppy_5_25"
1274};
1275
12561276static MACHINE_CONFIG_DERIVED( laser128, apple2c )
12571277   MCFG_MACHINE_START_OVERRIDE(apple2_state,laser128)
12581278
1279   MCFG_APPLEFDC_ADD(LASER128_UDC_TAG, fdc_interface)
1280   MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
1281
12591282   MCFG_A2BUS_SLOT_REMOVE("sl6")
12601283
12611284   MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl1", A2BUS_LASER128, NULL)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team