src/emu/machine/intelfsh.c
| r14981 | r14982 | |
| 47 | 47 | // device type definition |
| 48 | 48 | const device_type INTEL_28F016S5 = &device_creator<intel_28f016s5_device>; |
| 49 | 49 | const device_type SHARP_LH28F016S = &device_creator<sharp_lh28f016s_device>; |
| 50 | const device_type ATMEL_29C010 = &device_creator<atmel_29c010_device>; |
| 50 | 51 | const device_type AMD_29F040 = &device_creator<amd_29f040_device>; |
| 51 | 52 | const device_type AMD_29F080 = &device_creator<amd_29f080_device>; |
| 52 | 53 | const device_type FUJITSU_29F016A = &device_creator<fujitsu_29f016a_device>; |
| r14981 | r14982 | |
| 133 | 134 | m_device_id = 0xaa; |
| 134 | 135 | map = ADDRESS_MAP_NAME( memory_map8_16Mb ); |
| 135 | 136 | break; |
| 137 | case FLASH_ATMEL_29C010: |
| 138 | m_bits = 8; |
| 139 | m_size = 0x20000; |
| 140 | m_maker_id = 0x1f; |
| 141 | m_device_id = 0xd5; |
| 142 | map = ADDRESS_MAP_NAME( memory_map8_1Mb ); |
| 143 | break; |
| 136 | 144 | case FLASH_AMD_29F040: |
| 137 | 145 | m_bits = 8; |
| 138 | 146 | m_size = 0x80000; |
| r14981 | r14982 | |
| 242 | 250 | sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 243 | 251 | : intelfsh8_device(mconfig, SHARP_LH28F016S, "Sharp LH28F016S Flash", tag, owner, clock, FLASH_SHARP_LH28F016S) { } |
| 244 | 252 | |
| 253 | atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 254 | : intelfsh8_device(mconfig, ATMEL_29C010, "Atmel 29C010 Flash", tag, owner, clock, FLASH_ATMEL_29C010) { } |
| 255 | |
| 245 | 256 | amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 246 | 257 | : intelfsh8_device(mconfig, AMD_29F040, "AMD 29F040 Flash", tag, owner, clock, FLASH_AMD_29F040) { } |
| 247 | 258 | |
src/emu/machine/intelfsh.h
| r14981 | r14982 | |
| 16 | 16 | #define MCFG_SHARP_LH28F016S_ADD(_tag) \ |
| 17 | 17 | MCFG_DEVICE_ADD(_tag, SHARP_LH28F016S, 0) |
| 18 | 18 | |
| 19 | #define MCFG_ATMEL_29C010_ADD(_tag) \ |
| 20 | MCFG_DEVICE_ADD(_tag, ATMEL_29C010, 0) |
| 21 | |
| 19 | 22 | #define MCFG_AMD_29F040_ADD(_tag) \ |
| 20 | 23 | MCFG_DEVICE_ADD(_tag, AMD_29F040, 0) |
| 21 | 24 | |
| r14981 | r14982 | |
| 74 | 77 | FLASH_INTEL_28F016S5 = 0x0800, |
| 75 | 78 | FLASH_FUJITSU_29F016A, |
| 76 | 79 | FLASH_FUJITSU_29DL16X, |
| 80 | FLASH_ATMEL_29C010, |
| 77 | 81 | FLASH_AMD_29F040, |
| 78 | 82 | FLASH_AMD_29F080, |
| 79 | 83 | FLASH_SHARP_LH28F016S, |
| r14981 | r14982 | |
| 186 | 190 | fujitsu_29dl16x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 187 | 191 | }; |
| 188 | 192 | |
| 193 | class atmel_29c010_device : public intelfsh8_device |
| 194 | { |
| 195 | public: |
| 196 | atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 197 | }; |
| 198 | |
| 189 | 199 | class amd_29f040_device : public intelfsh8_device |
| 190 | 200 | { |
| 191 | 201 | public: |
| r14981 | r14982 | |
| 259 | 269 | // device type definition |
| 260 | 270 | extern const device_type INTEL_28F016S5; |
| 261 | 271 | extern const device_type SHARP_LH28F016S; |
| 272 | extern const device_type ATMEL_29C010; |
| 262 | 273 | extern const device_type AMD_29F040; |
| 263 | 274 | extern const device_type AMD_29F080; |
| 264 | 275 | extern const device_type FUJITSU_29F016A; |
src/mess/machine/c64_ide64.c
| r0 | r14982 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | IDE64 v4.1 cartridge emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | **********************************************************************/ |
| 9 | |
| 10 | #include "c64_ide64.h" |
| 11 | |
| 12 | |
| 13 | |
| 14 | //************************************************************************** |
| 15 | // MACROS/CONSTANTS |
| 16 | //************************************************************************** |
| 17 | |
| 18 | #define AT29C010_TAG "u3" |
| 19 | #define DS1302_TAG "u4" |
| 20 | |
| 21 | |
| 22 | |
| 23 | //************************************************************************** |
| 24 | // DEVICE DEFINITIONS |
| 25 | //************************************************************************** |
| 26 | |
| 27 | const device_type C64_IDE64 = &device_creator<c64_ide64_cartridge_device>; |
| 28 | |
| 29 | |
| 30 | //------------------------------------------------- |
| 31 | // MACHINE_CONFIG_FRAGMENT( c64_ide64 ) |
| 32 | //------------------------------------------------- |
| 33 | |
| 34 | static MACHINE_CONFIG_FRAGMENT( c64_ide64 ) |
| 35 | MCFG_ATMEL_29C010_ADD(AT29C010_TAG) |
| 36 | MCFG_DS1302_ADD(DS1302_TAG) |
| 37 | // TODO CompactFlash |
| 38 | |
| 39 | MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", "hdd") |
| 40 | MACHINE_CONFIG_END |
| 41 | |
| 42 | |
| 43 | //------------------------------------------------- |
| 44 | // machine_config_additions - device-specific |
| 45 | // machine configurations |
| 46 | //------------------------------------------------- |
| 47 | |
| 48 | machine_config_constructor c64_ide64_cartridge_device::device_mconfig_additions() const |
| 49 | { |
| 50 | return MACHINE_CONFIG_NAME( c64_ide64 ); |
| 51 | } |
| 52 | |
| 53 | |
| 54 | |
| 55 | //************************************************************************** |
| 56 | // LIVE DEVICE |
| 57 | //************************************************************************** |
| 58 | |
| 59 | //------------------------------------------------- |
| 60 | // c64_ide64_cartridge_device - constructor |
| 61 | //------------------------------------------------- |
| 62 | |
| 63 | c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 64 | device_t(mconfig, C64_IDE64, "C64 IDE64 cartridge", tag, owner, clock), |
| 65 | device_c64_expansion_card_interface(mconfig, *this) |
| 66 | { |
| 67 | } |
| 68 | |
| 69 | |
| 70 | //------------------------------------------------- |
| 71 | // device_start - device-specific startup |
| 72 | //------------------------------------------------- |
| 73 | |
| 74 | void c64_ide64_cartridge_device::device_start() |
| 75 | { |
| 76 | // allocate memory |
| 77 | c64_ram_pointer(machine(), 0x8000); |
| 78 | } |
| 79 | |
| 80 | |
| 81 | //------------------------------------------------- |
| 82 | // device_reset - device-specific reset |
| 83 | //------------------------------------------------- |
| 84 | |
| 85 | void c64_ide64_cartridge_device::device_reset() |
| 86 | { |
| 87 | } |
| 88 | |
| 89 | |
| 90 | //------------------------------------------------- |
| 91 | // c64_cd_r - cartridge data read |
| 92 | //------------------------------------------------- |
| 93 | |
| 94 | UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2) |
| 95 | { |
| 96 | UINT8 data = 0; |
| 97 | |
| 98 | // TODO |
| 99 | |
| 100 | return data; |
| 101 | } |
| 102 | |
| 103 | |
| 104 | //------------------------------------------------- |
| 105 | // c64_cd_w - cartridge data write |
| 106 | //------------------------------------------------- |
| 107 | |
| 108 | void c64_ide64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2) |
| 109 | { |
| 110 | // TODO |
| 111 | } |
src/mess/machine/c64_ide64.h
| r0 | r14982 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | IDE64 v4.1 cartridge 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 __IDE64__ |
| 13 | #define __IDE64__ |
| 14 | |
| 15 | |
| 16 | #include "emu.h" |
| 17 | #include "machine/c64exp.h" |
| 18 | #include "machine/ds1302.h" |
| 19 | #include "machine/idectrl.h" |
| 20 | #include "machine/intelfsh.h" |
| 21 | #include "imagedev/harddriv.h" |
| 22 | |
| 23 | |
| 24 | |
| 25 | //************************************************************************** |
| 26 | // TYPE DEFINITIONS |
| 27 | //************************************************************************** |
| 28 | |
| 29 | // ======================> c64_ide64_cartridge_device |
| 30 | |
| 31 | class c64_ide64_cartridge_device : public device_t, |
| 32 | public device_c64_expansion_card_interface |
| 33 | { |
| 34 | public: |
| 35 | // construction/destruction |
| 36 | c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 37 | |
| 38 | // optional information overrides |
| 39 | virtual machine_config_constructor device_mconfig_additions() const; |
| 40 | |
| 41 | protected: |
| 42 | // device-level overrides |
| 43 | virtual void device_config_complete() { m_shortname = "c64_ide64"; } |
| 44 | virtual void device_start(); |
| 45 | virtual void device_reset(); |
| 46 | |
| 47 | // device_c64_expansion_card_interface overrides |
| 48 | virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2); |
| 49 | virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2); |
| 50 | }; |
| 51 | |
| 52 | |
| 53 | // device type definition |
| 54 | extern const device_type C64_IDE64; |
| 55 | |
| 56 | |
| 57 | #endif |