trunk/src/mess/machine/cmdhd.c
| r19384 | r19385 | |
| 19 | 19 | #define M6522_1_TAG "m6522_1" |
| 20 | 20 | #define M6522_2_TAG "m6522_2" |
| 21 | 21 | #define I8255A_TAG "i8255a" |
| 22 | #define RTC72421A_TAG "rtc" |
| 23 | #define SCSIBUS_TAG "scsi" |
| 22 | 24 | |
| 23 | 25 | |
| 24 | 26 | |
| r19384 | r19385 | |
| 36 | 38 | ROM_START( cmd_hd ) |
| 37 | 39 | ROM_REGION( 0x8000, M6502_TAG, 0 ) |
| 38 | 40 | ROM_LOAD( "cmd_hd_bootrom_v280.bin", 0x0000, 0x8000, CRC(da68435d) SHA1(defd8bc04a52904b8a3560f11c82126619513a10) ) |
| 41 | |
| 42 | ROM_REGION( 0x104, "plds", 0 ) |
| 43 | ROM_LOAD( "pal16l8_1", 0x000, 0x001, NO_DUMP ) |
| 44 | ROM_LOAD( "pal16l8_2", 0x000, 0x001, NO_DUMP ) |
| 45 | ROM_LOAD( "pal16l8_3", 0x000, 0x001, NO_DUMP ) |
| 39 | 46 | ROM_END |
| 40 | 47 | |
| 41 | 48 | |
| r19384 | r19385 | |
| 56 | 63 | static ADDRESS_MAP_START( cmd_hd_mem, AS_PROGRAM, 8, cmd_hd_device ) |
| 57 | 64 | AM_RANGE(0x0000, 0x7fff) AM_RAM |
| 58 | 65 | AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION(M6502_TAG, 0) |
| 59 | | //AM_RANGE() AM_DEVREADWRITE(M6522_1_TAG, via6522_device, read, write) |
| 60 | | //AM_RANGE() AM_DEVREADWRITE(M6522_2_TAG, via6522_device, read, write) |
| 66 | AM_RANGE(0x8000, 0x800f) AM_MIRROR(0x1f0) AM_DEVREADWRITE(M6522_1_TAG, via6522_device, read, write) |
| 67 | AM_RANGE(0x8400, 0x840f) AM_MIRROR(0x1f0) AM_DEVREADWRITE(M6522_2_TAG, via6522_device, read, write) |
| 68 | AM_RANGE(0x8800, 0x8803) AM_MIRROR(0x1fc) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write) |
| 69 | AM_RANGE(0x8c00, 0x8c0f) AM_MIRROR(0x1f0) //AM_DEVREADWRITE(RTC72421A_TAG, rtc72421a_device, read, write) |
| 70 | AM_RANGE(0x8f00, 0x8f00) AM_MIRROR(0xff) AM_WRITE(led_w) |
| 61 | 71 | ADDRESS_MAP_END |
| 62 | 72 | |
| 63 | 73 | |
| r19384 | r19385 | |
| 135 | 145 | MCFG_VIA6522_ADD(M6522_1_TAG, 2000000, via1_intf) |
| 136 | 146 | MCFG_VIA6522_ADD(M6522_2_TAG, 2000000, via2_intf) |
| 137 | 147 | MCFG_I8255A_ADD(I8255A_TAG, ppi_intf) |
| 148 | //MCFG_RTC72421A_ADD(RTC72421A_TAG) |
| 138 | 149 | |
| 139 | | MCFG_HARDDISK_ADD("harddisk0") |
| 150 | MCFG_SCSIBUS_ADD(SCSIBUS_TAG) |
| 151 | MCFG_SCSIDEV_ADD(SCSIBUS_TAG ":harddisk0", SCSIHD, SCSI_ID_0) |
| 152 | MCFG_SCSICB_ADD(SCSIBUS_TAG ":host") |
| 140 | 153 | MACHINE_CONFIG_END |
| 141 | 154 | |
| 142 | 155 | |
| r19384 | r19385 | |
| 163 | 176 | cmd_hd_device::cmd_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 164 | 177 | : device_t(mconfig, CMD_HD, "HD", tag, owner, clock), |
| 165 | 178 | device_cbm_iec_interface(mconfig, *this), |
| 166 | | m_maincpu(*this, M6502_TAG) |
| 179 | m_maincpu(*this, M6502_TAG), |
| 180 | m_scsibus(*this, SCSIBUS_TAG":host") |
| 167 | 181 | { |
| 168 | 182 | } |
| 169 | 183 | |
| r19384 | r19385 | |
| 224 | 238 | device_reset(); |
| 225 | 239 | } |
| 226 | 240 | } |
| 241 | |
| 242 | |
| 243 | //------------------------------------------------- |
| 244 | // led_w - |
| 245 | //------------------------------------------------- |
| 246 | |
| 247 | WRITE8_MEMBER( cmd_hd_device::led_w ) |
| 248 | { |
| 249 | /* |
| 250 | |
| 251 | bit description |
| 252 | |
| 253 | 0 |
| 254 | 1 |
| 255 | 2 |
| 256 | 3 |
| 257 | 4 |
| 258 | 5 |
| 259 | 6 |
| 260 | 7 |
| 261 | |
| 262 | */ |
| 263 | } |
trunk/src/mess/machine/cmdhd.h
| r19384 | r19385 | |
| 12 | 12 | #ifndef __CMD_HD__ |
| 13 | 13 | #define __CMD_HD__ |
| 14 | 14 | |
| 15 | | #define ADDRESS_MAP_MODERN |
| 16 | | |
| 17 | 15 | #include "emu.h" |
| 18 | 16 | #include "cpu/m6502/m6502.h" |
| 19 | 17 | #include "imagedev/harddriv.h" |
| 20 | 18 | #include "machine/6522via.h" |
| 21 | 19 | #include "machine/cbmiec.h" |
| 22 | 20 | #include "machine/i8255.h" |
| 21 | #include "machine/scsibus.h" |
| 22 | #include "machine/scsicb.h" |
| 23 | #include "machine/scsihd.h" |
| 23 | 24 | |
| 24 | 25 | |
| 25 | 26 | |
| r19384 | r19385 | |
| 40 | 41 | class cmd_hd_device : public device_t, |
| 41 | 42 | public device_cbm_iec_interface |
| 42 | 43 | { |
| 43 | | |
| 44 | 44 | public: |
| 45 | 45 | // construction/destruction |
| 46 | 46 | cmd_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| r19384 | r19385 | |
| 49 | 49 | virtual const rom_entry *device_rom_region() const; |
| 50 | 50 | virtual machine_config_constructor device_mconfig_additions() const; |
| 51 | 51 | |
| 52 | DECLARE_WRITE8_MEMBER( led_w ); |
| 53 | |
| 52 | 54 | protected: |
| 53 | 55 | // device-level overrides |
| 56 | virtual void device_config_complete() { m_shortname = "cmdhd"; } |
| 54 | 57 | virtual void device_start(); |
| 55 | 58 | virtual void device_reset(); |
| 56 | | virtual void device_config_complete() { m_shortname = "cmdhd"; } |
| 57 | 59 | |
| 58 | 60 | // device_cbm_iec_interface overrides |
| 59 | 61 | void cbm_iec_srq(int state); |
| r19384 | r19385 | |
| 62 | 64 | void cbm_iec_reset(int state); |
| 63 | 65 | |
| 64 | 66 | required_device<cpu_device> m_maincpu; |
| 67 | required_device<scsicb_device> m_scsibus; |
| 65 | 68 | }; |
| 66 | 69 | |
| 67 | 70 | |