trunk/src/mess/machine/a2mockingboard.c
| r21168 | r21169 | |
| 3 | 3 | a2mockingboard.c |
| 4 | 4 | |
| 5 | 5 | Implementation of the Sweet Micro Systems Mockingboard card |
| 6 | and friends. |
| 6 | 7 | |
| 7 | 8 | *********************************************************************/ |
| 8 | 9 | |
| r21168 | r21169 | |
| 20 | 21 | #define AY2_TAG "mockbd_ay2" |
| 21 | 22 | #define AY3_TAG "mockbd_ay3" |
| 22 | 23 | #define AY4_TAG "mockbd_ay4" |
| 24 | #define E2P_TMS_TAG "tms5220" |
| 23 | 25 | |
| 24 | 26 | //************************************************************************** |
| 25 | 27 | // GLOBAL VARIABLES |
| r21168 | r21169 | |
| 27 | 29 | |
| 28 | 30 | const device_type A2BUS_MOCKINGBOARD = &device_creator<a2bus_mockingboard_device>; |
| 29 | 31 | const device_type A2BUS_PHASOR = &device_creator<a2bus_phasor_device>; |
| 32 | const device_type A2BUS_ECHOPLUS = &device_creator<a2bus_echoplus_device>; |
| 30 | 33 | |
| 31 | 34 | static const ay8910_interface mockingboard_ay8910_interface = |
| 32 | 35 | { |
| r21168 | r21169 | |
| 90 | 93 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker2", 1.0) |
| 91 | 94 | MACHINE_CONFIG_END |
| 92 | 95 | |
| 96 | MACHINE_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) |
| 111 | MACHINE_CONFIG_END |
| 112 | |
| 93 | 113 | //------------------------------------------------- |
| 94 | 114 | // machine_config_additions - device-specific |
| 95 | 115 | // machine configurations |
| r21168 | r21169 | |
| 105 | 125 | return MACHINE_CONFIG_NAME( phasor ); |
| 106 | 126 | } |
| 107 | 127 | |
| 128 | machine_config_constructor a2bus_echoplus_device::device_mconfig_additions() const |
| 129 | { |
| 130 | return MACHINE_CONFIG_NAME( echoplus ); |
| 131 | } |
| 132 | |
| 108 | 133 | //************************************************************************** |
| 109 | 134 | // LIVE DEVICE |
| 110 | 135 | //************************************************************************** |
| r21168 | r21169 | |
| 137 | 162 | m_PhasorNative = false; |
| 138 | 163 | } |
| 139 | 164 | |
| 165 | a2bus_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 | |
| 140 | 174 | //------------------------------------------------- |
| 141 | 175 | // device_start - device-specific startup |
| 142 | 176 | //------------------------------------------------- |
| r21168 | r21169 | |
| 156 | 190 | } |
| 157 | 191 | |
| 158 | 192 | /*------------------------------------------------- |
| 159 | | read_cnxx - called for reads from this card's c0nx space |
| 193 | read_cnxx - called for reads from this card's cnxx space |
| 160 | 194 | -------------------------------------------------*/ |
| 161 | 195 | |
| 162 | 196 | UINT8 a2bus_ayboard_device::read_cnxx(address_space &space, UINT8 offset) |
| r21168 | r21169 | |
| 508 | 542 | m_PhasorNative = (offset & 1) ? true : false; |
| 509 | 543 | } |
| 510 | 544 | } |
| 545 | |
| 546 | UINT8 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 | |
| 557 | void 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/a2zipdrive.c
| r0 | r21169 | |
| 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 | |
| 29 | const 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 | |
| 34 | static MACHINE_CONFIG_FRAGMENT( zipdrive ) |
| 35 | MCFG_IDE_CONTROLLER_ADD(ZIPDRIVE_IDE_TAG, ide_image_devices, "hdd", "hdd", false) |
| 36 | MACHINE_CONFIG_END |
| 37 | |
| 38 | ROM_START( zipdrive ) |
| 39 | ROM_REGION(0x2000, ZIPDRIVE_ROM_REGION, 0) |
| 40 | ROM_LOAD( "zip drive - rom.bin", 0x000000, 0x002000, CRC(fd800a40) SHA1(46636bfed88c864139e3d2826661908a8c07c459) ) |
| 41 | ROM_END |
| 42 | |
| 43 | /*************************************************************************** |
| 44 | FUNCTION PROTOTYPES |
| 45 | ***************************************************************************/ |
| 46 | |
| 47 | //------------------------------------------------- |
| 48 | // machine_config_additions - device-specific |
| 49 | // machine configurations |
| 50 | //------------------------------------------------- |
| 51 | |
| 52 | machine_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 | |
| 61 | const rom_entry *a2bus_zipdrivebase_device::device_rom_region() const |
| 62 | { |
| 63 | return ROM_NAME( zipdrive ); |
| 64 | } |
| 65 | |
| 66 | //************************************************************************** |
| 67 | // LIVE DEVICE |
| 68 | //************************************************************************** |
| 69 | |
| 70 | a2bus_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 | |
| 77 | a2bus_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 | |
| 87 | void 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 | |
| 98 | void 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 | |
| 108 | UINT8 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 | |
| 143 | void 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 | |
| 181 | UINT8 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 | |
| 193 | UINT8 a2bus_zipdrivebase_device::read_c800(address_space &space, UINT16 offset) |
| 194 | { |
| 195 | offset &= 0x7ff; |
| 196 | |
| 197 | return m_rom[offset+0x1800]; |
| 198 | } |
| 199 | |
trunk/src/mess/machine/a2zipdrive.h
| r0 | r21169 | |
| 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 | |
| 22 | class a2bus_zipdrivebase_device: |
| 23 | public device_t, |
| 24 | public device_a2bus_card_interface |
| 25 | { |
| 26 | public: |
| 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 | |
| 34 | protected: |
| 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 | |
| 48 | private: |
| 49 | UINT16 m_lastdata; |
| 50 | }; |
| 51 | |
| 52 | class a2bus_zipdrive_device : public a2bus_zipdrivebase_device |
| 53 | { |
| 54 | public: |
| 55 | a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 56 | |
| 57 | protected: |
| 58 | }; |
| 59 | |
| 60 | // device type definition |
| 61 | extern const device_type A2BUS_ZIPDRIVE; |
| 62 | |
| 63 | #endif /* __A2BUS_ZIPDRIVE__ */ |
trunk/src/mess/drivers/apple2gs.c
| r21168 | r21169 | |
| 64 | 64 | #include "machine/a2cffa.h" |
| 65 | 65 | #include "machine/a2memexp.h" |
| 66 | 66 | #include "machine/a2scsi.h" |
| 67 | #include "machine/a2thunderclock.h" |
| 68 | #include "machine/a2ssc.h" |
| 67 | 69 | #include "machine/a2softcard.h" |
| 68 | 70 | #include "machine/a2sam.h" |
| 69 | 71 | #include "machine/a2alfam2.h" |
| 72 | #include "machine/a2echoii.h" |
| 73 | #include "machine/a2arcadebd.h" |
| 70 | 74 | #include "machine/a2midi.h" |
| 71 | 75 | #include "machine/a2vulcan.h" |
| 72 | | #include "machine/a2ssc.h" |
| 76 | #include "machine/a2zipdrive.h" |
| 73 | 77 | |
| 74 | 78 | static const gfx_layout apple2gs_text_layout = |
| 75 | 79 | { |
| r21168 | r21169 | |
| 293 | 297 | SLOT_INTERFACE("cffa202", A2BUS_CFFA2_6502) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */ |
| 294 | 298 | SLOT_INTERFACE("memexp", A2BUS_MEMEXP) /* Apple II Memory Expansion Card */ |
| 295 | 299 | 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 */ |
| 296 | 302 | SLOT_INTERFACE("sam", A2BUS_SAM) /* SAM Software Automated Mouth (8-bit DAC + speaker) */ |
| 297 | 303 | 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 */ |
| 298 | 306 | SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */ |
| 299 | 307 | 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) */ |
| 301 | 310 | // SLOT_INTERFACE("softcard", A2BUS_SOFTCARD) /* Microsoft SoftCard */ // appears not to be IIgs compatible? |
| 302 | 311 | // SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ |
| 303 | 312 | SLOT_INTERFACE_END |