Previous 199869 Revisions Next

r21169 Monday 18th February, 2013 at 21:11:17 UTC by R. Belmont
(MESS) Apple II: Added support for Street Electronics Echo Plus and Zip Technologies ZipDrive cards [R. Belmont, Lord Nightmare]
[src/mess]mess.mak
[src/mess/drivers]apple2.c apple2gs.c
[src/mess/machine]a2mockingboard.c a2mockingboard.h a2zipdrive.c* a2zipdrive.h*

trunk/src/mess/machine/a2mockingboard.c
r21168r21169
33    a2mockingboard.c
44
55    Implementation of the Sweet Micro Systems Mockingboard card
6    and friends.
67
78*********************************************************************/
89
r21168r21169
2021#define AY2_TAG "mockbd_ay2"
2122#define AY3_TAG "mockbd_ay3"
2223#define AY4_TAG "mockbd_ay4"
24#define E2P_TMS_TAG "tms5220"
2325
2426//**************************************************************************
2527//  GLOBAL VARIABLES
r21168r21169
2729
2830const device_type A2BUS_MOCKINGBOARD = &device_creator<a2bus_mockingboard_device>;
2931const device_type A2BUS_PHASOR = &device_creator<a2bus_phasor_device>;
32const device_type A2BUS_ECHOPLUS = &device_creator<a2bus_echoplus_device>;
3033
3134static const ay8910_interface mockingboard_ay8910_interface =
3235{
r21168r21169
9093   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker2", 1.0)
9194MACHINE_CONFIG_END
9295
96MACHINE_CONFIG_FRAGMENT( echoplus )
97   MCFG_VIA6522_ADD(VIA1_TAG, 1022727, mockingboard_via1_intf)
98   MCFG_VIA6522_ADD(VIA2_TAG, 1022727, mockingboard_via2_intf)
99
100   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
101   MCFG_SOUND_ADD(AY1_TAG, AY8913, 1022727)
102   MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
103   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
104   MCFG_SOUND_ADD(AY2_TAG, AY8913, 1022727)
105   MCFG_SOUND_CONFIG(mockingboard_ay8910_interface)
106   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
107
108   MCFG_SPEAKER_STANDARD_MONO("echosp")
109   MCFG_SOUND_ADD(E2P_TMS_TAG, TMS5220, 720000)
110   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "echosp", 1.0)
111MACHINE_CONFIG_END
112
93113//-------------------------------------------------
94114//  machine_config_additions - device-specific
95115//  machine configurations
r21168r21169
105125   return MACHINE_CONFIG_NAME( phasor );
106126}
107127
128machine_config_constructor a2bus_echoplus_device::device_mconfig_additions() const
129{
130   return MACHINE_CONFIG_NAME( echoplus );
131}
132
108133//**************************************************************************
109134//  LIVE DEVICE
110135//**************************************************************************
r21168r21169
137162   m_PhasorNative = false;
138163}
139164
165a2bus_echoplus_device::a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
166   a2bus_ayboard_device(mconfig, A2BUS_ECHOPLUS, "Street Electronics Echo Plus", tag, owner, clock),
167   m_tms(*this, E2P_TMS_TAG)
168{
169   m_shortname = "a2echop";
170   m_isPhasor = false;
171   m_PhasorNative = false;
172}
173
140174//-------------------------------------------------
141175//  device_start - device-specific startup
142176//-------------------------------------------------
r21168r21169
156190}
157191
158192/*-------------------------------------------------
159    read_cnxx - called for reads from this card's c0nx space
193    read_cnxx - called for reads from this card's cnxx space
160194-------------------------------------------------*/
161195
162196UINT8 a2bus_ayboard_device::read_cnxx(address_space &space, UINT8 offset)
r21168r21169
508542      m_PhasorNative = (offset & 1) ? true : false;
509543   }
510544}
545
546UINT8 a2bus_echoplus_device::read_c0nx(address_space &space, UINT8 offset)
547{
548   switch (offset)
549   {
550      case 0:
551         return 0x1f | tms5220_status_r(m_tms, space, 0);
552   }
553
554   return 0;
555}
556
557void a2bus_echoplus_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
558{
559   switch (offset)
560   {
561      case 0:
562         tms5220_data_w(m_tms, space, offset, data);
563         break;
564   }
565}
566
trunk/src/mess/machine/a2mockingboard.h
r21168r21169
1313#include "machine/a2bus.h"
1414#include "machine/6522via.h"
1515#include "sound/ay8910.h"
16#include "sound/tms5220.h"
1617
1718//**************************************************************************
1819//  TYPE DEFINITIONS
r21168r21169
7778   virtual machine_config_constructor device_mconfig_additions() const;
7879};
7980
81class a2bus_echoplus_device : public a2bus_ayboard_device
82{
83public:
84   a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
85
86   virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
87   virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
88
89   required_device<tms5220_device> m_tms;
90
91   virtual machine_config_constructor device_mconfig_additions() const;
92};
93
8094// device type definition
8195extern const device_type A2BUS_MOCKINGBOARD;
8296extern const device_type A2BUS_PHASOR;
97extern const device_type A2BUS_ECHOPLUS;
8398
8499#endif  /* __A2BUS_MOCKINGBOARD__ */
trunk/src/mess/machine/a2zipdrive.c
r0r21169
1/*********************************************************************
2 
3   a2zipdrive.c
4
5    ZIP Technologies ZipDrive IDE card
6 
7    NOTE: No known dump exists of the formatter utility and the
8    format of the custom partition record (block 0) that the card
9    expects has not yet been determined, so this is largely untested
10    and will work only with a drive dump from real h/w.
11 
12    PLEASE use it only on a backup copy of said dump and contact MESSdev
13    if you have one!
14 
15    Partition block format:
16    +0000: ASCII "Zip Technologies"
17 
18*********************************************************************/
19
20#include "a2zipdrive.h"
21#include "includes/apple2.h"
22#include "machine/idectrl.h"
23#include "imagedev/harddriv.h"
24
25//**************************************************************************
26//  GLOBAL VARIABLES
27//**************************************************************************
28
29const device_type A2BUS_ZIPDRIVE = &device_creator<a2bus_zipdrive_device>;
30
31#define ZIPDRIVE_ROM_REGION  "zipdrive_rom"
32#define ZIPDRIVE_IDE_TAG     "zipdrive_ide"
33
34static MACHINE_CONFIG_FRAGMENT( zipdrive )
35   MCFG_IDE_CONTROLLER_ADD(ZIPDRIVE_IDE_TAG, ide_image_devices, "hdd", "hdd", false)
36MACHINE_CONFIG_END
37
38ROM_START( zipdrive )
39   ROM_REGION(0x2000, ZIPDRIVE_ROM_REGION, 0)
40   ROM_LOAD( "zip drive - rom.bin", 0x000000, 0x002000, CRC(fd800a40) SHA1(46636bfed88c864139e3d2826661908a8c07c459) )
41ROM_END
42
43/***************************************************************************
44    FUNCTION PROTOTYPES
45***************************************************************************/
46
47//-------------------------------------------------
48//  machine_config_additions - device-specific
49//  machine configurations
50//-------------------------------------------------
51
52machine_config_constructor a2bus_zipdrivebase_device::device_mconfig_additions() const
53{
54   return MACHINE_CONFIG_NAME( zipdrive );
55}
56
57//-------------------------------------------------
58//  rom_region - device-specific ROM region
59//-------------------------------------------------
60
61const rom_entry *a2bus_zipdrivebase_device::device_rom_region() const
62{
63   return ROM_NAME( zipdrive );
64}
65
66//**************************************************************************
67//  LIVE DEVICE
68//**************************************************************************
69
70a2bus_zipdrivebase_device::a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
71   device_t(mconfig, type, name, tag, owner, clock),
72   device_a2bus_card_interface(mconfig, *this),
73   m_ide(*this, ZIPDRIVE_IDE_TAG)
74{
75}
76
77a2bus_zipdrive_device::a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
78   a2bus_zipdrivebase_device(mconfig, A2BUS_ZIPDRIVE, "Zip Technologies ZipDrive", tag, owner, clock)
79{
80   m_shortname = "a2zipdrv";
81}
82
83//-------------------------------------------------
84//  device_start - device-specific startup
85//-------------------------------------------------
86
87void a2bus_zipdrivebase_device::device_start()
88{
89   // set_a2bus_device makes m_slot valid
90   set_a2bus_device();
91
92   astring tempstring;
93   m_rom = device().machine().root_device().memregion(this->subtag(tempstring, ZIPDRIVE_ROM_REGION))->base();
94
95   save_item(NAME(m_lastdata));
96}
97
98void a2bus_zipdrivebase_device::device_reset()
99{
100   popmessage("Zip Drive partition format unknown, contact MESSdev if you have the software or a drive dump!");
101}
102
103
104/*-------------------------------------------------
105    read_c0nx - called for reads from this card's c0nx space
106-------------------------------------------------*/
107
108UINT8 a2bus_zipdrivebase_device::read_c0nx(address_space &space, UINT8 offset)
109{
110   switch (offset)
111   {
112      case 0:
113      case 1:
114      case 2:
115      case 3:
116      case 4:
117      case 5:
118      case 6:
119      case 7:
120         return ide_controller_r(m_ide, 0x1f0+offset, 1);
121
122      case 8:   // data port
123         m_lastdata = ide_controller_r(m_ide, 0x1f0, 2);
124//         printf("%04x @ IDE data\n", m_lastdata);
125         return m_lastdata&0xff;
126
127      case 9:
128         return (m_lastdata>>8) & 0xff;
129
130      default:
131         logerror("a2zipdrive: unhandled read @ C0n%x\n", offset);
132         break;
133   }
134
135   return 0xff;
136}
137
138
139/*-------------------------------------------------
140    write_c0nx - called for writes to this card's c0nx space
141-------------------------------------------------*/
142
143void a2bus_zipdrivebase_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
144{
145   switch (offset)
146   {
147      case 0:   
148      case 1:
149      case 2:
150      case 3:
151      case 4:
152      case 5:
153      case 6:
154      case 7:
155//         printf("%02x to IDE controller @ %x\n", data, offset);
156         ide_controller_w(m_ide, 0x1f0+offset, 1, data);
157         break;
158
159      case 8:
160//         printf("%02x to IDE data lo\n", data);
161         m_lastdata = data;
162         break;
163
164      case 9:
165//         printf("%02x to IDE data hi\n", data);
166         m_lastdata &= 0x00ff;
167         m_lastdata |= (data << 8);
168         ide_controller_w(m_ide, 0x1f0, 2, m_lastdata);
169         break;
170
171      default:
172         logerror("a2zipdrive: write %02x @ unhandled C0n%x\n", data, offset);
173         break;
174   }
175}
176
177/*-------------------------------------------------
178    read_cnxx - called for reads from this card's cnxx space
179-------------------------------------------------*/
180
181UINT8 a2bus_zipdrivebase_device::read_cnxx(address_space &space, UINT8 offset)
182{
183   int slotimg = m_slot * 0x100;
184
185   // ROM contains CnXX images for each of slots 1-7 at 0x0 and 0x1000
186   return m_rom[offset+slotimg+0x1000];
187}
188
189/*-------------------------------------------------
190    read_c800 - called for reads from this card's c800 space
191-------------------------------------------------*/
192
193UINT8 a2bus_zipdrivebase_device::read_c800(address_space &space, UINT16 offset)
194{
195   offset &= 0x7ff;
196
197   return m_rom[offset+0x1800];
198}
199
Property changes on: trunk/src/mess/machine/a2zipdrive.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/a2zipdrive.h
r0r21169
1/*********************************************************************
2
3    a2zipdrive.h
4
5    ZIP Technologies ZipDrive IDE card
6 
7    See important NOTE at the top of a2zipdrive.c!
8 
9*********************************************************************/
10
11#ifndef __A2BUS_ZIPDRIVE__
12#define __A2BUS_ZIPDRIVE__
13
14#include "emu.h"
15#include "machine/a2bus.h"
16#include "machine/idectrl.h"
17
18//**************************************************************************
19//  TYPE DEFINITIONS
20//**************************************************************************
21
22class a2bus_zipdrivebase_device:
23   public device_t,
24   public device_a2bus_card_interface
25{
26public:
27   // construction/destruction
28   a2bus_zipdrivebase_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   virtual const rom_entry *device_rom_region() const;
33
34protected:
35   virtual void device_start();
36   virtual void device_reset();
37
38   // overrides of standard a2bus slot functions
39   virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
40   virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
41   virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
42   virtual UINT8 read_c800(address_space &space, UINT16 offset);
43
44   required_device<ide_controller_device> m_ide;
45
46   UINT8 *m_rom;
47
48private:
49   UINT16 m_lastdata;
50};
51
52class a2bus_zipdrive_device : public a2bus_zipdrivebase_device
53{
54public:
55   a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
56
57protected:
58};
59
60// device type definition
61extern const device_type A2BUS_ZIPDRIVE;
62
63#endif /* __A2BUS_ZIPDRIVE__ */
Property changes on: trunk/src/mess/machine/a2zipdrive.h
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/drivers/apple2gs.c
r21168r21169
6464#include "machine/a2cffa.h"
6565#include "machine/a2memexp.h"
6666#include "machine/a2scsi.h"
67#include "machine/a2thunderclock.h"
68#include "machine/a2ssc.h"
6769#include "machine/a2softcard.h"
6870#include "machine/a2sam.h"
6971#include "machine/a2alfam2.h"
72#include "machine/a2echoii.h"
73#include "machine/a2arcadebd.h"
7074#include "machine/a2midi.h"
7175#include "machine/a2vulcan.h"
72#include "machine/a2ssc.h"
76#include "machine/a2zipdrive.h"
7377
7478static const gfx_layout apple2gs_text_layout =
7579{
r21168r21169
293297   SLOT_INTERFACE("cffa202", A2BUS_CFFA2_6502)  /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */
294298   SLOT_INTERFACE("memexp", A2BUS_MEMEXP)  /* Apple II Memory Expansion Card */
295299   SLOT_INTERFACE("ramfactor", A2BUS_RAMFACTOR)    /* Applied Engineering RamFactor */
300   SLOT_INTERFACE("thclock", A2BUS_THUNDERCLOCK)    /* ThunderWare ThunderClock Plus */
301   SLOT_INTERFACE("ssc", A2BUS_SSC)    /* Apple Super Serial Card */
296302   SLOT_INTERFACE("sam", A2BUS_SAM)    /* SAM Software Automated Mouth (8-bit DAC + speaker) */
297303   SLOT_INTERFACE("alfam2", A2BUS_ALFAM2)    /* ALF Apple Music II */
304   SLOT_INTERFACE("echoii", A2BUS_ECHOII)    /* Street Electronics Echo II */
305   SLOT_INTERFACE("arcbd", A2BUS_ARCADEBOARD)    /* Third Millenium Engineering Arcade Board */
298306   SLOT_INTERFACE("midi", A2BUS_MIDI)  /* Generic 6840+6850 MIDI board */
299307   SLOT_INTERFACE("vulcan", A2BUS_VULCAN)  /* AE Vulcan IDE card */
300   SLOT_INTERFACE("ssc", A2BUS_SSC)    /* Apple Super Serial Card */
308   SLOT_INTERFACE("zipdrive", A2BUS_ZIPDRIVE)  /* ZIP Technologies IDE card */
309   SLOT_INTERFACE("echoiiplus", A2BUS_ECHOPLUS)    /* Street Electronics Echo Plus (Echo II + Mockingboard clone) */
301310//    SLOT_INTERFACE("softcard", A2BUS_SOFTCARD)  /* Microsoft SoftCard */  // appears not to be IIgs compatible?
302311//    SLOT_INTERFACE("scsi", A2BUS_SCSI)  /* Apple II SCSI Card */
303312SLOT_INTERFACE_END
trunk/src/mess/drivers/apple2.c
r21168r21169
212212#include "machine/a2echoii.h"
213213#include "machine/a2arcadebd.h"
214214#include "machine/a2midi.h"
215#include "machine/a2zipdrive.h"
215216#include "machine/a2estd80col.h"
216217#include "machine/a2eext80col.h"
217218#include "machine/a2eramworks3.h"
r21168r21169
634635   SLOT_INTERFACE("vtc2", A2BUS_VTC2)    /* Unknown VideoTerm clone #2 */
635636   SLOT_INTERFACE("arcbd", A2BUS_ARCADEBOARD)    /* Third Millenium Engineering Arcade Board */
636637   SLOT_INTERFACE("midi", A2BUS_MIDI)  /* Generic 6840+6850 MIDI board */
638   SLOT_INTERFACE("zipdrive", A2BUS_ZIPDRIVE)  /* ZIP Technologies IDE card */
639   SLOT_INTERFACE("echoiiplus", A2BUS_ECHOPLUS)    /* Street Electronics Echo Plus (Echo II + Mockingboard clone) */
637640//    SLOT_INTERFACE("scsi", A2BUS_SCSI)  /* Apple II SCSI Card */
638641SLOT_INTERFACE_END
639642
trunk/src/mess/mess.mak
r21168r21169
689689   $(MESS_MACHINE)/a2arcadebd.o \
690690   $(MESS_MACHINE)/a2midi.o \
691691   $(MESS_MACHINE)/a2vulcan.o \
692   $(MESS_MACHINE)/a2zipdrive.o \
692693   $(MESS_MACHINE)/a2estd80col.o \
693694   $(MESS_MACHINE)/a2eext80col.o \
694695   $(MESS_MACHINE)/a2eramworks3.o \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team