Previous 15994 Revisions Next

r14832 Sunday 1st April, 2012 at 00:25:27 UTC by R. Belmont
Apple II slots rewrite [R. Belmont]

All Apple IIs that had slots now have them in MESS except the IIgs.

Slot 0 has one available card: the language card (which it defaults to)

Slots 1-7 can have any of the Mockingboard, CFFA2000, and Disk II cards. By default a Mockingboard is in Slot 4 and the Disk II is in 6. Due to current limitations only one Disk II controller per machine will work, but multiple CFFAs and Mockingboards should work great.

The plain 6502 firmware version of the CFFA2000 is now supported so you can use CHDs with the emulated II Plus and unenhanced IIe as well.

5.25" disks are broken on the IIgs at the moment; I'm looking into it.
[src/mess]mess.mak
[src/mess/drivers]apple2.c apple2gs.c
[src/mess/includes]apple2.h apple2gs.h
[src/mess/machine]a2bus.c a2bus.h a2cffa.c a2cffa.h a2diskii.c* a2diskii.h* a2lang.c* a2lang.h* a2mockingboard.c* a2mockingboard.h* apple2.c apple2gs.c

src/mess/machine/a2mockingboard.c
r0r14832
1/*********************************************************************
2
3    a2mockingboard.c
4
5    Implementation of the Sweet Micro Systems Mockingboard card
6 
7*********************************************************************/
8
9#include "emu.h"
10#include "includes/apple2.h"
11#include "imagedev/flopdrv.h"
12#include "formats/ap2_dsk.h"
13#include "devices/appldriv.h"
14#include "machine/applefdc.h"
15#include "machine/a2mockingboard.h"
16
17
18/***************************************************************************
19    PARAMETERS
20***************************************************************************/
21
22#define VIA1_TAG "mockbd_via1"
23#define VIA2_TAG "mockbd_via2"
24#define AY1_TAG "mockbd_ay1"
25#define AY2_TAG "mockbd_ay2"
26
27//**************************************************************************
28//  GLOBAL VARIABLES
29//**************************************************************************
30
31const device_type A2BUS_MOCKINGBOARD = &device_creator<a2bus_mockingboard_device>;
32
33static const ay8910_interface mockingboard_ay8910_interface =
34{
35   AY8910_LEGACY_OUTPUT,
36   AY8910_DEFAULT_LOADS,
37   DEVCB_NULL
38};
39
40const via6522_interface mockingboard_via1_intf =
41{
42   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via1_in_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via1_in_b),
43   DEVCB_NULL, DEVCB_NULL,
44   DEVCB_NULL, DEVCB_NULL,
45   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via1_out_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via1_out_b),
46   DEVCB_NULL, DEVCB_NULL,
47   DEVCB_NULL, DEVCB_NULL,
48   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via1_irq_w)
49};
50
51const via6522_interface mockingboard_via2_intf =
52{
53   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via2_in_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via2_in_b),
54   DEVCB_NULL, DEVCB_NULL,
55   DEVCB_NULL, DEVCB_NULL,
56   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via2_out_a), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via2_out_b),
57   DEVCB_NULL, DEVCB_NULL,
58   DEVCB_NULL, DEVCB_NULL,
59   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_mockingboard_device, via2_irq_w)
60};
61
62MACHINE_CONFIG_FRAGMENT( mockingboard )
63   MCFG_VIA6522_ADD(VIA1_TAG, 1022727, mockingboard_via1_intf)
64   MCFG_VIA6522_ADD(VIA2_TAG, 1022727, mockingboard_via2_intf)
65
66    MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
67    MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
68    MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
69    MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
70    MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
71    MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
72    MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
73MACHINE_CONFIG_END
74
75//-------------------------------------------------
76//  machine_config_additions - device-specific
77//  machine configurations
78//-------------------------------------------------
79
80machine_config_constructor a2bus_mockingboard_device::device_mconfig_additions() const
81{
82   return MACHINE_CONFIG_NAME( mockingboard );
83}
84
85//**************************************************************************
86//  LIVE DEVICE
87//**************************************************************************
88
89a2bus_mockingboard_device::a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
90    device_t(mconfig, A2BUS_MOCKINGBOARD, "Sweet Micro Systems Mockingboard", tag, owner, clock),
91    device_a2bus_card_interface(mconfig, *this),
92    m_via1(*this, VIA1_TAG),
93    m_via2(*this, VIA2_TAG),
94    m_ay1(*this, AY1_TAG),
95    m_ay2(*this, AY2_TAG)
96{
97   m_shortname = "a2mockbd";
98}
99
100a2bus_mockingboard_device::a2bus_mockingboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
101    device_t(mconfig, type, name, tag, owner, clock),
102    device_a2bus_card_interface(mconfig, *this),
103    m_via1(*this, VIA1_TAG),
104    m_via2(*this, VIA2_TAG),
105    m_ay1(*this, AY1_TAG),
106    m_ay2(*this, AY2_TAG)
107{
108   m_shortname = "a2mockbd";
109}
110
111//-------------------------------------------------
112//  device_start - device-specific startup
113//-------------------------------------------------
114
115void a2bus_mockingboard_device::device_start()
116{
117   // set_a2bus_device makes m_slot valid
118   set_a2bus_device();
119}
120
121void a2bus_mockingboard_device::device_reset()
122{
123    m_porta1 = m_porta2 = 0;
124}
125
126/*-------------------------------------------------
127    read_cnxx - called for reads from this card's c0nx space
128-------------------------------------------------*/
129
130UINT8 a2bus_mockingboard_device::read_cnxx(address_space &space, UINT8 offset)
131{
132    if (offset <= 0x10)
133    {
134        return m_via1->read(space, offset);
135    }
136    if (offset >= 0x80 && offset <= 0x90)
137    {
138        return m_via2->read(space, offset & 0xf);
139    }
140
141    return 0;
142}
143
144/*-------------------------------------------------
145    write_cnxx - called for writes to this card's c0nx space
146-------------------------------------------------*/
147
148void a2bus_mockingboard_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data)
149{
150    if (offset <= 0x10)
151    {
152        m_via1->write(space, offset, data);
153    }
154    else if (offset >= 0x80 && offset <= 0x90)
155    {
156        m_via2->write(space, offset & 0xf, data);
157    }
158    else
159    {
160        printf("Mockingboard(%d): unk write %02x to Cn%02X\n", m_slot, data, offset);
161    }
162}
163
164
165WRITE_LINE_MEMBER( a2bus_mockingboard_device::via1_irq_w )
166{
167    if (state)
168    {
169        raise_slot_irq();
170    }
171    else
172    {
173        lower_slot_irq();
174    }
175}
176
177WRITE_LINE_MEMBER( a2bus_mockingboard_device::via2_irq_w )
178{
179    if (state)
180    {
181        raise_slot_nmi();
182    }
183    else
184    {
185        lower_slot_nmi();
186    }
187}
188
189READ8_MEMBER( a2bus_mockingboard_device::via1_in_a )
190{
191   return 0;
192}
193
194WRITE8_MEMBER( a2bus_mockingboard_device::via1_out_a )
195{
196    m_porta1 = data;
197}
198
199READ8_MEMBER( a2bus_mockingboard_device::via1_in_b )
200{
201   return 0;
202}
203
204WRITE8_MEMBER( a2bus_mockingboard_device::via1_out_b )
205{
206    if (!(data & 8))
207    {
208        ay8910_reset_w(m_ay1, 0, 0);
209    }
210    else
211    {
212        switch (data & 3)
213        {
214            case 0: // BDIR=0, BC1=0 (inactive)
215                break;
216
217            case 1: // BDIR=0, BC1=1 (read PSG)
218                m_porta1 = ay8910_r(m_ay1, 0);
219                break;
220
221            case 2: // BDIR=1, BC1=0 (write PSG)
222                ay8910_data_w(m_ay1, 0, m_porta1);
223                break;
224
225            case 3: // BDIR=1, BC1=1 (latch)
226                ay8910_address_w(m_ay1, 0, m_porta1);
227                break;
228        }
229    }
230}
231
232READ8_MEMBER( a2bus_mockingboard_device::via2_in_a )
233{
234   return 0;
235}
236
237WRITE8_MEMBER( a2bus_mockingboard_device::via2_out_a )
238{
239    m_porta2 = data;
240}
241
242READ8_MEMBER( a2bus_mockingboard_device::via2_in_b )
243{
244   return 0;
245}
246
247WRITE8_MEMBER( a2bus_mockingboard_device::via2_out_b )
248{
249    if (!(data & 8))
250    {
251        ay8910_reset_w(m_ay2, 0, 0);
252    }
253    else
254    {
255        switch (data & 3)
256        {
257            case 0: // BDIR=0, BC1=0 (inactive)
258                break;
259
260            case 1: // BDIR=0, BC1=1 (read PSG)
261                m_porta2 = ay8910_r(m_ay2, 0);
262                break;
263
264            case 2: // BDIR=1, BC1=0 (write PSG)
265                ay8910_data_w(m_ay2, 0, m_porta2);
266                break;
267
268            case 3: // BDIR=1, BC1=1 (latch)
269                ay8910_address_w(m_ay2, 0, m_porta2);
270                break;
271        }
272    }
273}
src/mess/machine/a2mockingboard.h
r0r14832
1/*********************************************************************
2
3    a2mockingboard.h
4
5    Sweet Micro Systems Mockingboard and compatibles
6
7*********************************************************************/
8
9#ifndef __A2BUS_MOCKINGBOARD__
10#define __A2BUS_MOCKINGBOARD__
11
12#include "emu.h"
13#include "machine/a2bus.h"
14#include "machine/6522via.h"
15#include "sound/ay8910.h"
16
17//**************************************************************************
18//  TYPE DEFINITIONS
19//**************************************************************************
20
21class a2bus_mockingboard_device:
22    public device_t,
23    public device_a2bus_card_interface
24{
25public:
26    // construction/destruction
27    a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
28    a2bus_mockingboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
29
30    // optional information overrides
31    virtual machine_config_constructor device_mconfig_additions() const;
32
33    DECLARE_WRITE_LINE_MEMBER( via1_irq_w );
34    DECLARE_WRITE_LINE_MEMBER( via2_irq_w );
35    DECLARE_READ8_MEMBER(via1_in_a);
36    DECLARE_READ8_MEMBER(via1_in_b);
37    DECLARE_WRITE8_MEMBER(via1_out_a);
38    DECLARE_WRITE8_MEMBER(via1_out_b);
39    DECLARE_READ8_MEMBER(via2_in_a);
40    DECLARE_READ8_MEMBER(via2_in_b);
41    DECLARE_WRITE8_MEMBER(via2_out_a);
42    DECLARE_WRITE8_MEMBER(via2_out_b);
43
44protected:
45    virtual void device_start();
46    virtual void device_reset();
47
48    // overrides of standard a2bus slot functions
49    virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
50    virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data);
51
52   required_device<via6522_device> m_via1;
53   required_device<via6522_device> m_via2;
54    required_device<device_t> m_ay1;
55    required_device<device_t> m_ay2;
56     
57private:
58    UINT8 m_porta1, m_porta2;
59};
60
61// device type definition
62extern const device_type A2BUS_MOCKINGBOARD;
63
64#endif  /* __A2BUS_MOCKINGBOARD__ */
65
src/mess/machine/apple2gs.c
r14831r14832
128128#include "sound/es5503.h"
129129#include "machine/ram.h"
130130#include "debugger.h"
131#include "machine/ap2_slot.h"
131#include "machine/a2bus.h"
132132
133133#define LOG_C0XX         0
134134#define LOG_ADB            0
r14831r14832
10481048      case 0x21:   /* C021 - MONOCOLOR */
10491049      case 0x2C:   /* C02C - CHARROM */
10501050         result = 0x00;
1051            break;
10511052
1053        // slot 6 registers should go to applefdc if slot 6 not "Your Card"
1054        case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7:
1055        case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xed: case 0xee: case 0xef:
1056         if ((state->m_sltromsel & (1 << 6)) == 0)
1057         {
1058                result = applefdc_r(state->m_fdc, offset);
1059            }
1060            else
1061            {
1062                result = apple2_c0xx_r(space, offset);
1063            }
1064            break;
1065
10521066      default:
10531067         result = apple2_c0xx_r(space, offset);
10541068         break;
r14831r14832
11861200            VAR_ALTZP | VAR_PAGE2 | VAR_RAMRD | VAR_RAMWRT | VAR_LCRAM | VAR_LCRAM2 | VAR_INTCXROM);
11871201         break;
11881202
1203        // slot 6 registers should go to applefdc if slot 6 not "Your Card"
1204        case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7:
1205        case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xed: case 0xee: case 0xef:
1206            if ((state->m_sltromsel & (1 << 6)) == 0)
1207            {
1208                applefdc_w(state->m_fdc, offset, data);
1209            }
1210            else
1211            {
1212                apple2_c0xx_w(space, offset, data);
1213            }
1214            break;
1215
11891216      default:
11901217         apple2_c0xx_w(space, offset, data);
11911218         break;
r14831r14832
15111538
15121539
15131540
1514static UINT8 apple2gs_xxCxxx_r(running_machine &machine, offs_t address)
1541static UINT8 apple2gs_xxCxxx_r(address_space &space, running_machine &machine, offs_t address)
15151542{
15161543   apple2gs_state *state = machine.driver_data<apple2gs_state>();
15171544   UINT8 result;
r14831r14832
15281555   }
15291556   else
15301557   {
1531      device_t *slotdevice;
1558      device_a2bus_card_interface *slotdevice;
15321559
15331560      slot = (address & 0x000F00) / 0x100;
15341561      if (slot <= 7)   // slots 1-7, it's the slot
15351562      {
1536         slotdevice = apple2_slot(machine, slot);
1563         slotdevice = state->m_a2bus->get_a2bus_card(slot);
15371564
15381565         // is this slot internal or "Your Card"?
15391566         if ((state->m_sltromsel & (1 << slot)) == 0)
r14831r14832
15521579
15531580            if (slotdevice != NULL)
15541581            {
1555               result = apple2_slot_ROM_r(slotdevice, address&0xff);
1582               result = slotdevice->read_cnxx(space, address&0xff);
15561583            }
15571584            else
15581585            {
r14831r14832
15721599
15731600         if ( state->m_a2_cnxx_slot >= 0 && state->m_a2_cnxx_slot <= 7 )
15741601         {
1575            slotdevice = apple2_slot(machine, state->m_a2_cnxx_slot);
1602            slotdevice = state->m_a2bus->get_a2bus_card(state->m_a2_cnxx_slot);
15761603         }
15771604
15781605         if (slotdevice)
15791606         {
1580            result = apple2_c800_slot_r(slotdevice, address&0x7ff);
1607            result = slotdevice->read_c800(space, address&0x7ff);
15811608         }
15821609         else
15831610         {
r14831r14832
15901617
15911618
15921619
1593static void apple2gs_xxCxxx_w(running_machine &machine, offs_t address, UINT8 data)
1620static void apple2gs_xxCxxx_w(address_space &space, running_machine &machine, offs_t address, UINT8 data)
15941621{
15951622   apple2gs_state *state = machine.driver_data<apple2gs_state>();
15961623   int slot;
r14831r14832
16571684
16581685
16591686
1660static READ8_HANDLER( apple2gs_00Cxxx_r ) { return apple2gs_xxCxxx_r(space->machine(), offset | 0x00C000); }
1661static READ8_HANDLER( apple2gs_01Cxxx_r ) { return apple2gs_xxCxxx_r(space->machine(), offset | 0x01C000); }
1662static READ8_HANDLER( apple2gs_E0Cxxx_r ) { return apple2gs_xxCxxx_r(space->machine(), offset | 0xE0C000); }
1663static READ8_HANDLER( apple2gs_E1Cxxx_r ) { return apple2gs_xxCxxx_r(space->machine(), offset | 0xE1C000); }
1687static READ8_HANDLER( apple2gs_00Cxxx_r ) { return apple2gs_xxCxxx_r(*space, space->machine(), offset | 0x00C000); }
1688static READ8_HANDLER( apple2gs_01Cxxx_r ) { return apple2gs_xxCxxx_r(*space, space->machine(), offset | 0x01C000); }
1689static READ8_HANDLER( apple2gs_E0Cxxx_r ) { return apple2gs_xxCxxx_r(*space, space->machine(), offset | 0xE0C000); }
1690static READ8_HANDLER( apple2gs_E1Cxxx_r ) { return apple2gs_xxCxxx_r(*space, space->machine(), offset | 0xE1C000); }
16641691
1665static WRITE8_HANDLER( apple2gs_00Cxxx_w ) { apple2gs_xxCxxx_w(space->machine(), offset | 0x00C000, data); }
1666static WRITE8_HANDLER( apple2gs_01Cxxx_w ) { apple2gs_xxCxxx_w(space->machine(), offset | 0x01C000, data); }
1667static WRITE8_HANDLER( apple2gs_E0Cxxx_w ) { apple2gs_xxCxxx_w(space->machine(), offset | 0xE0C000, data); }
1668static WRITE8_HANDLER( apple2gs_E1Cxxx_w ) { apple2gs_xxCxxx_w(space->machine(), offset | 0xE1C000, data); }
1692static WRITE8_HANDLER( apple2gs_00Cxxx_w ) { apple2gs_xxCxxx_w(*space, space->machine(), offset | 0x00C000, data); }
1693static WRITE8_HANDLER( apple2gs_01Cxxx_w ) { apple2gs_xxCxxx_w(*space, space->machine(), offset | 0x01C000, data); }
1694static WRITE8_HANDLER( apple2gs_E0Cxxx_w ) { apple2gs_xxCxxx_w(*space, space->machine(), offset | 0xE0C000, data); }
1695static WRITE8_HANDLER( apple2gs_E1Cxxx_w ) { apple2gs_xxCxxx_w(*space, space->machine(), offset | 0xE1C000, data); }
16691696
16701697static WRITE8_HANDLER( apple2gs_Exxxxx_w )
16711698{
src/mess/machine/a2diskii.c
r0r14832
1/*********************************************************************
2
3    a2diskii.c
4
5    Implementation of the Apple II Disk II controller card
6 
7*********************************************************************/
8
9#include "emu.h"
10#include "includes/apple2.h"
11#include "imagedev/flopdrv.h"
12#include "formats/ap2_dsk.h"
13#include "devices/appldriv.h"
14#include "machine/applefdc.h"
15#include "machine/a2diskii.h"
16
17
18/***************************************************************************
19    PARAMETERS
20***************************************************************************/
21
22//**************************************************************************
23//  GLOBAL VARIABLES
24//**************************************************************************
25
26const device_type A2BUS_DISKII = &device_creator<a2bus_diskii_device>;
27const device_type A2BUS_IWM_FDC = &device_creator<a2bus_iwmflop_device>;
28
29#define DISKII_ROM_REGION  "diskii_rom"
30#define FDC_TAG            "diskii_fdc"
31
32const applefdc_interface fdc_interface =
33{
34   apple525_set_lines,         /* set_lines */
35   apple525_set_enable_lines,   /* set_enable_lines */
36
37   apple525_read_data,         /* read_data */
38   apple525_write_data,   /* write_data */
39   apple525_read_status   /* read_status */
40};
41
42static const floppy_interface floppy_interface =
43{
44   DEVCB_NULL,
45   DEVCB_NULL,
46   DEVCB_NULL,
47   DEVCB_NULL,
48   DEVCB_NULL,
49   FLOPPY_STANDARD_5_25_DSHD,
50   LEGACY_FLOPPY_OPTIONS_NAME(apple2),
51   "floppy_5_25",
52   NULL
53};
54
55MACHINE_CONFIG_FRAGMENT( diskii )
56   MCFG_APPLEFDC_ADD(FDC_TAG, fdc_interface)
57   MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
58MACHINE_CONFIG_END
59
60ROM_START( diskii )
61   ROM_REGION(0x100, DISKII_ROM_REGION, 0)
62    ROM_LOAD( "341-0027-a.p5", 0x000000, 0x000100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16) )
63ROM_END
64
65//-------------------------------------------------
66//  machine_config_additions - device-specific
67//  machine configurations
68//-------------------------------------------------
69
70machine_config_constructor a2bus_floppy_device::device_mconfig_additions() const
71{
72   return MACHINE_CONFIG_NAME( diskii );
73}
74
75//-------------------------------------------------
76//  rom_region - device-specific ROM region
77//-------------------------------------------------
78
79const rom_entry *a2bus_floppy_device::device_rom_region() const
80{
81   return ROM_NAME( diskii );
82}
83
84//**************************************************************************
85//  LIVE DEVICE
86//**************************************************************************
87
88a2bus_floppy_device::a2bus_floppy_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
89        device_t(mconfig, type, name, tag, owner, clock),
90        device_a2bus_card_interface(mconfig, *this),
91        m_fdc(*this, FDC_TAG)
92{
93}
94
95a2bus_diskii_device::a2bus_diskii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
96    a2bus_floppy_device(mconfig, A2BUS_DISKII, "Apple Disk II controller", tag, owner, clock)
97{
98   m_shortname = "a2diskii";
99}
100
101a2bus_iwmflop_device::a2bus_iwmflop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
102    a2bus_floppy_device(mconfig, A2BUS_IWM_FDC, "Apple IWM floppy card", tag, owner, clock)
103{
104   m_shortname = "a2diskii";
105}
106
107//-------------------------------------------------
108//  device_start - device-specific startup
109//-------------------------------------------------
110
111void a2bus_floppy_device::device_start()
112{
113   // set_a2bus_device makes m_slot valid
114   set_a2bus_device();
115
116   astring tempstring;
117   m_rom = device().machine().region(this->subtag(tempstring, DISKII_ROM_REGION))->base();
118}
119
120void a2bus_floppy_device::device_reset()
121{
122}
123
124
125/*-------------------------------------------------
126    read_c0nx - called for reads from this card's c0nx space
127-------------------------------------------------*/
128
129UINT8 a2bus_floppy_device::read_c0nx(address_space &space, UINT8 offset)
130{
131   return applefdc_r(m_fdc, offset);
132}
133
134
135/*-------------------------------------------------
136    write_c0nx - called for writes to this card's c0nx space
137-------------------------------------------------*/
138
139void a2bus_floppy_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
140{
141    applefdc_w(m_fdc, offset, data);
142}
143
144/*-------------------------------------------------
145    read_cnxx - called for reads from this card's c0nx space
146-------------------------------------------------*/
147
148UINT8 a2bus_floppy_device::read_cnxx(address_space &space, UINT8 offset)
149{
150    return m_rom[offset];
151}
152
src/mess/machine/a2diskii.h
r0r14832
1/*********************************************************************
2
3    a2diskii.h
4
5    Apple II Disk II Controller Card
6
7*********************************************************************/
8
9#ifndef __A2BUS_DISKII__
10#define __A2BUS_DISKII__
11
12#include "emu.h"
13#include "machine/a2bus.h"
14
15//**************************************************************************
16//  TYPE DEFINITIONS
17//**************************************************************************
18
19class a2bus_floppy_device:
20    public device_t,
21    public device_a2bus_card_interface
22{
23public:
24    // construction/destruction
25    a2bus_floppy_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
26
27    // optional information overrides
28    virtual machine_config_constructor device_mconfig_additions() const;
29    virtual const rom_entry *device_rom_region() const;
30
31protected:
32    virtual void device_start();
33    virtual void device_reset();
34
35    // overrides of standard a2bus slot functions
36    virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
37    virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
38    virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
39 
40   required_device<device_t> m_fdc;
41     
42private:
43    UINT8 *m_rom;
44};
45
46class a2bus_diskii_device: public a2bus_floppy_device
47{
48public:
49    a2bus_diskii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
50};
51
52class a2bus_iwmflop_device: public a2bus_floppy_device
53{
54public:
55    a2bus_iwmflop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
56};
57
58// device type definition
59extern const device_type A2BUS_DISKII;
60extern const device_type A2BUS_IWM_FDC;
61
62#endif  /* __A2BUS_DISKII__ */
63
src/mess/machine/a2bus.c
r14831r14832
2525//  a2bus_slot_device - constructor
2626//-------------------------------------------------
2727a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
28        device_t(mconfig, A2BUS_SLOT, "A2BUS_SLOT", tag, owner, clock),
28        device_t(mconfig, A2BUS_SLOT, "Apple II Slot", tag, owner, clock),
2929      device_slot_interface(mconfig, *this)
3030{
3131}
r14831r14832
9898//-------------------------------------------------
9999
100100a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
101        device_t(mconfig, A2BUS, "A2BUS", tag, owner, clock)
101        device_t(mconfig, A2BUS, "Apple II Bus", tag, owner, clock)
102102{
103103}
104104
r14831r14832
113113void a2bus_device::device_start()
114114{
115115   m_maincpu = machine().device(m_cputag);
116   // resolve callbacks
116
117    // resolve callbacks
117118   m_out_irq_func.resolve(m_out_irq_cb, *this);
118   m_out_irq_func.resolve(m_out_nmi_cb, *this);
119   m_out_nmi_func.resolve(m_out_nmi_cb, *this);
120
121    // clear slots
122    for (int i = 0; i < 8; i++)
123    {
124        m_device_list[i] = NULL;
125    }
119126}
120127
121128//-------------------------------------------------
r14831r14832
126133{
127134}
128135
129void a2bus_device::add_a2bus_card(device_a2bus_card_interface *card)
136device_a2bus_card_interface *a2bus_device::get_a2bus_card(int slot)
130137{
131   m_device_list.append(*card);
138    return m_device_list[slot];
132139}
133140
141void a2bus_device::add_a2bus_card(int slot, device_a2bus_card_interface *card)
142{
143   m_device_list[slot] = card;
144}
145
134146void a2bus_device::set_irq_line(int state)
135147{
136148    m_out_irq_func(state);
r14831r14832
194206   }
195207
196208   m_a2bus = dynamic_cast<a2bus_device *>(device().machine().device(m_a2bus_tag));
197   m_a2bus->add_a2bus_card(this);
209   m_a2bus->add_a2bus_card(m_slot, this);
198210}
199211
200212
src/mess/machine/a2bus.h
r14831r14832
8686   // inline configuration
8787   static void static_set_cputag(device_t &device, const char *tag);
8888
89   void add_a2bus_card(device_a2bus_card_interface *card);
89   void add_a2bus_card(int slot, device_a2bus_card_interface *card);
90    device_a2bus_card_interface *get_a2bus_card(int slot);
91
9092    void set_irq_line(int state);
9193    void set_nmi_line(int state);
9294
r14831r14832
105107   devcb_resolved_write_line   m_out_irq_func;
106108   devcb_resolved_write_line   m_out_nmi_func;
107109
108   simple_list<device_a2bus_card_interface> m_device_list;
110    device_a2bus_card_interface *m_device_list[8];
109111   const char *m_cputag;
110112};
111113
r14831r14832
124126   device_a2bus_card_interface(const machine_config &mconfig, device_t &device);
125127   virtual ~device_a2bus_card_interface();
126128
129    virtual UINT8 read_c0nx(address_space &space, UINT8 offset) { return 0; }
130    virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data) {}
131    virtual UINT8 read_cnxx(address_space &space, UINT8 offset) { return 0; }
132    virtual void write_cnxx(address_space &space, UINT8 offset, UINT8 data) {}
133    virtual UINT8 read_c800(address_space &space, UINT16 offset) { return 0; }
134    virtual void write_c800(address_space &space, UINT16 offset, UINT8 data) {}
135
127136   device_a2bus_card_interface *next() const { return m_next; }
128137
129138   void set_a2bus_device();
src/mess/machine/a2lang.c
r0r14832
1/*********************************************************************
2
3    a2lang.c
4
5    Implementation of the Apple II Language Card
6 
7    TODO: refactor machine/apple2.c so it's possible to have an Apple II
8          and II Plus without a language card (and to emulate other
9          slot 0 stuff like hack/freezer cards).
10 
11*********************************************************************/
12
13#include "emu.h"
14#include "includes/apple2.h"
15#include "machine/a2lang.h"
16
17
18/***************************************************************************
19    PARAMETERS
20***************************************************************************/
21
22#define LOG_LANGCARD   0
23
24//**************************************************************************
25//  GLOBAL VARIABLES
26//**************************************************************************
27
28const device_type A2BUS_LANG = &device_creator<a2bus_lang_device>;
29
30
31//**************************************************************************
32//  LIVE DEVICE
33//**************************************************************************
34
35a2bus_lang_device::a2bus_lang_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
36        device_t(mconfig, A2BUS_LANG, "Apple II Language Card", tag, owner, clock),
37      device_a2bus_card_interface(mconfig, *this)
38{
39   m_shortname = "a2lang";
40}
41
42a2bus_lang_device::a2bus_lang_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
43        device_t(mconfig, type, name, tag, owner, clock),
44      device_a2bus_card_interface(mconfig, *this)
45{
46   m_shortname = "a2lang";
47}
48
49//-------------------------------------------------
50//  device_start - device-specific startup
51//-------------------------------------------------
52
53void a2bus_lang_device::device_start()
54{
55   // set_a2bus_device makes m_slot valid
56   set_a2bus_device();
57}
58
59void a2bus_lang_device::device_reset()
60{
61}
62
63/*-------------------------------------------------
64    apple2_langcard_touch - device read callback
65-------------------------------------------------*/
66
67void a2bus_lang_device::langcard_touch(offs_t offset)
68{
69   UINT32 val, mask;
70
71   if (LOG_LANGCARD)
72      logerror("language card bankswitch read, offset: $c08%0x\n", offset);
73
74   /* determine which flags to change */
75   mask = VAR_LCWRITE | VAR_LCRAM | VAR_LCRAM2;
76   val = 0;
77
78   if (offset & 0x01)
79      val |= VAR_LCWRITE;
80
81   switch(offset & 0x03)
82   {
83      case 0x03:
84      case 0x00:
85         val |= VAR_LCRAM;
86         break;
87   }
88
89   if ((offset & 0x08) == 0)
90      val |= VAR_LCRAM2;
91
92   /* change the flags */
93   apple2_setvar(machine(), val, mask);
94}
95
96
97
98/*-------------------------------------------------
99    read_c0nx - called for reads from this card's c0nx space
100-------------------------------------------------*/
101
102UINT8 a2bus_lang_device::read_c0nx(address_space &space, UINT8 offset)
103{
104   langcard_touch(offset);
105   return 0;
106}
107
108
109
110/*-------------------------------------------------
111    write_c0nx - called for writes to this card's c0nx space
112-------------------------------------------------*/
113
114void a2bus_lang_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
115{
116   langcard_touch(offset);
117}
src/mess/machine/a2lang.h
r0r14832
1/*********************************************************************
2
3    a2lang.h
4
5    Apple II Language Card
6
7*********************************************************************/
8
9#ifndef __A2BUS_LANG__
10#define __A2BUS_LANG__
11
12#include "emu.h"
13#include "machine/a2bus.h"
14
15//**************************************************************************
16//  TYPE DEFINITIONS
17//**************************************************************************
18
19class a2bus_lang_device:
20    public device_t,
21    public device_a2bus_card_interface
22{
23public:
24    // construction/destruction
25    a2bus_lang_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
26    a2bus_lang_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
27
28protected:
29    virtual void device_start();
30    virtual void device_reset();
31
32    virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
33    virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
34 
35private:
36    void langcard_touch(offs_t offset);
37};
38
39// device type definition
40extern const device_type A2BUS_LANG;
41
42#endif  /* __A2BUS_LANG__ */
43
src/mess/machine/a2cffa.c
r14831r14832
1212#include "a2cffa.h"
1313#include "includes/apple2.h"
1414#include "machine/idectrl.h"
15#include "imagedev/harddriv.h"
1516
1617
1718/***************************************************************************
r14831r14832
2021
2122#define LOG_A2CFFA   1
2223
24//**************************************************************************
25//  GLOBAL VARIABLES
26//**************************************************************************
2327
24/***************************************************************************
25    TYPE DEFINITIONS
26***************************************************************************/
28const device_type A2BUS_CFFA2 = &device_creator<a2bus_cffa2_device>;
29const device_type A2BUS_CFFA2_6502 = &device_creator<a2bus_cffa2_6502_device>;
2730
28typedef struct _a2cffa_token a2cffa_token;
29struct _a2cffa_token
30{
31   UINT8 *ROM;      // card ROM
32   UINT16 lastdata;   // last data from IDE
33};
31#define CFFA2_ROM_REGION  "cffa2_rom"
32#define CFFA2_IDE_TAG     "cffa2_ide"
3433
34MACHINE_CONFIG_FRAGMENT( cffa2 )
35    MCFG_IDE_CONTROLLER_ADD(CFFA2_IDE_TAG, NULL, ide_image_devices, "hdd", "hdd")
36MACHINE_CONFIG_END
3537
38ROM_START( cffa2 )
39   ROM_REGION(0x1000, CFFA2_ROM_REGION, 0)
40    ROM_LOAD( "cffa20eec02.bin", 0x000000, 0x001000, CRC(fb3726f8) SHA1(080ff88f19de22328e162954ee2b51ee65f9d5cd) )
41ROM_END
42
43ROM_START( cffa2_6502 )
44   ROM_REGION(0x1000, CFFA2_ROM_REGION, 0)
45    ROM_LOAD( "cffa20ee02.bin", 0x000000, 0x001000, CRC(3ecafce5) SHA1(d600692ed9626668233a22a48236af639410cb7b) )
46ROM_END
47
3648/***************************************************************************
37    INLINE FUNCTIONS
49    FUNCTION PROTOTYPES
3850***************************************************************************/
3951
40INLINE a2cffa_token *get_token(device_t *device)
52//-------------------------------------------------
53//  machine_config_additions - device-specific
54//  machine configurations
55//-------------------------------------------------
56
57machine_config_constructor a2bus_cffa2000_device::device_mconfig_additions() const
4158{
42   assert(device != NULL);
43   assert(device->type() == A2CFFA);
44   return (a2cffa_token *)downcast<legacy_device_base *>(device)->token();
59   return MACHINE_CONFIG_NAME( cffa2 );
4560}
4661
62//-------------------------------------------------
63//  rom_region - device-specific ROM region
64//-------------------------------------------------
4765
66const rom_entry *a2bus_cffa2000_device::device_rom_region() const
67{
68   return ROM_NAME( cffa2 );
69}
4870
49/***************************************************************************
50    FUNCTION PROTOTYPES
51***************************************************************************/
71const rom_entry *a2bus_cffa2_6502_device::device_rom_region() const
72{
73   return ROM_NAME( cffa2_6502 );
74}
5275
53/*-------------------------------------------------
54    DEVICE_START(a2cffa) - device start
55    function
56-------------------------------------------------*/
5776
58static DEVICE_START(a2cffa)
77//**************************************************************************
78//  LIVE DEVICE
79//**************************************************************************
80
81a2bus_cffa2000_device::a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
82    device_t(mconfig, type, name, tag, owner, clock),
83    device_a2bus_card_interface(mconfig, *this),
84    m_ide(*this, CFFA2_IDE_TAG)
5985{
6086}
6187
88a2bus_cffa2_device::a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
89    a2bus_cffa2000_device(mconfig, A2BUS_CFFA2, "CFFA2000 Compact Flash (65C02 firmware, www.dreher.net)", tag, owner, clock)
90{
91   m_shortname = "a2cffa2";
92}
6293
94a2bus_cffa2_6502_device::a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
95    a2bus_cffa2000_device(mconfig, A2BUS_CFFA2, "CFFA2000 Compact Flash (65C02 firmware, www.dreher.net)", tag, owner, clock)
96{
97   m_shortname = "a2cffa02";
98}
6399
64/*-------------------------------------------------
65    DEVICE_RESET(a2cffa) - device reset
66    function
67-------------------------------------------------*/
100//-------------------------------------------------
101//  device_start - device-specific startup
102//-------------------------------------------------
68103
69static DEVICE_RESET(a2cffa)
104void a2bus_cffa2000_device::device_start()
70105{
71   a2cffa_token *token = get_token(device);
106   // set_a2bus_device makes m_slot valid
107   set_a2bus_device();
72108
73   // find card ROM
74   token->ROM = (UINT8 *)device->machine().region("cffa")->base();
109   astring tempstring;
110   m_rom = device().machine().region(this->subtag(tempstring, CFFA2_ROM_REGION))->base();
75111}
76112
113void a2bus_cffa2000_device::device_reset()
114{
115}
77116
78117
79118/*-------------------------------------------------
80    a2cffa_r - device read function
119    read_c0nx - called for reads from this card's c0nx space
81120-------------------------------------------------*/
82121
83READ8_DEVICE_HANDLER(a2cffa_r)
122UINT8 a2bus_cffa2000_device::read_c0nx(address_space &space, UINT8 offset)
84123{
85   a2cffa_token *token = get_token(device);
86
87124   if (offset == 0)
88125   {
89      return token->lastdata>>8;
126      return m_lastdata>>8;
90127   }
91128   else if (offset == 8)
92129   {
93      token->lastdata = ide_controller_r(device->machine().device("ide"), 0x1f0+offset-8, 2);
94      return token->lastdata & 0xff;
130      m_lastdata = ide_controller_r(m_ide, 0x1f0+offset-8, 2);
131      return m_lastdata & 0xff;
95132   }
96133   else if (offset > 8)
97134   {
98      return ide_controller_r(device->machine().device("ide"), 0x1f0+offset-8, 1);
135      return ide_controller_r(m_ide, 0x1f0+offset-8, 1);
99136   }
100137
101138   return 0xff;
102139}
103140
104141
105
106142/*-------------------------------------------------
107    a2cffa_w - device write function
143    write_c0nx - called for writes to this card's c0nx space
108144-------------------------------------------------*/
109145
110WRITE8_DEVICE_HANDLER(a2cffa_w)
146void a2bus_cffa2000_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
111147{
112   a2cffa_token *token = get_token(device);
113
114148   if (offset == 0)
115149   {
116      token->lastdata &= 0x00ff;
117      token->lastdata |= data<<8;
150      m_lastdata &= 0x00ff;
151      m_lastdata |= data<<8;
118152   }
119153   else if (offset == 8)
120154   {
121      token->lastdata &= 0xff00;
122      token->lastdata |= data;
123      ide_controller_w(device->machine().device("ide"), 0x1f0+offset-8, 2, token->lastdata);
155      m_lastdata &= 0xff00;
156      m_lastdata |= data;
157      ide_controller_w(m_ide, 0x1f0+offset-8, 2, m_lastdata);
124158   }
125159   else if (offset > 8)
126160   {
127      ide_controller_w(device->machine().device("ide"), 0x1f0+offset-8, 1, data);
161      ide_controller_w(m_ide, 0x1f0+offset-8, 1, data);
128162   }
129163}
130164
165/*-------------------------------------------------
166    read_cnxx - called for reads from this card's cnxx space
167-------------------------------------------------*/
131168
132/* slot ext. ROM (C800) read function */
133READ8_DEVICE_HANDLER(a2cffa_c800_r)
169UINT8 a2bus_cffa2000_device::read_cnxx(address_space &space, UINT8 offset)
134170{
135   a2cffa_token *token = get_token(device);
171    int slotimg = m_slot * 0x100;
136172
137   return token->ROM[offset+0x800];
173    // ROM contains a CnXX image for each of slots 1-7
174    return m_rom[offset+slotimg];
138175}
139176
140/* slot ext. ROM (C800) write function */
141WRITE8_DEVICE_HANDLER(a2cffa_c800_w)
142{
143}
144
145/* slot ROM (CN00) read function */
146READ8_DEVICE_HANDLER(a2cffa_cnxx_r)
147{
148   a2cffa_token *token = get_token(device);
149
150   return token->ROM[offset+0x700];   // this needs to be = to the slot #, we assume 7 for now
151}
152
153/* slot ROM (CN00) write function */
154WRITE8_DEVICE_HANDLER(a2cffa_cnxx_w)
155{
156}
157
158
159177/*-------------------------------------------------
160    DEVICE_GET_INFO(a2cffa) - device get info
161    function
178    read_c800 - called for reads from this card's c800 space
162179-------------------------------------------------*/
163180
164DEVICE_GET_INFO(a2cffa)
181UINT8 a2bus_cffa2000_device::read_c800(address_space &space, UINT16 offset)
165182{
166   switch (state)
167   {
168      /* --- the following bits of info are returned as 64-bit signed integers --- */
169      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(a2cffa_token);      break;
170      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = 0;                        break;
171
172      /* --- the following bits of info are returned as pointers to data or functions --- */
173      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(a2cffa);   break;
174      case DEVINFO_FCT_STOP:                     /* Nothing */                        break;
175      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(a2cffa);   break;
176
177      /* --- the following bits of info are returned as NULL-terminated strings --- */
178      case DEVINFO_STR_NAME:                     strcpy(info->s, "Apple II CFFA Card (www.dreher.net)");         break;
179      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "Apple II CFFA Card (www.dreher.net)");         break;
180      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.0");                     break;
181      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);                     break;
182   }
183    return m_rom[offset+0x800];
183184}
184185
185DEFINE_LEGACY_DEVICE(A2CFFA, a2cffa);
src/mess/machine/a2cffa.h
r14831r14832
77
88*********************************************************************/
99
10#ifndef __A2CFFA__
11#define __A2CFFA__
10#ifndef __A2BUS_CFFA2__
11#define __A2BUS_CFFA2__
1212
1313#include "emu.h"
14#include "machine/a2bus.h"
1415
16//**************************************************************************
17//  TYPE DEFINITIONS
18//**************************************************************************
1519
16/***************************************************************************
17    CONSTANTS
18***************************************************************************/
20class a2bus_cffa2000_device:
21    public device_t,
22    public device_a2bus_card_interface
23{
24public:
25    // construction/destruction
26    a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
1927
20DECLARE_LEGACY_DEVICE(A2CFFA, a2cffa);
28    // optional information overrides
29    virtual machine_config_constructor device_mconfig_additions() const;
30    virtual const rom_entry *device_rom_region() const;
2131
22#define MCFG_A2CFFA_ADD(_tag)   \
23   MCFG_DEVICE_ADD((_tag), A2CFFA, 0)
32protected:
33    virtual void device_start();
34    virtual void device_reset();
2435
36    // overrides of standard a2bus slot functions
37    virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
38    virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
39    virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
40    virtual UINT8 read_c800(address_space &space, UINT16 offset);
41     
42    required_device<device_t> m_ide;
43         
44private:
45    UINT8 *m_rom;
46    UINT16 m_lastdata;
47};
2548
26/***************************************************************************
27    FUNCTION PROTOTYPES
28***************************************************************************/
29/* slot read function */
30READ8_DEVICE_HANDLER(a2cffa_r);
49class a2bus_cffa2_device : public a2bus_cffa2000_device
50{
51public:
52    a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
53};
3154
32/* slot write function */
33WRITE8_DEVICE_HANDLER(a2cffa_w);
55class a2bus_cffa2_6502_device : public a2bus_cffa2000_device
56{
57public:
58    a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
59    virtual const rom_entry *device_rom_region() const;
60};
3461
35/* slot ext. ROM (C800) read function */
36READ8_DEVICE_HANDLER(a2cffa_c800_r);
62// device type definition
63extern const device_type A2BUS_CFFA2;
64extern const device_type A2BUS_CFFA2_6502;
3765
38/* slot ext. ROM (C800) write function */
39WRITE8_DEVICE_HANDLER(a2cffa_c800_w);
66#endif /* __A2BUS_CFFA2__ */
4067
41/* slot ROM (CN00) read function */
42READ8_DEVICE_HANDLER(a2cffa_cnxx_r);
43
44/* slot ROM (CN00) write function */
45WRITE8_DEVICE_HANDLER(a2cffa_cnxx_w);
46
47#endif /* __A2SCSI__ */
48
src/mess/machine/apple2.c
r14831r14832
1010            - need to do double-read before write-enable RAM
1111
1212***************************************************************************/
13
13             
1414#include "emu.h"
1515#include "cpu/m6502/m6502.h"
1616#include "includes/apple2.h"
17#include "machine/ap2_slot.h"
17#include "machine/a2bus.h"
1818#include "machine/ay3600.h"
1919#include "machine/applefdc.h"
2020#include "devices/sonydriv.h"
r14831r14832
352352      };
353353      UINT8 result = 0x00;
354354      int slotnum;
355      device_t *slotdevice;
355      device_a2bus_card_interface *slotdevice;
356356
357357      offset &= 0xFF;
358358
r14831r14832
374374         slotnum = (offset - 0x80) / 0x10;
375375
376376         /* now identify the device */
377         slotdevice = apple2_slot(space->machine(), slotnum);
377         slotdevice = state->m_a2bus->get_a2bus_card(slotnum);
378378
379379         /* and if we can, read from the slot */
380380         if (slotdevice != NULL)
381            result = apple2_slot_r(slotdevice, offset % 0x10);
381            result = slotdevice->read_c0nx(*space, offset % 0x10);
382382      }
383383      return result;
384384   }
r14831r14832
403403      apple2_c07x_w
404404   };
405405   int slotnum;
406   device_t *slotdevice;
406   device_a2bus_card_interface *slotdevice;
407407
408408   offset &= 0xFF;
409409
r14831r14832
425425      slotnum = (offset - 0x80) / 0x10;
426426
427427      /* now identify the device */
428      slotdevice = apple2_slot(space->machine(), slotnum);
428        slotdevice = state->m_a2bus->get_a2bus_card(slotnum);
429429
430430      /* and if we can, write to the slot */
431431      if (slotdevice != NULL)
432         apple2_slot_w(slotdevice, offset % 0x10, data);
432         slotdevice->write_c0nx(*space, offset % 0x10, data);
433433   }
434434}
435435
r14831r14832
465465{
466466   apple2_state *state = space->machine().driver_data<apple2_state>();
467467   int slotnum;
468   device_t *slotdevice;
468   device_a2bus_card_interface *slotdevice;
469469
470470   slotnum = ((offset>>8) & 0xf) + 1;
471   slotdevice = apple2_slot(space->machine(), slotnum);
472
471    slotdevice = state->m_a2bus->get_a2bus_card(slotnum);
472                                 
473473   if (state->m_a2_cnxx_slot == -1)
474474   {
475475      state->m_a2_cnxx_slot = slotnum;
r14831r14832
478478
479479   if (slotdevice != NULL)
480480   {
481      return apple2_slot_ROM_r(slotdevice, offset&0xff);
481      return slotdevice->read_cnxx(*space, offset&0xff);
482482   }
483483   else
484484   {
r14831r14832
492492static WRITE8_HANDLER ( apple2_c1xx_w )
493493{
494494   int slotnum;
495   device_t *slotdevice;
495   apple2_state *state = space->machine().driver_data<apple2_state>();
496   device_a2bus_card_interface *slotdevice;
496497   UINT8 *rom, *slot_ram;
497498   UINT32 rom_length, slot_length;
498499
r14831r14832
504505
505506   slotnum = ((offset>>8) & 0xf) + 1;
506507
507   slotdevice = apple2_slot(space->machine(), slotnum);
508    slotdevice = state->m_a2bus->get_a2bus_card(slotnum);
508509
509510   if (slotdevice != NULL)
510511   {
511      apple2_slot_ROM_w(slotdevice, offset&0xff, data);
512      slotdevice->write_cnxx(*space, offset&0xff, data);
512513   }
513514   else
514515   {
r14831r14832
521522{
522523   apple2_state *state = space->machine().driver_data<apple2_state>();
523524   int slotnum;
524   device_t *slotdevice;
525   device_a2bus_card_interface *slotdevice;
525526
526527   slotnum = ((offset>>8) & 0xf) + 4;
527   slotdevice = apple2_slot(space->machine(), slotnum);
528    slotdevice = state->m_a2bus->get_a2bus_card(slotnum);
528529
529530   if (state->m_a2_cnxx_slot == -1)
530531   {
r14831r14832
535536   // is a card installed in this slot?
536537   if (slotdevice != NULL)
537538   {
538      return apple2_slot_ROM_r(slotdevice, offset&0xff);
539      return slotdevice->read_cnxx(*space, offset&0xff);
539540   }
540541   else
541542   {
r14831r14832
550551{
551552   apple2_state *state = space->machine().driver_data<apple2_state>();
552553   int slotnum;
553   device_t *slotdevice;
554   device_a2bus_card_interface *slotdevice;
554555   UINT8 *rom, *slot_ram;
555556   UINT32 rom_length, slot_length;
556557
r14831r14832
561562   slot_ram = (slot_length > 0) ? &rom[rom_length] : NULL;
562563
563564   slotnum = ((offset>>8) & 0xf) + 4;
564   slotdevice = apple2_slot(space->machine(), slotnum);
565    slotdevice = state->m_a2bus->get_a2bus_card(slotnum);
565566
566567   if (state->m_a2_cnxx_slot == -1)
567568   {
r14831r14832
571572
572573   if (slotdevice != NULL)
573574   {
574      apple2_slot_ROM_w(slotdevice, offset&0xff, data);
575      slotdevice->write_cnxx(*space, offset&0xff, data);
575576   }
576577   else
577578   {
r14831r14832
603604static READ8_HANDLER ( apple2_c800_r )
604605{
605606   apple2_state *state = space->machine().driver_data<apple2_state>();
606   device_t *slotdevice;
607   device_a2bus_card_interface *slotdevice;
607608
608   slotdevice = apple2_slot(space->machine(), state->m_a2_cnxx_slot);
609    slotdevice = state->m_a2bus->get_a2bus_card(state->m_a2_cnxx_slot);
609610
610611   if (slotdevice != NULL)
611612   {
612      return apple2_c800_slot_r(slotdevice, offset&0xfff);
613      return slotdevice->read_c800(*space, offset&0xfff);
613614   }
614615
615616   return apple2_getfloatingbusvalue(space->machine());
r14831r14832
618619static WRITE8_HANDLER ( apple2_c800_w )
619620{
620621   apple2_state *state = space->machine().driver_data<apple2_state>();
621   device_t *slotdevice;
622   device_a2bus_card_interface *slotdevice;
622623
623   slotdevice = apple2_slot(space->machine(), state->m_a2_cnxx_slot);
624    slotdevice = state->m_a2bus->get_a2bus_card(state->m_a2_cnxx_slot);
624625
625626   if (slotdevice != NULL)
626627   {
627      apple2_c800_slot_w(slotdevice, offset&0xfff, data);
628      slotdevice->write_c800(*space, offset&0xfff, data);
628629   }
629630}
630631
631632static READ8_HANDLER ( apple2_ce00_r )
632633{
633634   apple2_state *state = space->machine().driver_data<apple2_state>();
634   device_t *slotdevice;
635   device_a2bus_card_interface *slotdevice;
635636
636   slotdevice = apple2_slot(space->machine(), state->m_a2_cnxx_slot);
637    slotdevice = state->m_a2bus->get_a2bus_card(state->m_a2_cnxx_slot);
637638
638639   if (slotdevice != NULL)
639640   {
640      return apple2_c800_slot_r(slotdevice, (offset&0xfff) + 0x600);
641      return slotdevice->read_c800(*space, (offset&0xfff) + 0x600);
641642   }
642643
643644   return apple2_getfloatingbusvalue(space->machine());
r14831r14832
646647static WRITE8_HANDLER ( apple2_ce00_w )
647648{
648649   apple2_state *state = space->machine().driver_data<apple2_state>();
649   device_t *slotdevice;
650   device_a2bus_card_interface *slotdevice;
650651
651   slotdevice = apple2_slot(space->machine(), state->m_a2_cnxx_slot);
652    slotdevice = state->m_a2bus->get_a2bus_card(state->m_a2_cnxx_slot);
652653
653654   if (slotdevice != NULL)
654655   {
655      apple2_c800_slot_w(slotdevice, (offset&0xfff)+0x600, data);
656        slotdevice->write_c800(*space, (offset&0xfff)+0x600, data);
656657   }
657658}
658659
r14831r14832
14531454
14541455static int apple2_fdc_has_35(running_machine &machine)
14551456{
1456   return (floppy_get_count(machine) - apple525_get_count(machine)) > 0;
1457   return (floppy_get_count(machine)); // - apple525_get_count(machine)) > 0;
14571458}
14581459
14591460static int apple2_fdc_has_525(running_machine &machine)
14601461{
1461   return apple525_get_count(machine) > 0;
1462   return 1; //apple525_get_count(machine) > 0;
14621463}
14631464
14641465static void apple2_fdc_set_lines(device_t *device, UINT8 lines)
src/mess/includes/apple2gs.h
r14831r14832
4848   apple2gs_state(const machine_config &mconfig, device_type type, const char *tag)
4949      : apple2_state(mconfig, type, tag),
5050      m_maincpu(*this, "maincpu"),
51        m_es5503(*this, "es5503")
51        m_es5503(*this, "es5503"),
52        m_fdc(*this, "fdc")
5253        { }
5354
5455   required_device<cpu_device> m_maincpu;
5556   required_device<es5503_device> m_es5503;
57    required_device<device_t> m_fdc;
5658
5759   UINT8 *m_slowmem;
5860   UINT8 m_newvideo;
src/mess/includes/apple2.h
r14831r14832
99#ifndef APPLE2_H_
1010#define APPLE2_H_
1111
12#include "machine/a2bus.h"
1213#include "machine/applefdc.h"
1314
1415
r14831r14832
108109{
109110public:
110111   apple2_state(const machine_config &mconfig, device_type type, const char *tag)
111      : driver_device(mconfig, type, tag) { }
112      : driver_device(mconfig, type, tag),
113        m_maincpu(*this, "maincpu"),
114        m_a2bus(*this, "a2bus")
115    { }
112116
117   required_device<cpu_device> m_maincpu;
118    required_device<a2bus_device> m_a2bus;
119
113120   UINT32 m_flags;
114121   INT32 m_a2_cnxx_slot;
115122   UINT32 m_a2_mask;
src/mess/drivers/apple2gs.c
r14831r14832
5353#include "devices/sonydriv.h"
5454#include "devices/appldriv.h"
5555#include "sound/es5503.h"
56#include "machine/ap2_slot.h"
57#include "machine/ap2_lang.h"
5856#include "machine/applefdc.h"
5957#include "machine/8530scc.h"
6058#include "sound/speaker.h"
6159#include "machine/ram.h"
6260
61#include "machine/a2bus.h"
62#include "machine/a2lang.h"
63#include "machine/a2diskii.h"
64#include "machine/a2mockingboard.h"
65#include "machine/a2cffa.h"
66
6367static const gfx_layout apple2gs_text_layout =
6468{
6569   14,8,      /* 14*8 characters */
r14831r14832
174178   /* nothing in the address map - everything is added dynamically */
175179ADDRESS_MAP_END
176180
181static const struct a2bus_interface a2bus_intf =
182{
183   // interrupt lines
184//   DEVCB_HANDLER(a2bus_irq_w),
185//   DEVCB_HANDLER(a2bus_nmi_w)
186    DEVCB_NULL,
187    DEVCB_NULL
188};
189
177190static MACHINE_CONFIG_START( apple2gs, apple2gs_state )
178191   /* basic machine hardware */
179192   MCFG_CPU_ADD("maincpu", G65816, APPLE2GS_14M/5)
r14831r14832
208221   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
209222
210223   /* slot devices */
211   MCFG_APPLE2_LANGCARD_ADD("langcard")
212   MCFG_IWM_ADD("fdc", apple2_fdc_interface)
224    MCFG_A2BUS_BUS_ADD("a2bus", "maincpu", a2bus_intf)
225    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL)
213226
227    MCFG_IWM_ADD("fdc", apple2_fdc_interface)
228
214229   /* slots */
215   MCFG_APPLE2_SLOT_ADD(0, "langcard", apple2_langcard_r, apple2_langcard_w, 0, 0, 0, 0)
216   MCFG_APPLE2_SLOT_ADD(6, "fdc", applefdc_r, applefdc_w, 0, 0, 0, 0)
230//   MCFG_APPLE2_SLOT_ADD(6, "fdc", applefdc_r, applefdc_w, 0, 0, 0, 0)
217231
218232   /* SCC */
219233   MCFG_SCC8530_ADD("scc", APPLE2GS_14M/2, line_cb_t())
src/mess/drivers/apple2.c
r14831r14832
33Apple II
44
55This family of computers bank-switches everything up the wazoo.
6
6
77Remarkable features
88-------------------
99
r14831r14832
185185#include "emu.h"
186186#include "cpu/m6502/m6502.h"
187187#include "cpu/z80/z80.h"
188#include "devices/appldriv.h"
189188#include "imagedev/flopdrv.h"
190189#include "imagedev/cassette.h"
191190#include "formats/ap2_dsk.h"
192191#include "includes/apple2.h"
193192#include "machine/ay3600.h"
194#include "machine/ap2_slot.h"
195#include "machine/ap2_lang.h"
196#include "machine/applefdc.h"
197193#include "sound/speaker.h"
198194#include "machine/ram.h"
195
196#include "machine/a2bus.h"
197#include "machine/a2lang.h"
198#include "machine/a2diskii.h"
199#include "machine/a2mockingboard.h"
199200#include "machine/a2cffa.h"
200#include "machine/idectrl.h"
201#include "imagedev/harddriv.h"
202201
203
204202/***************************************************************************
205203    PARAMETERS
206204***************************************************************************/
r14831r14832
212210#define PADDLE_SENSITIVITY      10
213211#define PADDLE_AUTOCENTER       0
214212
213WRITE8_DEVICE_HANDLER(a2bus_irq_w)
214{
215    apple2_state *a2 = device->machine().driver_data<apple2_state>();
215216
217    device_set_input_line(a2->m_maincpu, M6502_IRQ_LINE, data);
218}
216219
220WRITE8_DEVICE_HANDLER(a2bus_nmi_w)
221{
222    apple2_state *a2 = device->machine().driver_data<apple2_state>();
223
224    device_set_input_line(a2->m_maincpu, INPUT_LINE_NMI, data);
225}
226
217227/***************************************************************************
218228    ADDRESS MAP
219229***************************************************************************/
r14831r14832
554564   palette_set_colors(machine, 0, apple2_palette, ARRAY_LENGTH(apple2_palette));
555565}
556566
557static const floppy_interface apple2_floppy_interface =
558{
559   DEVCB_NULL,
560   DEVCB_NULL,
561   DEVCB_NULL,
562   DEVCB_NULL,
563   DEVCB_NULL,
564   FLOPPY_STANDARD_5_25_DSHD,
565   LEGACY_FLOPPY_OPTIONS_NAME(apple2),
566   "floppy_5_25",
567   NULL
568};
569
570567static const cassette_interface apple2_cassette_interface =
571568{
572569   cassette_default_formats,
r14831r14832
576573   NULL
577574};
578575
576static const struct a2bus_interface a2bus_intf =
577{
578   // interrupt lines
579   DEVCB_HANDLER(a2bus_irq_w),
580   DEVCB_HANDLER(a2bus_nmi_w)
581};
582
583static SLOT_INTERFACE_START(apple2_slot0_cards)
584    SLOT_INTERFACE("lang", A2BUS_LANG)      /* Apple II Language Card */
585SLOT_INTERFACE_END
586
587static SLOT_INTERFACE_START(apple2_cards)
588    SLOT_INTERFACE("diskii", A2BUS_DISKII)  /* Disk II Controller Card */
589    SLOT_INTERFACE("mockingboard", A2BUS_MOCKINGBOARD)  /* Sweet Micro Systems Mockingboard */
590    SLOT_INTERFACE("cffa2", A2BUS_CFFA2)  /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 65C02/65816 firmware */
591    SLOT_INTERFACE("cffa202", A2BUS_CFFA2_6502)  /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */
592SLOT_INTERFACE_END
593
579594static MACHINE_CONFIG_START( apple2_common, apple2_state )
580595   /* basic machine hardware */
581596   MCFG_CPU_ADD("maincpu", M6502, 1021800)      /* close to actual CPU frequency of 1.020484 MHz */
r14831r14832
603618   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
604619
605620   /* slot devices */
606   MCFG_APPLE2_LANGCARD_ADD("langcard")
607   MCFG_APPLEFDC_ADD("fdc", apple2_fdc_interface)
621    MCFG_A2BUS_BUS_ADD("a2bus", "maincpu", a2bus_intf)
622    MCFG_A2BUS_SLOT_ADD("a2bus", "sl0", apple2_slot0_cards, "lang", NULL)
623    MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple2_cards, NULL, NULL)
624    MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, NULL, NULL)
625    MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple2_cards, NULL, NULL)
626    MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple2_cards, "mockingboard", NULL)
627    MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, NULL, NULL)
628    MCFG_A2BUS_SLOT_ADD("a2bus", "sl6", apple2_cards, "diskii", NULL)
629    MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, NULL, NULL)
608630
609   /* slots */
610   MCFG_APPLE2_SLOT_ADD(0, "langcard", apple2_langcard_r, apple2_langcard_w, 0, 0, 0, 0)
611   MCFG_APPLE2_SLOT_ADD(6, "fdc", applefdc_r, applefdc_w, 0, 0, 0, 0)
612
613   MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(apple2_floppy_interface,15,16)
614
615631   MCFG_SOFTWARE_LIST_ADD("flop525_list","apple2")
616632MACHINE_CONFIG_END
617633
r14831r14832
651667ROM_END
652668
653669static MACHINE_CONFIG_DERIVED( apple2e, apple2_common )
654   MCFG_VIDEO_START(apple2e)
670    MCFG_VIDEO_START(apple2e)
655671   /* internal ram */
656672   MCFG_RAM_ADD(RAM_TAG)
657673   MCFG_RAM_DEFAULT_SIZE("128K")
658674   MCFG_RAM_EXTRA_OPTIONS("64K")
659675   MCFG_RAM_DEFAULT_VALUE(0x00)
660676   MCFG_CASSETTE_ADD( CASSETTE_TAG, apple2_cassette_interface )
661MACHINE_CONFIG_END
662#if 0
663MACHINE_CONFIG_DERIVED( apple2e_z80, apple2_common )
664   MCFG_VIDEO_START(apple2e)
665677
666   MCFG_CPU_ADD("softcard", Z80, 1021800*2)   // softcard Z80 runs at twice the 6502 clock
667   MCFG_CPU_PROGRAM_MAP(a2z80_map)
668
669   MCFG_A2Z80_ADD("a2z80")
670   MCFG_APPLE2_SLOT_ADD(7, "a2z80", 0, 0, 0, 0, 0, a2z80_cnxx_w)
671
672   MCFG_QUANTUM_PERFECT_CPU("maincpu")
673
674   /* internal ram */
675   MCFG_RAM_ADD(RAM_TAG)
676   MCFG_RAM_DEFAULT_SIZE("128K")
677   MCFG_RAM_EXTRA_OPTIONS("64K")
678   MCFG_RAM_DEFAULT_VALUE(0x00)
678    // IIe and later have no physical slot 0, the "language card" is built into the motherboard
679    MCFG_A2BUS_SLOT_REMOVE("sl0")
680    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL)
679681MACHINE_CONFIG_END
680#endif
682
681683static MACHINE_CONFIG_DERIVED( mprof3, apple2e )
682684
683685   /* internal ram */
r14831r14832
687689
688690static MACHINE_CONFIG_DERIVED( apple2ee, apple2e )
689691   MCFG_CPU_REPLACE("maincpu", M65C02, 1021800)      /* close to actual CPU frequency of 1.020484 MHz */
690
691   /* CFFA stuff */
692   MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", NULL)
693   MCFG_A2CFFA_ADD("cffa")
694   MCFG_APPLE2_SLOT_ADD(7, "cffa", a2cffa_r, a2cffa_w, a2cffa_c800_r, a2cffa_c800_w, a2cffa_cnxx_r, a2cffa_cnxx_w)
695692MACHINE_CONFIG_END
696693
697694static MACHINE_CONFIG_DERIVED( apple2ep, apple2e )
r14831r14832
699696MACHINE_CONFIG_END
700697
701698static MACHINE_CONFIG_DERIVED( apple2c, apple2ee )
699    MCFG_A2BUS_SLOT_REMOVE("sl1")   // IIc has no slots, of course :)
700    MCFG_A2BUS_SLOT_REMOVE("sl2")
701    MCFG_A2BUS_SLOT_REMOVE("sl3")
702    MCFG_A2BUS_SLOT_REMOVE("sl4")
703    MCFG_A2BUS_SLOT_REMOVE("sl5")
704    MCFG_A2BUS_SLOT_REMOVE("sl6")
705    MCFG_A2BUS_SLOT_REMOVE("sl7")
706
707    // TODO: populate the IIc's other virtual slots with ONBOARD_ADD
708    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_DISKII, NULL)
702709MACHINE_CONFIG_END
703710
704711static MACHINE_CONFIG_DERIVED( apple2c_iwm, apple2c )
705712
706   /* replace the old-style FDC with an IWM */
707   MCFG_DEVICE_REMOVE("fdc")
708   MCFG_IWM_ADD("fdc", apple2_fdc_interface)
713    MCFG_A2BUS_SLOT_REMOVE("sl6")
714    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
709715MACHINE_CONFIG_END
710716
711717
r14831r14832
729735   ROM_LOAD ( "341-0002-00.e8", 0x2800, 0x0800, CRC(a99c2cf6) SHA1(9767d92d04fc65c626223f25564cca31f5248980)) /* Needs verification. From eBay: Label: S7916E // C48078 // 3410002-00 // (C)APPLE78 E8 */
730736   ROM_LOAD ( "341-0003-00.f0", 0x3000, 0x0800, CRC(62230d38) SHA1(f268022da555e4c809ca1ae9e5d2f00b388ff61c)) /* Needs verification. From eBay: Label: S7908E // C48709 // 3410003 // CAPPLE78 F0 */
731737   ROM_LOAD ( "341-0004-00.f8", 0x3800, 0x0800, CRC(020a86d0) SHA1(52a18bd578a4694420009cad7a7a5779a8c00226))
732   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* 341-0027-a: 16-sector disk drive (older version), PROM P5 */
733738   /* For the following bits, I'm not sure how to do this properly, since the P5 and P6 roms came in pairs and are in different address spaces...
734739    Also the 3.5" 400k? disk control rom, 341-0438-a should probably be here as well, assuming it could be used with an apple2/2+/2e */
735740   //ROMX_LOAD ( "341-0009.p5", 0x4500, 0x0100, CRC(d34eb2ff) SHA1(afd060e6f35faf3bb0146fa889fc787adf56330a), ROM_BIOS(1)) /* 341-0009: 13-sector disk drive, PROM P5 */
r14831r14832
753758   ROM_LOAD ( "341-0014.e8", 0x2800, 0x0800, CRC(5719871a) SHA1(37501be96d36d041667c15d63e0c1eff2f7dd4e9))
754759   ROM_LOAD ( "341-0015.f0", 0x3000, 0x0800, CRC(9a04eecf) SHA1(e6bf91ed28464f42b807f798fc6422e5948bf581))
755760   ROM_LOAD ( "341-0020-00.f8", 0x3800, 0x0800, CRC(079589c4) SHA1(a28852ff997b4790e53d8d0352112c4b1a395098)) /* 341-0020-00: Autostart Monitor/Applesoft Basic $f800; Was sometimes mounted on Language card; Label(from Apple Language Card - Front.jpg): S 8115 // C68018 // 341-0020-00 */
756   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* 341-0027-a "P5A" State machine PROM (Disk II ROM - DOS 3.3 version?) */
757761ROM_END
758762
759763ROM_START(prav82)
r14831r14832
767771   ROM_LOAD ( "pravetz82.e8", 0x2800, 0x0800, CRC(5719871a) SHA1(37501be96d36d041667c15d63e0c1eff2f7dd4e9))
768772   ROM_LOAD ( "pravetz82.f0", 0x3000, 0x0800, CRC(e26d9d35) SHA1(ce6e42e6c9a6c98e92522af7a6090cd04c56c778))
769773   ROM_LOAD ( "pravetz82.f8", 0x3800, 0x0800, CRC(57547818) SHA1(db30bedec98305e31a14acb9e2a92be1c4853807))
770   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* 341-0027-a "P5A" State machine PROM (Disk II ROM - DOS 3.3 version?) */
771774ROM_END
772775
773776ROM_START(prav8m)
r14831r14832
780783   ROM_LOAD ( "pravetz8m.e8", 0x2800, 0x0800, CRC(5719871a) SHA1(37501be96d36d041667c15d63e0c1eff2f7dd4e9))
781784   ROM_LOAD ( "pravetz8m.f0", 0x3000, 0x0800, CRC(e26d9d35) SHA1(ce6e42e6c9a6c98e92522af7a6090cd04c56c778))
782785   ROM_LOAD ( "pravetz8m.f8", 0x3800, 0x0800, CRC(5bab0a46) SHA1(f6c0817ce37d2e2c43f482c339acaede0a73359b))
783   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* 341-0027-a "P5A" State machine PROM (Disk II ROM - DOS 3.3 version?) */
784786ROM_END
785787
786788ROM_START( agat7 )
r14831r14832
822824   ROM_LOAD ( "a2p.e8", 0x2800, 0x0800, BAD_DUMP CRC(5719871a) SHA1(37501be96d36d041667c15d63e0c1eff2f7dd4e9)) // not confirmed as the actual rom on motherboard
823825   ROM_LOAD ( "a2p.f0", 0x3000, 0x0800, BAD_DUMP CRC(9a04eecf) SHA1(e6bf91ed28464f42b807f798fc6422e5948bf581)) // not confirmed as the actual rom on motherboard
824826   ROM_LOAD ( "a2jp.f8", 0x3800, 0x0800, CRC(6ea8379b) SHA1(00a75ae3b58e1917ad640249366f654608589cf4))
825   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
826827ROM_END
827828
828829ROM_START(ace100)
r14831r14832
831832
832833   ROM_REGION(0x4700,"maincpu",0)
833834   ROM_LOAD ( "ace100.rom", 0x1000, 0x3000, CRC(9d5ec94f) SHA1(8f2b3f2561788bebc7a805f620ec9e7ade973460))
834   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
835835ROM_END
836836
837837ROM_START(apple2e)
r14831r14832
842842   ROM_REGION(0x4700,"maincpu",0)
843843   ROM_LOAD ( "342-0135-b.64", 0x0000, 0x2000, CRC(e248835e) SHA1(523838c19c79f481fa02df56856da1ec3816d16e))
844844   ROM_LOAD ( "342-0134-a.64", 0x2000, 0x2000, CRC(fc3d59d8) SHA1(8895a4b703f2184b673078f411f4089889b61c54))
845   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
846845
847846   ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
848847//  ROM_LOAD_OPTIONAL( "341-0132-a.e12", 0x000, 0x800, CRC(7ded1ac6) SHA1(69f45cd487e8210e37c839df78a0b8930a3a6ac1) ) // 1982 US-DE
r14831r14832
860859   ROM_REGION(0x4700,"maincpu",0)
861860   ROM_LOAD ( "342-0135-b.64", 0x0000, 0x2000, CRC(e248835e) SHA1(523838c19c79f481fa02df56856da1ec3816d16e))
862861   ROM_LOAD ( "342-0134-a.64", 0x2000, 0x2000, CRC(fc3d59d8) SHA1(8895a4b703f2184b673078f411f4089889b61c54))
863   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
864862ROM_END
865863
866864ROM_START(mprof3)
r14831r14832
872870   ROM_LOAD ( "mpf3-cd.rom", 0x0000, 0x2000, CRC(5b662e06) SHA1(aa0db775ca78986480829fcc10f00e57629e1a7c))
873871   ROM_LOAD ( "mpf3-ef.rom", 0x2000, 0x2000, CRC(2c5e8b92) SHA1(befeb03e04b7c3ef36ef5829948a53880df85e92))
874872
875   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
876873ROM_END
877874
878875ROM_START(apple2ee)
r14831r14832
883880   ROM_REGION(0x4700,"maincpu",0)
884881   ROM_LOAD ( "342-0304-a.e10", 0x0000, 0x2000, CRC(443aa7c4) SHA1(3aecc56a26134df51e65e17f33ae80c1f1ac93e6)) /* PCB: "CD ROM // 342-0304", 2364 mask rom */
885882   ROM_LOAD ( "342-0303-a.e8", 0x2000, 0x2000, CRC(95e10034) SHA1(afb09bb96038232dc757d40c0605623cae38088e)) /* PCB: "EF ROM // 342-0303", 2364 mask rom */
886   ROM_LOAD ( "341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
887883
888   ROM_REGION(0x1000, "cffa", 0)
889    ROM_LOAD( "cffa20eec02.bin", 0x000000, 0x001000, CRC(fb3726f8) SHA1(080ff88f19de22328e162954ee2b51ee65f9d5cd) )
890
891884   ROM_REGION( 0x800, "keyboard", 0 )
892885   ROM_LOAD( "341-0132-d.e12", 0x000, 0x800, CRC(c506efb9) SHA1(8e14e85c645187504ec9d162b3ea614a0c421d32) )
893886ROM_END
r14831r14832
899892
900893   ROM_REGION(0x4700,"maincpu",0)
901894   ROM_LOAD ("32-0349-b.128", 0x0000, 0x4000, CRC(1d70b193) SHA1(b8ea90abe135a0031065e01697c4a3a20d51198b)) /* should rom name be 342-0349-b? */
902   ROM_LOAD ("341-0027-a.p5", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
903895ROM_END
904896
905897ROM_START(apple2c)
r14831r14832
984976   ROM_LOAD ( "ultra1.002", 0x1000, 0x1000, CRC(392170ff) SHA1(f065104ab5a476321d56d802f1a174afabff9dbd))
985977   ROM_LOAD ( "ultra1.001", 0x2000, 0x1000, CRC(671b8c2e) SHA1(c1e4b1477620c9292f2c2b25df55965eef445dee))
986978   ROM_LOAD ( "ultra2.bin", 0x3000, 0x1000, CRC(1ac1e17e) SHA1(a5b8adec37da91970c303905b5e2c4d1b715ee4e))
987   ROM_LOAD ( "341-0027-a.rom", 0x4500, 0x0100, CRC(ce7144f6) SHA1(d4181c9f046aafc3fb326b381baac809d9e38d16)) /* Disk II ROM - DOS 3.3 version */
988979ROM_END
989980
990981/*    YEAR  NAME      PARENT    COMPAT    MACHINE      INPUT     INIT      COMPANY            FULLNAME */
r14831r14832
995986COMP( 1980, apple2jp, apple2,   0,        apple2p,      apple2p,  0,        "Apple Computer",    "Apple ][j+", GAME_SUPPORTS_SAVE )
996987COMP( 1982, ace100,   apple2,   0,        apple2,      apple2e,  0,        "Franklin Computer", "Franklin Ace 100", GAME_SUPPORTS_SAVE )
997988COMP( 1983, apple2e,  0,        apple2,     apple2e,      apple2e,  0,        "Apple Computer",    "Apple //e", GAME_SUPPORTS_SAVE )
998//COMP( 1983, apple2ez, apple2e,  0,      apple2e_z80,     apple2e,  0,        "Apple Computer",    "Apple //e (with Z80 SoftCard)", GAME_SUPPORTS_SAVE )
999989COMP( 1983, mprof3,   apple2e,  0,        mprof3,      apple2e,  0,        "Multitech",         "Microprofessor III", GAME_SUPPORTS_SAVE )
1000990COMP( 1985, apple2ee, apple2e,  0,        apple2ee,      apple2e,  0,        "Apple Computer",    "Apple //e (enhanced)", GAME_SUPPORTS_SAVE )
1001991COMP( 1987, apple2ep, apple2e,  0,        apple2ep,      apple2ep, 0,        "Apple Computer",    "Apple //e (Platinum)", GAME_SUPPORTS_SAVE )
src/mess/mess.mak
r14831r14832
642642   $(MESS_MACHINE)/ay3600.o   \
643643    $(MESS_MACHINE)/a2bus.o     \
644644   $(MESS_MACHINE)/ap2_slot.o   \
645   $(MESS_MACHINE)/ap2_lang.o   \
645   $(MESS_MACHINE)/a2lang.o   \
646   $(MESS_MACHINE)/a2diskii.o   \
647   $(MESS_MACHINE)/a2mockingboard.o   \
646648   $(MESS_MACHINE)/a2cffa.o   \
647649   $(MESS_MACHINE)/lisa.o      \
648650   $(MESS_DRIVERS)/lisa.o      \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team