src/mess/machine/s100_dj2db.c
| r0 | r12014 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | Morrow Designs Disk Jockey 2D/B floppy controller board emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | **********************************************************************/ |
| 9 | |
| 10 | #include "s100_dj2db.h" |
| 11 | |
| 12 | |
| 13 | |
| 14 | //************************************************************************** |
| 15 | // MACROS/CONSTANTS |
| 16 | //************************************************************************** |
| 17 | |
| 18 | #define MB8866_TAG "14b" |
| 19 | #define S1602_TAG "14d" |
| 20 | #define BR1941_TAG "13d" |
| 21 | |
| 22 | |
| 23 | |
| 24 | //************************************************************************** |
| 25 | // DEVICE DEFINITIONS |
| 26 | //************************************************************************** |
| 27 | |
| 28 | const device_type S100_DJ2DB = &device_creator<s100_dj2db_device>; |
| 29 | |
| 30 | |
| 31 | //------------------------------------------------- |
| 32 | // ROM( dj2db ) |
| 33 | //------------------------------------------------- |
| 34 | |
| 35 | ROM_START( dj2db ) |
| 36 | ROM_REGION( 0x400, "dj2db", 0 ) |
| 37 | ROM_LOAD( "bv-2 f8.11d", 0x000, 0x400, CRC(b6218d0b) SHA1(e4b2ae886c0dd7717e2e02ae2e202115d8ec2def) ) |
| 38 | |
| 39 | ROM_REGION( 0x220, "proms", 0 ) |
| 40 | ROM_LOAD( "8c-b f8.8c", 0x000, 0x200, NO_DUMP ) // 6301 |
| 41 | ROM_LOAD( "3d.3d", 0x200, 0x20, NO_DUMP ) // 6331 |
| 42 | ROM_END |
| 43 | |
| 44 | |
| 45 | //------------------------------------------------- |
| 46 | // rom_region - device-specific ROM region |
| 47 | //------------------------------------------------- |
| 48 | |
| 49 | const rom_entry *s100_dj2db_device::device_rom_region() const |
| 50 | { |
| 51 | return ROM_NAME( dj2db ); |
| 52 | } |
| 53 | |
| 54 | |
| 55 | //------------------------------------------------- |
| 56 | // COM8116_INTERFACE( brg_intf ) |
| 57 | //------------------------------------------------- |
| 58 | |
| 59 | static COM8116_INTERFACE( brg_intf ) |
| 60 | { |
| 61 | DEVCB_NULL, |
| 62 | DEVCB_NULL, |
| 63 | DEVCB_NULL, |
| 64 | { 6336, 4224, 2880, 2355, 2112, 1056, 528, 264, 176, 158, 132, 88, 66, 44, 33, 16 }, // from WD1943-00 datasheet |
| 65 | { 6336, 4224, 2880, 2355, 2112, 1056, 528, 264, 176, 158, 132, 88, 66, 44, 33, 16 }, |
| 66 | }; |
| 67 | |
| 68 | |
| 69 | //------------------------------------------------- |
| 70 | // wd17xx_interface fdc_intf |
| 71 | //------------------------------------------------- |
| 72 | |
| 73 | static const floppy_interface dj2db_floppy_interface = |
| 74 | { |
| 75 | DEVCB_NULL, |
| 76 | DEVCB_NULL, |
| 77 | DEVCB_NULL, |
| 78 | DEVCB_NULL, |
| 79 | DEVCB_NULL, |
| 80 | FLOPPY_STANDARD_8_DSDD, |
| 81 | FLOPPY_OPTIONS_NAME(default), |
| 82 | "floppy_8", |
| 83 | NULL |
| 84 | }; |
| 85 | |
| 86 | static const wd17xx_interface fdc_intf = |
| 87 | { |
| 88 | DEVCB_NULL, |
| 89 | DEVCB_NULL, |
| 90 | DEVCB_NULL, |
| 91 | { FLOPPY_0, FLOPPY_1, NULL, NULL } |
| 92 | }; |
| 93 | |
| 94 | |
| 95 | //------------------------------------------------- |
| 96 | // MACHINE_CONFIG_FRAGMENT( s100_dj2db ) |
| 97 | //------------------------------------------------- |
| 98 | |
| 99 | static MACHINE_CONFIG_FRAGMENT( s100_dj2db ) |
| 100 | MCFG_COM8116_ADD(BR1941_TAG, XTAL_5_0688MHz, brg_intf) |
| 101 | MCFG_WD179X_ADD(MB8866_TAG, fdc_intf) // FD1791 |
| 102 | MCFG_FLOPPY_2_DRIVES_ADD(dj2db_floppy_interface) |
| 103 | MACHINE_CONFIG_END |
| 104 | |
| 105 | |
| 106 | //------------------------------------------------- |
| 107 | // machine_config_additions - device-specific |
| 108 | // machine configurations |
| 109 | //------------------------------------------------- |
| 110 | |
| 111 | machine_config_constructor s100_dj2db_device::device_mconfig_additions() const |
| 112 | { |
| 113 | return MACHINE_CONFIG_NAME( s100_dj2db ); |
| 114 | } |
| 115 | |
| 116 | |
| 117 | //------------------------------------------------- |
| 118 | // INPUT_PORTS( mm65k16s ) |
| 119 | //------------------------------------------------- |
| 120 | |
| 121 | static INPUT_PORTS_START( dj2db ) |
| 122 | PORT_START("13C") |
| 123 | |
| 124 | PORT_START("5D") |
| 125 | INPUT_PORTS_END |
| 126 | |
| 127 | |
| 128 | //------------------------------------------------- |
| 129 | // input_ports - device-specific input ports |
| 130 | //------------------------------------------------- |
| 131 | |
| 132 | ioport_constructor s100_dj2db_device::device_input_ports() const |
| 133 | { |
| 134 | return INPUT_PORTS_NAME( dj2db ); |
| 135 | } |
| 136 | |
| 137 | |
| 138 | |
| 139 | //************************************************************************** |
| 140 | // LIVE DEVICE |
| 141 | //************************************************************************** |
| 142 | |
| 143 | //------------------------------------------------- |
| 144 | // s100_dj2db_device - constructor |
| 145 | //------------------------------------------------- |
| 146 | |
| 147 | s100_dj2db_device::s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 148 | device_t(mconfig, S100_DJ2DB, "DJ2DB", tag, owner, clock), |
| 149 | device_s100_card_interface(mconfig, *this), |
| 150 | device_slot_card_interface(mconfig, *this), |
| 151 | m_fdc(*this, MB8866_TAG), |
| 152 | m_dbrg(*this, BR1941_TAG) |
| 153 | { |
| 154 | } |
| 155 | |
| 156 | |
| 157 | //------------------------------------------------- |
| 158 | // device_start - device-specific startup |
| 159 | //------------------------------------------------- |
| 160 | |
| 161 | void s100_dj2db_device::device_start() |
| 162 | { |
| 163 | m_s100 = machine().device<s100_device>("s100"); |
| 164 | } |
| 165 | |
| 166 | |
| 167 | //------------------------------------------------- |
| 168 | // device_reset - device-specific reset |
| 169 | //------------------------------------------------- |
| 170 | |
| 171 | void s100_dj2db_device::device_reset() |
| 172 | { |
| 173 | } |
| 174 | |
| 175 | |
| 176 | //------------------------------------------------- |
| 177 | // s100_smemr_r - memory read |
| 178 | //------------------------------------------------- |
| 179 | |
| 180 | UINT8 s100_dj2db_device::s100_smemr_r(offs_t offset) |
| 181 | { |
| 182 | return 0; |
| 183 | } |
| 184 | |
| 185 | |
| 186 | //------------------------------------------------- |
| 187 | // s100_mwrt_w - memory write |
| 188 | //------------------------------------------------- |
| 189 | |
| 190 | void s100_dj2db_device::s100_mwrt_w(offs_t offset, UINT8 data) |
| 191 | { |
| 192 | } |
| 193 | |
| 194 | |
| 195 | //------------------------------------------------- |
| 196 | // s100_sinp_r - I/O read |
| 197 | //------------------------------------------------- |
| 198 | |
| 199 | UINT8 s100_dj2db_device::s100_sinp_r(offs_t offset) |
| 200 | { |
| 201 | return 0; |
| 202 | } |
| 203 | |
| 204 | |
| 205 | //------------------------------------------------- |
| 206 | // s100_sout_w - I/O write |
| 207 | //------------------------------------------------- |
| 208 | |
| 209 | void s100_dj2db_device::s100_sout_w(offs_t offset, UINT8 data) |
| 210 | { |
| 211 | } |
| 212 | |
| 213 | |
| 214 | //------------------------------------------------- |
| 215 | // s100_phantom_w - phantom |
| 216 | //------------------------------------------------- |
| 217 | |
| 218 | void s100_dj2db_device::s100_phantom_w(int state) |
| 219 | { |
| 220 | } |
| 221 | |
| 222 | |
| 223 | //------------------------------------------------- |
| 224 | // s100_terminal_w - terminal write |
| 225 | //------------------------------------------------- |
| 226 | |
| 227 | void s100_dj2db_device::s100_terminal_w(UINT8 data) |
| 228 | { |
| 229 | } |
src/mess/machine/s100_dj2db.h
| r0 | r12014 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | Morrow Designs Disk Jockey 2D/B floppy controller board emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | **********************************************************************/ |
| 9 | |
| 10 | #pragma once |
| 11 | |
| 12 | #ifndef __S100_DJ2DB__ |
| 13 | #define __S100_DJ2DB__ |
| 14 | |
| 15 | #define ADDRESS_MAP_MODERN |
| 16 | |
| 17 | #include "emu.h" |
| 18 | #include "formats/basicdsk.h" |
| 19 | #include "imagedev/flopdrv.h" |
| 20 | #include "machine/s100.h" |
| 21 | #include "machine/com8116.h" |
| 22 | #include "machine/wd17xx.h" |
| 23 | |
| 24 | |
| 25 | |
| 26 | //************************************************************************** |
| 27 | // TYPE DEFINITIONS |
| 28 | //************************************************************************** |
| 29 | |
| 30 | // ======================> s100_djdma_device |
| 31 | |
| 32 | class s100_dj2db_device : public device_t, |
| 33 | public device_s100_card_interface, |
| 34 | public device_slot_card_interface |
| 35 | { |
| 36 | public: |
| 37 | // construction/destruction |
| 38 | s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 39 | |
| 40 | // optional information overrides |
| 41 | virtual const rom_entry *device_rom_region() const; |
| 42 | virtual machine_config_constructor device_mconfig_additions() const; |
| 43 | virtual ioport_constructor device_input_ports() const; |
| 44 | |
| 45 | protected: |
| 46 | // device-level overrides |
| 47 | virtual void device_start(); |
| 48 | virtual void device_reset(); |
| 49 | virtual void device_config_complete() { m_shortname = "dj2db"; } |
| 50 | |
| 51 | // device_s100_card_interface overrides |
| 52 | virtual UINT8 s100_smemr_r(offs_t offset); |
| 53 | virtual void s100_mwrt_w(offs_t offset, UINT8 data); |
| 54 | virtual UINT8 s100_sinp_r(offs_t offset); |
| 55 | virtual void s100_sout_w(offs_t offset, UINT8 data); |
| 56 | virtual void s100_phantom_w(int state); |
| 57 | virtual bool s100_has_terminal() { return true; } |
| 58 | virtual void s100_terminal_w(UINT8 data); |
| 59 | |
| 60 | private: |
| 61 | // internal state |
| 62 | required_device<device_t> m_fdc; |
| 63 | required_device<com8116_device> m_dbrg; |
| 64 | device_t *m_image0; |
| 65 | device_t *m_image1; |
| 66 | }; |
| 67 | |
| 68 | |
| 69 | // device type definition |
| 70 | extern const device_type S100_DJ2DB; |
| 71 | |
| 72 | |
| 73 | #endif |
src/mess/drivers/mpz80.c
| r12013 | r12014 | |
| 713 | 713 | static SLOT_INTERFACE_START( mpz80_s100_cards ) |
| 714 | 714 | SLOT_INTERFACE("mm65k16s", S100_MM65K16S) |
| 715 | 715 | SLOT_INTERFACE("wunderbus", S100_WUNDERBUS) |
| 716 | SLOT_INTERFACE("dj2db", S100_DJ2DB) |
| 716 | 717 | SLOT_INTERFACE("djdma", S100_DJDMA) |
| 717 | 718 | // SLOT_INTERFACE("multio", S100_MULTIO) |
| 718 | | // SLOT_INTERFACE("dj2db", S100_DJ2DB) |
| 719 | 719 | // SLOT_INTERFACE("hdcdma", S100_HDCDMA) |
| 720 | 720 | // SLOT_INTERFACE("hdca", S100_HDCA) |
| 721 | 721 | SLOT_INTERFACE_END |
| r12013 | r12014 | |
| 774 | 774 | MCFG_S100_BUS_ADD(Z80_TAG, s100_intf) |
| 775 | 775 | MCFG_S100_SLOT_ADD( 1, "s100_1", mpz80_s100_cards, "mm65k16s") |
| 776 | 776 | MCFG_S100_SLOT_ADD( 2, "s100_2", mpz80_s100_cards, "wunderbus") |
| 777 | | MCFG_S100_SLOT_ADD( 3, "s100_3", mpz80_s100_cards, "djdma") |
| 777 | MCFG_S100_SLOT_ADD( 3, "s100_3", mpz80_s100_cards, "dj2db") |
| 778 | 778 | MCFG_S100_SLOT_ADD( 4, "s100_4", mpz80_s100_cards, NULL)//"hdcdma") |
| 779 | 779 | MCFG_S100_SLOT_ADD( 5, "s100_5", mpz80_s100_cards, NULL) |
| 780 | 780 | MCFG_S100_SLOT_ADD( 6, "s100_6", mpz80_s100_cards, NULL) |