src/mess/includes/vc1541.h
| r4790 | r4791 | |
| 13 | 13 | |
| 14 | 14 | /* we currently have preliminary support for 1541 & 1551 only */ |
| 15 | 15 | enum { |
| 16 | | type_1541 = 0, |
| 17 | | type_1541ii, |
| 18 | | type_1551, |
| 19 | | type_1570, |
| 20 | | type_1571, |
| 21 | | type_1571cr, |
| 22 | | type_1581, |
| 23 | | type_2031, |
| 24 | | type_2040, |
| 25 | | type_3040, |
| 26 | | type_4040, |
| 27 | | type_1001, |
| 28 | | type_8050, |
| 29 | | type_8250, |
| 16 | type_1541 = 0, |
| 17 | type_1541ii, |
| 18 | type_1551, |
| 19 | type_1570, |
| 20 | type_1571, |
| 21 | type_1571cr, |
| 22 | type_1581, |
| 23 | type_2031, |
| 24 | type_2040, |
| 25 | type_3040, |
| 26 | type_4040, |
| 27 | type_1001, |
| 28 | type_8050, |
| 29 | type_8250, |
| 30 | 30 | }; |
| 31 | 31 | |
| 32 | 32 | enum { |
| 33 | | format_d64 = 0, /* 1541 image, 35 tracks */ |
| 34 | | format_d64_err, /* 1541 image, 35 tracks + error table */ |
| 35 | | format_d64_40t, /* 1541 image, 40 tracks */ |
| 36 | | format_d64_40t_err, /* 1541 image, 40 tracks + error table */ |
| 37 | | format_d67, /* 2040 image, 35 tracks DOS1 format */ |
| 38 | | format_d71, /* 1571 image, 70 tracks */ |
| 39 | | format_d71_err, /* 1571 image, 70 tracks + error table */ |
| 40 | | format_d81, /* 1581 image, 80 tracks */ |
| 41 | | format_d80, /* 8050 image, 77 tracks */ |
| 42 | | format_d82, /* 8250 image, 154 tracks (read as 77?) */ |
| 43 | | format_g64, /* 1541 image in GCR format */ |
| 33 | format_d64 = 0, /* 1541 image, 35 tracks */ |
| 34 | format_d64_err, /* 1541 image, 35 tracks + error table */ |
| 35 | format_d64_40t, /* 1541 image, 40 tracks */ |
| 36 | format_d64_40t_err, /* 1541 image, 40 tracks + error table */ |
| 37 | format_d67, /* 2040 image, 35 tracks DOS1 format */ |
| 38 | format_d71, /* 1571 image, 70 tracks */ |
| 39 | format_d71_err, /* 1571 image, 70 tracks + error table */ |
| 40 | format_d81, /* 1581 image, 80 tracks */ |
| 41 | format_d80, /* 8050 image, 77 tracks */ |
| 42 | format_d82, /* 8250 image, 154 tracks (read as 77?) */ |
| 43 | format_g64, /* 1541 image in GCR format */ |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | 46 | |
| 47 | | int drive_config(running_machine *machine, int type, int id, int mode, const char *cputag, int devicenr); |
| 47 | void drive_config(running_machine *machine, int type, int id, int mode, const char *cputag, int devicenr); |
| 48 | 48 | void c1551_config(running_machine *machine, const char *cputag); |
| 49 | 49 | void drive_reset(void); |
| 50 | void c1551_drive_reset(void); |
| 50 | 51 | |
| 51 | 52 | void vc1541_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 52 | 53 | void c1551_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 53 | 54 | void c1571_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 55 | void c1581_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 54 | 56 | /* the ones below are still not used in any drivers */ |
| 55 | | void c1581_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 56 | 57 | void c2031_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 57 | 58 | void c2040_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 58 | 59 | void c8050_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| r4790 | r4791 | |
| 61 | 62 | |
| 62 | 63 | MACHINE_DRIVER_EXTERN( cpu_vc1540 ); |
| 63 | 64 | MACHINE_DRIVER_EXTERN( cpu_vc1541 ); |
| 65 | MACHINE_DRIVER_EXTERN( cpu_c1571 ); |
| 66 | MACHINE_DRIVER_EXTERN( cpu_c1571cr ); |
| 67 | MACHINE_DRIVER_EXTERN( cpu_c1581 ); |
| 64 | 68 | MACHINE_DRIVER_EXTERN( cpu_c2031 ); |
| 65 | | MACHINE_DRIVER_EXTERN( cpu_dolphin ); |
| 66 | 69 | MACHINE_DRIVER_EXTERN( cpu_c1551 ); |
| 67 | | MACHINE_DRIVER_EXTERN( cpu_c1571 ); |
| 68 | 70 | |
| 69 | | #define VC1540_ROM(cpu) \ |
| 70 | | ROM_REGION(0x10000,cpu,0) \ |
| 71 | | ROM_LOAD("325302.01", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11)) \ |
| 72 | | ROM_LOAD("325303.01", 0xe000, 0x2000, CRC(10b39158) SHA1(56dfe79b26f50af4e83fd9604857756d196516b9)) |
| 71 | // currently not used (hacked drive firmware with more RAM) |
| 72 | MACHINE_DRIVER_EXTERN( cpu_dolphin ); |
| 73 | 73 | |
| 74 | | #if 1 |
| 75 | | #define C2031_ROM(cpu) \ |
| 76 | | ROM_REGION(0x10000,cpu,0) \ |
| 77 | | ROM_LOAD("dos2031", 0xc000, 0x4000, CRC(21b80fdf) SHA1(c53e180a96649ceb3f421739e8dc66faba7cba44)) |
| 78 | | #else |
| 79 | | #define C2031_ROM(cpu) \ |
| 80 | | ROM_REGION(0x10000,cpu,0) \ |
| 81 | | ROM_LOAD("901484.03", 0xc000, 0x2000, CRC(ee4b893b) SHA1(54d608f7f07860f24186749f21c96724dd48bc50)) \ |
| 82 | | ROM_LOAD("901484.05", 0xe000, 0x2000, CRC(6a629054) SHA1(ec6b75ecfdd4744e5d57979ef6af990444c11ae1)) |
| 83 | | #endif |
| 84 | 74 | |
| 85 | | #if 1 |
| 86 | | #define VC1541_ROM(cpu) \ |
| 87 | | ROM_REGION(0x10000,cpu,0) \ |
| 88 | | ROM_LOAD("325302.01", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11)) \ |
| 89 | | ROM_LOAD("901229.05", 0xe000, 0x2000, CRC(361c9f37) SHA1(f5d60777440829e46dc91285e662ba072acd2d8b) ) |
| 90 | | #else |
| 91 | | /* for this I have the documented rom listing in german */ |
| 92 | | #define VC1541_ROM(cpu) \ |
| 93 | | ROM_REGION(0x10000,cpu,0) \ |
| 94 | | ROM_LOAD("325302.01", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11)) \ |
| 95 | | ROM_LOAD("901229.03", 0xe000, 0x2000, CRC(9126e74a) SHA1(03d17bd745066f1ead801c5183ac1d3af7809744)) |
| 96 | | #endif |
| 75 | /* IEC interface for c16 with c1551 */ |
| 97 | 76 | |
| 98 | | #define DOLPHIN_ROM(cpu) \ |
| 99 | | ROM_REGION(0x10000,cpu,0) \ |
| 100 | | ROM_LOAD("c1541.rom", 0xa000, 0x6000, CRC(bd8e42b2) SHA1(d6aff55fc70876fa72be45c666b6f42b92689b4d)) |
| 77 | /* To be passed directly to the drivers */ |
| 78 | WRITE8_DEVICE_HANDLER( c1551x_write_data ); |
| 79 | READ8_DEVICE_HANDLER( c1551x_read_data ); |
| 80 | WRITE8_DEVICE_HANDLER( c1551x_write_handshake ); |
| 81 | READ8_DEVICE_HANDLER( c1551x_read_handshake ); |
| 82 | READ8_DEVICE_HANDLER( c1551x_read_status ); |
| 101 | 83 | |
| 102 | | #define C1551_ROM(cpu) \ |
| 103 | | ROM_REGION(0x10000,cpu,0) \ |
| 104 | | ROM_LOAD("318008.01", 0xc000, 0x4000, CRC(6d16d024) SHA1(fae3c788ad9a6cc2dbdfbcf6c0264b2ca921d55e)) |
| 105 | 84 | |
| 106 | | #define C1570_ROM(cpu) \ |
| 107 | | ROM_REGION(0x10000,cpu,0) \ |
| 108 | | ROM_LOAD("315090.01", 0x8000, 0x8000, CRC(5a0c7937) SHA1(5fc06dc82ff6840f183bd43a4d9b8a16956b2f56)) |
| 85 | /* serial bus for vic20, c64 & c16 with vc1541 and some printer */ |
| 109 | 86 | |
| 110 | | #define C1571_ROM(cpu) \ |
| 111 | | ROM_REGION(0x10000,cpu,0) \ |
| 112 | | ROM_LOAD("310654.03", 0x8000, 0x8000, CRC(3889b8b8) SHA1(e649ef4419d65829d2afd65e07d31f3ce147d6eb)) |
| 87 | /* To be passed to serial bus emulation */ |
| 88 | void vc1541_serial_reset_write(running_machine *machine, int which, int level); |
| 89 | int vc1541_serial_atn_read(running_machine *machine, int which); |
| 90 | void vc1541_serial_atn_write(running_machine *machine, int which, int level); |
| 91 | int vc1541_serial_data_read(running_machine *machine, int which); |
| 92 | void vc1541_serial_data_write(running_machine *machine, int which, int level); |
| 93 | int vc1541_serial_clock_read(running_machine *machine, int which); |
| 94 | void vc1541_serial_clock_write(running_machine *machine, int which, int level); |
| 95 | int vc1541_serial_request_read(running_machine *machine, int which); |
| 96 | void vc1541_serial_request_write(running_machine *machine, int which, int level); |
| 113 | 97 | |
| 114 | | #if 0 |
| 115 | | ROM_LOAD("dos2040", 0x?000, 0x2000, CRC(d04c1fbb)) |
| 116 | 98 | |
| 117 | | ROM_LOAD("dos3040", 0x?000, 0x3000, CRC(f4967a7f)) |
| 118 | 99 | |
| 119 | | ROM_LOAD("dos4040", 0x?000, 0x3000, CRC(40e0ebaa)) |
| 100 | /* Floppy drive ROMs */ |
| 120 | 101 | |
| 121 | | ROM_LOAD("dos1001", 0xc000, 0x4000, CRC(87e6a94e)) |
| 102 | /**************************************************************************** |
| 122 | 103 | |
| 123 | | /* vc1541 drive hardware */ |
| 124 | | ROM_LOAD("dos2031", 0xc000, 0x4000, CRC(21b80fdf)) |
| 104 | Info from zimmers.net |
| 125 | 105 | |
| 126 | | ROM_LOAD("1540-c000.325302-01.bin", 0xc000, 0x2000, CRC(29ae9752)) |
| 127 | | ROM_LOAD("1540-e000.325303-01.bin", 0xe000, 0x2000, CRC(10b39158)) |
| 106 | 1551 Parts |
| 128 | 107 | |
| 129 | | ROM_LOAD("1541-e000.901229-01.bin", 0xe000, 0x2000, CRC(9a48d3f0)) |
| 130 | | ROM_LOAD("1541-e000.901229-02.bin", 0xe000, 0x2000, CRC(b29bab75)) |
| 131 | | ROM_LOAD("1541-e000.901229-03.bin", 0xe000, 0x2000, CRC(9126e74a)) |
| 132 | | ROM_LOAD("1541-e000.901229-05.bin", 0xe000, 0x2000, CRC(361c9f37)) |
| 108 | Location Part Number Description |
| 109 | U4 318008-01 23128 ROM DOS 2.6 C000-FFFF |
| 110 | U5 6116 2K x 8 Static RAM |
| 111 | U6 HD61J215P 42 pin Gate Array |
| 112 | U7 251829-01 64H157 20 pin Gate Array |
| 113 | U2 6510T CPU |
| 114 | U3 6525A TPI |
| 115 | U11 251853-01 R/W Hybrid |
| 133 | 116 | |
| 134 | | ROM_LOAD("1541-II.251968-03.bin", 0xe000, 0x2000, CRC(899fa3c5)) |
| 117 | Interface Cartridge: |
| 118 | U2 6523 Tri-Port Interface |
| 119 | U1 251641-03 82S100 PLA |
| 135 | 120 | |
| 136 | | ROM_LOAD("1541C.251968-01.bin", 0xc000, 0x4000, CRC(1b3ca08d)) |
| 137 | | ROM_LOAD("1541C.251968-02.bin", 0xc000, 0x4000, CRC(2d862d20)) |
| 121 | ****************************************************************************/ |
| 138 | 122 | |
| 139 | | ROM_LOAD("dos1541.c0", 0xc000, 0x2000, CRC(5b84bcef)) |
| 140 | | ROM_LOAD("dos1541.e0", 0xe000, 0x2000, CRC(2d8c1fde)) |
| 141 | | /* merged gives 0x899fa3c5 */ |
| 123 | #define C1551_ROM( cpu ) \ |
| 124 | ROM_REGION( 0x10000, cpu, 0 ) \ |
| 125 | ROM_LOAD( "318008-01.u4", 0xc000, 0x4000, CRC(6d16d024) SHA1(fae3c788ad9a6cc2dbdfbcf6c0264b2ca921d55e) ) |
| 142 | 126 | |
| 143 | | /* 0x29ae9752 and 0x361c9f37 merged */ |
| 144 | | ROM_LOAD("vc1541", 0xc000, 0x4000, CRC(57224cde)) |
| 145 | 127 | |
| 146 | | /* 0x29ae9752 and 0xb29bab75 merged */ |
| 147 | | ROM_LOAD("vc1541", 0xc000, 0x4000, CRC(d3a5789c)) |
| 148 | 128 | |
| 149 | | /* dolphin vc1541 */ |
| 150 | | ROM_LOAD("c1541.rom", 0xa000, 0x6000, CRC(bd8e42b2)) |
| 129 | /**************************************************************************** |
| 151 | 130 | |
| 152 | | ROM_LOAD("1551.318008-01.bin", 0xc000, 0x4000, CRC(6d16d024)) |
| 131 | Info from zimmers.net |
| 153 | 132 | |
| 154 | | /* bug fixes introduced bugs for 1541 mode |
| 155 | | jiffydos to have fixed 1571 and working 1541 mode */ |
| 156 | | ROM_LOAD("1570-rom.315090-01.bin", 0x8000, 0x8000, CRC(5a0c7937)) |
| 157 | | ROM_LOAD("1571-rom.310654-03.bin", 0x8000, 0x8000, CRC(3889b8b8)) |
| 158 | | ROM_LOAD("1571-rom.310654-05.bin", 0x8000, 0x8000, CRC(5755bae3)) |
| 159 | | ROM_LOAD("1571cr-rom.318047-01.bin", 0x8000, 0x8000, CRC(f24efcc4)) |
| 133 | 1540/1541/1541A/SX-64 Parts |
| 160 | 134 | |
| 161 | | ROM_LOAD("1581-rom.318045-01.bin", 0x8000, 0x8000, CRC(113af078)) |
| 162 | | ROM_LOAD("1581-rom.318045-02.bin", 0x8000, 0x8000, CRC(a9011b84)) |
| 163 | | ROM_LOAD("1581-rom.beta.bin", 0x8000, 0x8000, CRC(ecc223cd)) |
| 135 | Location Part Number Description |
| 136 | 2016 2K x 8 bit Static RAM (short board) |
| 137 | UA2-UB3 2114 (4) 1K x 4 bit Static RAM (long board) |
| 138 | 325302-01 2364-130 ROM DOS 2.6 C000-DFFF |
| 139 | 325303-01 2364-131 ROM DOS 2.6 (1540) E000-FFFF |
| 140 | 901229-01 2364-173 ROM DOS 2.6 (1541) E000-FFFF |
| 141 | 901229-03 2364-197 ROM DOS 2.6 rev. 1 E000-FFFF |
| 142 | 901229-05 2364 ROM DOS 2.6 rev. 2 E000-FFFF |
| 143 | 325572-01 64H105 40 pin Gate Array (short board) |
| 144 | 6502 CPU |
| 145 | 6522 (2) VIA |
| 146 | drive Alps DFB111M25A |
| 147 | drive Alps FDM2111-B2 |
| 148 | drive Newtronics D500 |
| 164 | 149 | |
| 165 | | /* modified drive 0x2000-0x3ffe ram, 0x3fff 6529 */ |
| 166 | | ROM_LOAD("1581rom5.bin", 0x8000, 0x8000, CRC(e08801d7)) |
| 150 | 1541B/1541C Parts |
| 167 | 151 | |
| 168 | | ROM_LOAD("", 0xc000, 0x4000, CRC()) |
| 169 | | #endif |
| 152 | Location Part Number Description |
| 153 | UA3 2016 2K x 8 bit Static RAM |
| 154 | UA2 251968-01 23128 ROM DOS 2.6 rev. 3 C000-FFFF |
| 155 | UA2 251968-01 27128 EPROM DOS 2.6 rev. 3 C000-FFFF |
| 156 | UC4 251828-02 64H156 42 pin Gate Array |
| 157 | UC5 251829-01 64H157 20 pin Gate Array |
| 158 | UC2 6502 CPU |
| 159 | UC1, UC3 6522 (2) CIA |
| 160 | UD1 * 251853-01 R/W Hybrid |
| 161 | UD1 * 251853-02 R/W Hybrid |
| 162 | drive Newtronics D500 |
| 163 | * Not interchangeable. |
| 170 | 164 | |
| 165 | 1541-II Parts |
| 171 | 166 | |
| 172 | | /* IEC interface for c16 with c1551 */ |
| 167 | Location Part Number Description |
| 168 | U5 2016-15 2K x 8 bit Static RAM |
| 169 | U12 SONY CX20185 R/W Amp. |
| 170 | U4 251968-03 16K ROM DOS 2.6 rev. 4 C000-FFFF |
| 171 | U10 251828-01 64H156 40 pin Gate Array |
| 172 | U3 6502A CPU |
| 173 | U6, U8 6522 (2) CIA |
| 174 | drive Chinon FZ-501M REV A |
| 175 | drive Digital System DS-50F |
| 176 | drive Newtronics D500 |
| 177 | drive Safronic DS-50F |
| 173 | 178 | |
| 174 | | /* To be passed directly to the drivers */ |
| 175 | | WRITE8_DEVICE_HANDLER( c1551x_write_data ); |
| 176 | | READ8_DEVICE_HANDLER( c1551x_read_data ); |
| 177 | | WRITE8_DEVICE_HANDLER( c1551x_write_handshake ); |
| 178 | | READ8_DEVICE_HANDLER( c1551x_read_handshake ); |
| 179 | | READ8_DEVICE_HANDLER( c1551x_read_status ); |
| 180 | 179 | |
| 181 | 180 | |
| 182 | | /* serial bus for vic20, c64 & c16 with vc1541 and some printer */ |
| 181 | Note: according to additional docs at zimmers.net, ROMs in these drive |
| 182 | were interchangeable: you could burn later revisions on EEPROM and put |
| 183 | them in older drives and they would work perfectly. |
| 183 | 184 | |
| 184 | | /* To be passed to serial bus emulation */ |
| 185 | | void vc1541_serial_reset_write(running_machine *machine, int which, int level); |
| 186 | | int vc1541_serial_atn_read(running_machine *machine, int which); |
| 187 | | void vc1541_serial_atn_write(running_machine *machine, int which, int level); |
| 188 | | int vc1541_serial_data_read(running_machine *machine, int which); |
| 189 | | void vc1541_serial_data_write(running_machine *machine, int which, int level); |
| 190 | | int vc1541_serial_clock_read(running_machine *machine, int which); |
| 191 | | void vc1541_serial_clock_write(running_machine *machine, int which, int level); |
| 192 | | int vc1541_serial_request_read(running_machine *machine, int which); |
| 193 | | void vc1541_serial_request_write(running_machine *machine, int which, int level); |
| 185 | ****************************************************************************/ |
| 194 | 186 | |
| 187 | // I'm not 100% sure about UA2/UB3 locations used below for ROM names |
| 188 | // I need a picture to confirm these, since the part listing above is not really clear (without a pic of the board) |
| 189 | #define VC1540_ROM( cpu ) \ |
| 190 | ROM_REGION( 0x10000, cpu, 0 ) \ |
| 191 | ROM_LOAD( "325302-01.ua2", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11) ) \ |
| 192 | ROM_LOAD( "325303-01.ub3", 0xe000, 0x2000, CRC(10b39158) SHA1(56dfe79b26f50af4e83fd9604857756d196516b9) ) |
| 195 | 193 | |
| 194 | /* |
| 195 | rev. 01 - It is believed to be the first revision of the 1541 firmware. The service manual says that this ROM |
| 196 | is for North America and Japan only. |
| 197 | rev. 02 - Second version of the 1541 firmware. The service manual says that this ROM was not available in North |
| 198 | America (Japan only?). |
| 199 | rev. 03 - It is said to be the first version that is usable in Europe (in the service manual?). |
| 200 | rev. 05 - From an old-style 1541 with short board. |
| 201 | rev. 06AA - From an old-style 1541 with short board. |
| 202 | */ |
| 203 | #define VC1541_ROM( cpu ) \ |
| 204 | ROM_REGION( 0x10000, cpu, 0 ) \ |
| 205 | ROM_SYSTEM_BIOS( 0, "rev1", "VC-1541 rev. 01" ) \ |
| 206 | ROMX_LOAD( "325302-01.ua2", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11), ROM_BIOS(1) ) \ |
| 207 | ROMX_LOAD( "901229-01.ub3", 0xe000, 0x2000, CRC(9a48d3f0) SHA1(7a1054c6156b51c25410caec0f609efb079d3a77), ROM_BIOS(1) ) \ |
| 208 | ROM_SYSTEM_BIOS( 1, "rev2", "VC-1541 rev. 02" ) \ |
| 209 | ROMX_LOAD( "325302-01.ua2", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11), ROM_BIOS(2) ) \ |
| 210 | ROMX_LOAD( "901229-02.ub3", 0xe000, 0x2000, CRC(b29bab75) SHA1(91321142e226168b1139c30c83896933f317d000), ROM_BIOS(2) ) \ |
| 211 | ROM_SYSTEM_BIOS( 2, "rev3", "VC-1541 rev. 03" ) \ |
| 212 | ROMX_LOAD( "325302-01.ua2", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11), ROM_BIOS(3) ) \ |
| 213 | ROMX_LOAD( "901229-03.ub3", 0xe000, 0x2000, CRC(9126e74a) SHA1(03d17bd745066f1ead801c5183ac1d3af7809744), ROM_BIOS(3) ) \ |
| 214 | ROM_SYSTEM_BIOS( 3, "rev5", "VC-1541 rev. 05" ) \ |
| 215 | ROMX_LOAD( "325302-01.ua2", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11), ROM_BIOS(4) ) \ |
| 216 | ROMX_LOAD( "901229-05.ub3", 0xe000, 0x2000, CRC(361c9f37) SHA1(f5d60777440829e46dc91285e662ba072acd2d8b), ROM_BIOS(4) ) \ |
| 217 | ROM_SYSTEM_BIOS( 4, "rev6aa", "VC-1541 rev. 06AA" ) \ |
| 218 | ROMX_LOAD( "325302-01.ua2", 0xc000, 0x2000, CRC(29ae9752) SHA1(8e0547430135ba462525c224e76356bd3d430f11), ROM_BIOS(5) ) \ |
| 219 | ROMX_LOAD( "901229-06aa.ub3", 0xe000, 0x2000, CRC(3a235039) SHA1(c7f94f4f51d6de4cdc21ecbb7e57bb209f0530c0), ROM_BIOS(5) ) \ |
| 220 | ROM_SYSTEM_BIOS( 5, "rev1c", "VC-1541C rev. 01" ) \ |
| 221 | ROMX_LOAD( "251968-01.ua2", 0xc000, 0x4000, CRC(1b3ca08d) SHA1(8e893932de8cce244117fcea4c46b7c39c6a7765), ROM_BIOS(6) ) \ |
| 222 | ROM_SYSTEM_BIOS( 6, "rev2c", "VC-1541C rev. 02" ) \ |
| 223 | ROMX_LOAD( "251968-02.ua2", 0xc000, 0x4000, CRC(2d862d20) SHA1(38a7a489c7bbc8661cf63476bf1eb07b38b1c704), ROM_BIOS(7) ) \ |
| 224 | ROM_SYSTEM_BIOS( 7, "rev3ii", "VC-1541-II" ) \ |
| 225 | ROMX_LOAD( "251968-03.u4", 0xc000, 0x4000, CRC(899fa3c5) SHA1(d3b78c3dbac55f5199f33f3fe0036439811f7fb3), ROM_BIOS(8) ) \ |
| 226 | ROM_SYSTEM_BIOS( 8, "reviin", "VC-1541-II (with Newtronics D500)" ) \ |
| 227 | ROMX_LOAD( "355640-01.u4", 0xc000, 0x4000, CRC(57224cde) SHA1(ab16f56989b27d89babe5f89c5a8cb3da71a82f0), ROM_BIOS(9) ) \ |
| 228 | |
| 229 | |
| 230 | |
| 231 | // currently not used (hacked drive firmware with more RAM) |
| 232 | #define DOLPHIN_ROM( cpu ) \ |
| 233 | ROM_REGION( 0x10000, cpu, 0 ) \ |
| 234 | ROM_LOAD( "c1541.rom", 0xa000, 0x6000, CRC(bd8e42b2) SHA1(d6aff55fc70876fa72be45c666b6f42b92689b4d) ) |
| 235 | |
| 236 | |
| 237 | |
| 238 | /**************************************************************************** |
| 239 | |
| 240 | Info from zimmers.net |
| 241 | |
| 242 | 1570 Parts |
| 243 | |
| 244 | Location Part Number Description |
| 245 | 315090-01 32K ROM DOS 3.0 |
| 246 | drive Alps |
| 247 | |
| 248 | 1571 Parts |
| 249 | |
| 250 | Location Part Number Description |
| 251 | U11 WD1770 FDC |
| 252 | U11 WD1772 FDC |
| 253 | U3 2016-20 2K x 8 bit Static RAM |
| 254 | U1 6502A CPU |
| 255 | U4, U9 65C22A (2) CIA |
| 256 | U20 6526A CIA |
| 257 | U20 8520 CIA |
| 258 | U6 251828-01 64H156 40 pin Gate Array |
| 259 | U5 251829-01 64H157 20 pin Gate Array |
| 260 | U7 251853-01 R/W Hybrid |
| 261 | U2 310654-03 23256 ROM DOS 3.0 |
| 262 | U2 310654-05 32K ROM DOS 3.0 rev. |
| 263 | drive Alps |
| 264 | drive Newtronics D502 |
| 265 | |
| 266 | C128D Parts |
| 267 | |
| 268 | Location Part Number Description |
| 269 | U103 2016-20 2K x 8 bit Static RAM |
| 270 | U108 252308-01 MC2871A R/W Amp. |
| 271 | U107 252371-01 MOS5710 FDC and Gate Array |
| 272 | U101 6502A CPU |
| 273 | U104, U106 65C22 (2) CIA |
| 274 | U105 251828-01 64H156 40 pin Gate Array |
| 275 | U102 318047-01 23256 ROM DOS 3.1 |
| 276 | drive Newtronics D502 |
| 277 | |
| 278 | |
| 279 | ****************************************************************************/ |
| 280 | |
| 281 | // no locations available for this, I need a picture of the board |
| 282 | // currently, we add 1570 to 1571, to preserve the firmware. |
| 283 | // this will be used later, when proper drives will be added to each system |
| 284 | #define C1570_ROM( cpu ) \ |
| 285 | ROM_REGION( 0x10000, cpu, 0) \ |
| 286 | ROM_LOAD( "315090-01.bin", 0x8000, 0x8000, CRC(5a0c7937) SHA1(5fc06dc82ff6840f183bd43a4d9b8a16956b2f56) ) |
| 287 | |
| 288 | |
| 289 | #define C1571_ROM( cpu ) \ |
| 290 | ROM_REGION( 0x10000, cpu, 0 ) \ |
| 291 | ROM_SYSTEM_BIOS( 0, "rev5", "1571 rev. 05" ) \ |
| 292 | ROMX_LOAD( "310654-05.u2", 0x8000, 0x8000, CRC(5755bae3) SHA1(f1be619c106641a685f6609e4d43d6fc9eac1e70), ROM_BIOS(1) ) \ |
| 293 | ROM_SYSTEM_BIOS( 1, "rev3", "1571 rev. 03" ) \ |
| 294 | ROMX_LOAD( "310654-03.u2", 0x8000, 0x8000, CRC(3889b8b8) SHA1(e649ef4419d65829d2afd65e07d31f3ce147d6eb), ROM_BIOS(2) ) \ |
| 295 | /* This should not be here... */ \ |
| 296 | ROM_SYSTEM_BIOS( 2, "1570", "1570" ) \ |
| 297 | ROMX_LOAD( "315090-01.bin", 0x8000, 0x8000, CRC(5a0c7937) SHA1(5fc06dc82ff6840f183bd43a4d9b8a16956b2f56), ROM_BIOS(3) ) |
| 298 | |
| 299 | |
| 300 | #define C1571CR_ROM( cpu ) \ |
| 301 | ROM_REGION( 0x10000, cpu, 0) \ |
| 302 | ROM_LOAD( "318047-01.u102", 0x8000, 0x8000, CRC(f24efcc4) SHA1(14ee7a0fb7e1c59c51fbf781f944387037daa3ee) ) |
| 303 | |
| 304 | |
| 305 | // no locations available for this, I need a picture of the board |
| 306 | /* |
| 307 | rev. 01 - First revision of 1581 firmware |
| 308 | rev. 02 - Second revision of 1581 firmware |
| 309 | beta - Probably a beta version |
| 310 | 1563 - This comes from a prototype unit of the so-called c128d/81 (a c128d with built-in 1581 drive). |
| 311 | Despite the label, is a 1581 firmaware |
| 312 | */ |
| 313 | #define C1581_ROM( cpu ) \ |
| 314 | ROM_REGION( 0x10000, cpu, 0 ) \ |
| 315 | ROM_SYSTEM_BIOS( 0, "rev2", "1581 rev. 02" ) \ |
| 316 | ROMX_LOAD( "318045-02.bin", 0x8000, 0x8000, CRC(a9011b84) SHA1(01228eae6f066bd9b7b2b6a7fa3f667e41dad393), ROM_BIOS(1) ) \ |
| 317 | ROM_SYSTEM_BIOS( 1, "rev1", "1581 rev. 01" ) \ |
| 318 | ROMX_LOAD( "318045-01.bin", 0x8000, 0x8000, CRC(113af078) SHA1(3fc088349ab83e8f5948b7670c866a3c954e6164), ROM_BIOS(2) ) \ |
| 319 | ROM_SYSTEM_BIOS( 2, "beta", "1581 beta?" ) \ |
| 320 | ROMX_LOAD( "1581-beta.bin", 0x8000, 0x8000, CRC(ecc223cd) SHA1(a331d0d46ead1f0275b4ca594f87c6694d9d9594), ROM_BIOS(3) ) \ |
| 321 | ROM_SYSTEM_BIOS( 3, "1563", "1563 (from C128D/81)" ) \ |
| 322 | ROMX_LOAD( "1563.bin", 0x8000, 0x8000, CRC(1d184687) SHA1(2c5111a9c15be7b7955f6c8775fea25ec10c0ca0), ROM_BIOS(4) ) |
| 323 | |
| 324 | |
| 325 | |
| 326 | /* Older drive - currently these are only added as documentation (no driver uses them yet) */ |
| 327 | /* They all use IEEE-448 connector */ |
| 328 | |
| 329 | /**************************************************************************** |
| 330 | |
| 331 | Info from zimmers.net |
| 332 | |
| 333 | 2031 Parts |
| 334 | |
| 335 | Location Part Number Description |
| 336 | UB2 2016 2K x 8 bit static RAM (HP) |
| 337 | U3B-U3E 2114 (4) 1K x 4 bit static RAM (LP) |
| 338 | 901484-03 2364-107 ROM DOS 2.6 C000-DFFF |
| 339 | 901484-05 2364-123 ROM DOS 2.6 E000-FFFF |
| 340 | 6502 CPU |
| 341 | 6522 (2) VIA |
| 342 | drive Alps DFB111M25A (LP) |
| 343 | drive Alps FDM2111-B2 (LP) |
| 344 | drive Shugart 390 (HP) |
| 345 | |
| 346 | ****************************************************************************/ |
| 347 | |
| 348 | // I'm not 100% sure about U3B/U3E locations used below for ROM names |
| 349 | // I need a picture to confirm these, since the part listing above is not really clear (without a pic of the board) |
| 350 | #define C2031_ROM( cpu ) \ |
| 351 | ROM_REGION( 0x10000, cpu, 0 ) \ |
| 352 | ROM_LOAD( "901484-03.u3b", 0xc000, 0x2000, CRC(ee4b893b) SHA1(54d608f7f07860f24186749f21c96724dd48bc50) ) \ |
| 353 | ROM_LOAD( "901484-05.u3e", 0xe000, 0x2000, CRC(6a629054) SHA1(ec6b75ecfdd4744e5d57979ef6af990444c11ae1) ) |
| 354 | |
| 355 | |
| 356 | |
| 357 | /**************************************************************************** |
| 358 | |
| 359 | Info from zimmers.net |
| 360 | |
| 361 | SFD-1001 Parts |
| 362 | |
| 363 | Location Part Number Description |
| 364 | 7G, 9G 2116 (2) 2K x 8 static RAM |
| 365 | |
| 366 | DOS: |
| 367 | 1J 901887-01 2364 ROM DOS 2.7 C000-DFFF |
| 368 | 3J 901887-02 2364 ROM DOS 2.7 E000-FFFF |
| 369 | 3J 901888-01 2364 ROM DOS 2.7 E000-FFFF |
| 370 | 2H 6502 CPU |
| 371 | 4J, 6J 6532 (2) RIOT |
| 372 | |
| 373 | Controller: |
| 374 | 5C 901467-01 6316-017 ROM GCR |
| 375 | 1E 6502 CPU |
| 376 | 5E 6522 VIA |
| 377 | 3E 251232 adapter board |
| 378 | drive Matsushita JU-570-2 |
| 379 | |
| 380 | Adapter Board: |
| 381 | U2 251257-02A 2716 EPROM controller |
| 382 | U1 6530 RIOT (ROM disabled) |
| 383 | |
| 384 | |
| 385 | Notes: The DOS 2.7 ROM in SFD-1001 is the same as in 8250 drives. Differences: |
| 386 | |
| 387 | CBM 8050 - dual 5" 1/4 floppy drive, disks are written on one side |
| 388 | with double density |
| 389 | CBM 8250 / 8250LP - dual 5.25" 1/4 floppy drive, disks are written |
| 390 | on both sides. it reads 8050-disks, LP version has smaller case |
| 391 | SFD-1001 - single 5" 1/4 floppy drive, same as CBM 8250LP, but only |
| 392 | one drive and 1541-case |
| 393 | |
| 394 | ****************************************************************************/ |
| 395 | |
| 396 | #define SFD1001_ROM( cpu ) \ |
| 397 | ROM_REGION( 0x10800, cpu, 0 ) \ |
| 398 | ROM_LOAD( "901887-01.1j", 0xc000, 0x2000, CRC(0073b8b2) ) \ |
| 399 | ROM_LOAD( "901888-01.3j", 0xe000, 0x2000, CRC(de9b6132) ) \ |
| 400 | ROM_LOAD( "251257-02a.u2", 0x10000, 0x800, CRC(b51150de) ) /* Floppy Disc Controller */ |
| 401 | |
| 402 | |
| 403 | #define C8250_ROM( cpu ) \ |
| 404 | ROM_REGION( 0x10000, cpu, 0 ) |
| 405 | |
| 406 | // still to be sorted out |
| 407 | |
| 408 | /**************************************************************************** |
| 409 | |
| 410 | Info from zimmers.net |
| 411 | |
| 412 | 2040/3040/4040 Parts |
| 413 | |
| 414 | Location Part Number Description |
| 415 | UC4-UF5 2114 (8) 1K x 4 bit static RAM |
| 416 | |
| 417 | DOS: |
| 418 | UL1 901468-06 2332-020 ROM DOS 1 E000-EFFF |
| 419 | UH1 901468-07 2332-021 ROM DOS 1 F000-FFFF |
| 420 | UJ1 901468-11 2332 ROM DOS 2 D000-DFFF |
| 421 | UL1 901468-12 2332 ROM DOS 2 E000-EFFF |
| 422 | UH1 901468-13 2332 ROM DOS 2 F000-FFFF |
| 423 | UJ1 901468-14 2332-191 ROM DOS 2 rev. D000-DFFF |
| 424 | UL1 901468-15 2332-192 ROM DOS 2 rev. E000-EFFF |
| 425 | UH1 901468-16 2332-193 ROM DOS 2 rev. F000-FFFF |
| 426 | UN1 6502 CPU |
| 427 | UC1, UE1 6532 (2) RIOT |
| 428 | |
| 429 | Controller: |
| 430 | UH3 6504 CPU |
| 431 | UM3 6522 VIA |
| 432 | UK3 901466-02 6530-028 RIOT DOS 1 |
| 433 | UK3 901466-04 6530-034 RIOT DOS 2 |
| 434 | UK6 901467-01 6316-017 ROM GCR |
| 435 | drive Shugart 390 |
| 436 | |
| 437 | ****************************************************************************/ |
| 438 | |
| 439 | #define C4040_ROM( cpu ) \ |
| 440 | ROM_REGION( 0x10000, cpu, 0 ) |
| 441 | |
| 442 | // still to be sorted out |
| 443 | |
| 444 | |
| 445 | /**************************************************************************** |
| 446 | |
| 447 | Info from zimmers.net |
| 448 | |
| 449 | 9060/9090 Parts |
| 450 | |
| 451 | Location Part Number Description |
| 452 | 5A-5H 2114 (8) 1K x 4 bit Static RAM |
| 453 | |
| 454 | DOS: |
| 455 | 7C 300516-002 * 2564 EPROM DOS 3.0 C000-DFFF (rev. B) |
| 456 | 7D 300517-002 * 2564 EPROM DOS 3.0 E000-FFFF (rev. B) |
| 457 | 7C 300516-001 + 2764 EPROM DOS 3.0 C000-DFFF (rev. B) |
| 458 | 7D 300517-001 + 2764 EPROM DOS 3.0 E000-FFFF (rev. B) |
| 459 | 7C 300516 * 2564 EPROM DOS 3.0 rev. C000-DFFF (rev. C) |
| 460 | 7D 300517 * 2564 EPROM DOS 3.0 rev. E000-FFFF (rev. C) |
| 461 | 7C 300516 + 2764 EPROM DOS 3.0 rev. C000-DFFF (rev. C) |
| 462 | 7D 300517 + 2764 EPROM DOS 3.0 rev. E000-FFFF (rev. C) |
| 463 | 7E 6502 CPU |
| 464 | 7F, 7G 6532 (2) RIOT |
| 465 | * 2564 are used on PCB 300012-001 |
| 466 | + 2764 are used on PCB 230012-002 |
| 467 | |
| 468 | Controller: |
| 469 | 4C 300515 2716 EPROM DOS 3.0 (rev. A) |
| 470 | 4C 300515-001 2716 EPROM DOS 3.0 (rev. B) |
| 471 | 4A 6502 CPU |
| 472 | 4B 6522 VIA |
| 473 | 4D 6810 128 x 8 bit Static RAM |
| 474 | |
| 475 | Winchester Controller: |
| 476 | 9D Am2910 12 bit Bit/Slice Controller |
| 477 | drive Tandon TM602S (9060) |
| 478 | drive Tandon TM603S (9090) |
| 479 | |
| 480 | |
| 481 | Note: The Commodore D9060 and D9090 can use the same firmware. The |
| 482 | difference between these units is that the jumper J14 on the DOS board |
| 483 | is open in the D9060, and closed in the D9090 to select a 4-head vs. |
| 484 | 6-head drive. The jumper J13 seems to be unused. |
| 485 | |
| 486 | ****************************************************************************/ |
| 487 | |
| 488 | #define D9090_ROM( cpu ) \ |
| 489 | ROM_REGION( 0x10800, cpu, 0 ) \ |
| 490 | ROM_SYSTEM_BIOS( 0, "reva", "D9090 rev. A" ) \ |
| 491 | ROMX_LOAD( "300516-revb.7c", 0xc000, 0x2000, CRC(2d758a14), ROM_BIOS(1) ) /* No Rev A available for this! */ \ |
| 492 | ROMX_LOAD( "300517-reva.7d", 0xe000, 0x2000, CRC(566df630), ROM_BIOS(1) ) \ |
| 493 | ROMX_LOAD( "300515-reva.4c", 0x10000, 0x800, CRC(99e096f7), ROM_BIOS(1) ) /* Floppy Disc Controller Rev. A - label "300515 Rev A" */ \ |
| 494 | ROM_SYSTEM_BIOS( 1, "revb", "D9090 rev. B" ) \ |
| 495 | ROMX_LOAD( "300516-revb.7c", 0xc000, 0x2000, CRC(2d758a14), ROM_BIOS(2) ) \ |
| 496 | ROMX_LOAD( "300517-revb.7d", 0xe000, 0x2000, CRC(f0382bc3), ROM_BIOS(2) ) \ |
| 497 | ROMX_LOAD( "300515-revb.4c", 0x10000, 0x800, CRC(49adf4fb), ROM_BIOS(2) ) /* Floppy Disc Controller Rev. B - label "300515 Rev B" or "300515-001" */ \ |
| 498 | ROM_SYSTEM_BIOS( 2, "revc", "D9090 rev. C" ) \ |
| 499 | ROMX_LOAD( "300516-revc.7c", 0xc000, 0x2000, CRC(d6a3e88f), ROM_BIOS(3) ) \ |
| 500 | ROMX_LOAD( "300517-revc.7d", 0xe000, 0x2000, CRC(2a9ad4ad), ROM_BIOS(3) ) \ |
| 501 | ROMX_LOAD( "300515-revb.4c", 0x10000, 0x800, CRC(49adf4fb), ROM_BIOS(3) ) /* Floppy Disc Controller Rev. B - label "300515 Rev B" or "300515-001" */ |
| 502 | |
| 503 | |
| 504 | /**************************************************************************** |
| 505 | |
| 506 | Dual 8" floppy drive. Related to any other drive? What about 8060? |
| 507 | |
| 508 | ****************************************************************************/ |
| 509 | |
| 510 | #define C8280_ROM( cpu ) \ |
| 511 | ROM_REGION( 0x10800, cpu, 0 ) \ |
| 512 | ROM_LOAD( "300542-001.bin", 0xc000, 0x2000, CRC(3c6eee1e) ) \ |
| 513 | ROM_LOAD( "300543-001.bin", 0xe000, 0x2000, CRC(f58e665e) ) \ |
| 514 | ROM_LOAD( "300541-001.bin", 0x10000, 0x800, CRC(cb07b2db) ) /* GCR encoding/decoding tables? */ |
| 515 | |
| 516 | |
| 517 | |
| 518 | #if 0 |
| 519 | ROM_LOAD("dos2040", 0x?000, 0x2000, CRC(d04c1fbb)) |
| 520 | |
| 521 | ROM_LOAD("dos3040", 0x?000, 0x3000, CRC(f4967a7f)) |
| 522 | |
| 523 | ROM_LOAD("dos4040", 0x?000, 0x3000, CRC(40e0ebaa)) |
| 524 | |
| 525 | ROM_LOAD("dos1001", 0xc000, 0x4000, CRC(87e6a94e)) |
| 526 | |
| 527 | /* dolphin vc1541 */ |
| 528 | ROM_LOAD("c1541.rom", 0xa000, 0x6000, CRC(bd8e42b2)) |
| 529 | |
| 530 | /* modified drive 0x2000-0x3ffe ram, 0x3fff 6529 */ |
| 531 | ROM_LOAD("1581rom5.bin", 0x8000, 0x8000, CRC(e08801d7)) |
| 532 | |
| 533 | ROM_LOAD("", 0xc000, 0x4000, CRC()) |
| 534 | #endif |
| 535 | |
| 196 | 536 | #endif /* VC1541_H_ */ |
src/mess/machine/vc1541.c
| r4790 | r4791 | |
| 111 | 111 | disk image handling... |
| 112 | 112 | |
| 113 | 113 | Current status: |
| 114 | | + preliminary vc1541 & c1551 implementation (seems very slow) |
| 114 | + preliminary vc1541 & c1551 implementation (quite slow, especially |
| 115 | if you turn on logging) |
| 115 | 116 | + no support for other drive types (even if now I list all |
| 116 | 117 | the variants supported by Vice in the enum) |
| 117 | 118 | + communications between the drive CPU and the computer CPU have |
| 118 | | to be checked, debugged and improved |
| 119 | to be checked, debugged and improved: somehow it works, but no |
| 120 | sync bit is set (encoding bug? timers-related bug?) and the drive |
| 121 | keeps reading beyond the end of the track (synchronization |
| 122 | problems?) |
| 119 | 123 | + all but .g64 images should be correctly encoded at loading time |
| 120 | 124 | (I actually have doubts about some .d82 details) |
| 121 | 125 | + error maps are not still used, even if their presence is |
| 122 | 126 | acknowledged |
| 123 | | + the floppy handling still uses CBM_Drive_Emu struct instead of |
| 124 | | functions similar to other floppy formats |
| 127 | + floppy drives should become devices and use ROMREGION_LOADBYNAME |
| 128 | for their ROMs (not the current defines) |
| 129 | + all available drive dumps are included for each systems using it |
| 130 | (vc1541 = sx64, vip64, c16v, plus4v; vc1571 = c128d; vc1571cr = c128dcr; |
| 131 | vc1581 = c128d81; vc1540 = vc20v, vic20plv; c2031 = vc20i (only dumps added); |
| 132 | c1551 = c16c, plus4c). this is only a temporary workaround to document |
| 133 | available dumps. correct revisions will be used with each systems when |
| 134 | emulation works (or 'default' bios will be used for most common |
| 135 | configurations, when machines were compatible with more than a single |
| 136 | drive model) |
| 125 | 137 | */ |
| 126 | 138 | /* |
| 127 | 139 | Informations on the fileformats (which the code is based on) |
| r4790 | r4791 | |
| 200 | 212 | const char *cputag; |
| 201 | 213 | int type; |
| 202 | 214 | |
| 203 | | struct { |
| 204 | | int deviceid; |
| 205 | | int serial_atn, serial_clock, serial_data; |
| 206 | | int acka, data; |
| 207 | | } vc1541_serial; |
| 208 | | |
| 209 | | int via0irq, via1irq; |
| 210 | | |
| 211 | 215 | int led, motor, frequency; |
| 212 | 216 | |
| 213 | 217 | double track; |
| 214 | 218 | int clock; |
| 215 | | int pos; // from the beginning of the current track! |
| 219 | int start_pos, pos; // start_pos = start of half track ; pos = position from the beginning of the current half-track! |
| 216 | 220 | |
| 217 | 221 | void *timer; |
| 218 | 222 | |
| 219 | 223 | GCR_data gcr; |
| 220 | 224 | |
| 225 | /* vc1541 specific */ |
| 226 | struct { |
| 227 | int deviceid; |
| 228 | int serial_atn, serial_clock, serial_data; |
| 229 | int acka, data; |
| 230 | } vc1541_serial; |
| 231 | |
| 232 | int via0irq, via1irq; |
| 233 | |
| 221 | 234 | } vc1541_drive_emu; |
| 222 | 235 | |
| 223 | 236 | typedef struct |
| 224 | 237 | { |
| 225 | 238 | const char *cputag; |
| 239 | int type; |
| 226 | 240 | |
| 227 | | UINT8 cpu_ddr, cpu_port; |
| 228 | | void *irq_timer; |
| 241 | int led, motor, frequency; |
| 229 | 242 | |
| 230 | | int led, motor, frequency; |
| 231 | 243 | double track; |
| 232 | | int pos; // from the beginning of the current track! |
| 244 | int clock; |
| 245 | int start_pos, pos; // start_pos = start of half track ; pos = position from the beginning of the current half-track! |
| 246 | |
| 233 | 247 | void *timer; |
| 234 | 248 | |
| 235 | 249 | GCR_data gcr; |
| 236 | 250 | |
| 251 | /* c1551 specific */ |
| 252 | UINT8 cpu_ddr, cpu_port; |
| 253 | void *irq_timer; |
| 254 | |
| 237 | 255 | } c1551_drive_emu; |
| 238 | 256 | |
| 239 | 257 | static vc1541_drive_emu vc1541_drive_static = { 0 }, *vc1541_drive = &vc1541_drive_static; |
| 240 | 258 | static c1551_drive_emu c1551_drive_static = { 0 }, *c1551_drive = &c1551_drive_static; |
| 241 | 259 | |
| 242 | 260 | |
| 243 | | |
| 244 | 261 | /******************************************* |
| 245 | 262 | |
| 246 | 263 | Format specific code |
| r4790 | r4791 | |
| 329 | 346 | }; |
| 330 | 347 | |
| 331 | 348 | static int image_offset[IMAGE_MAX_TRACKS] = { 0 }; |
| 349 | static int gcr_offset[IMAGE_MAX_TRACKS] = { 0 }; |
| 332 | 350 | |
| 333 | | |
| 334 | 351 | /******************************************* |
| 335 | 352 | |
| 336 | 353 | Offset initialization |
| 337 | 354 | |
| 338 | 355 | *******************************************/ |
| 339 | 356 | |
| 340 | | |
| 341 | | static void offset_init (int format) |
| 357 | /* This is twice useful: with length = 256, it allows to determine the starting offset of each |
| 358 | track in the .d64 image; with length = 368, it allows to determine the starting offset of each |
| 359 | track in the GCR encoded image */ |
| 360 | static void offset_init( int format, int *offset_list, int length ) |
| 342 | 361 | { |
| 343 | 362 | int i; |
| 344 | 363 | |
| 345 | | /* Track # starts from 1 */ |
| 346 | | image_offset[0] = 0; |
| 364 | /* Track # starts from 1, hence Track k will start at image_offset[k-1] */ |
| 365 | offset_list[0] = 0; |
| 347 | 366 | |
| 348 | 367 | switch (format) |
| 349 | 368 | { |
| r4790 | r4791 | |
| 351 | 370 | case format_d64_err: |
| 352 | 371 | case format_d67: |
| 353 | 372 | for (i = 1; i < D64_MAX_TRACKS; i++) |
| 354 | | image_offset[i] = image_offset[i - 1] + d64_sectors_per_track[i - 1] * 256; |
| 373 | offset_list[i] = offset_list[i - 1] + d64_sectors_per_track[i - 1] * length; |
| 355 | 374 | break; |
| 356 | 375 | |
| 357 | 376 | case format_d64_40t: |
| 358 | 377 | case format_d64_40t_err: |
| 359 | 378 | for (i = 1; i < D64_40T_MAX_TRACKS; i++) |
| 360 | | image_offset[i] = image_offset[i - 1] + d64_sectors_per_track[i - 1] * 256; |
| 379 | offset_list[i] = offset_list[i - 1] + d64_sectors_per_track[i - 1] * length; |
| 361 | 380 | break; |
| 362 | 381 | |
| 363 | 382 | case format_d71: |
| 364 | 383 | case format_d71_err: |
| 365 | 384 | for (i = 1; i < D71_MAX_TRACKS; i++) |
| 366 | | image_offset[i] = image_offset[i - 1] + d71_sectors_per_track[i - 1] * 256; |
| 385 | offset_list[i] = offset_list[i - 1] + d71_sectors_per_track[i - 1] * length; |
| 367 | 386 | break; |
| 368 | 387 | |
| 369 | 388 | case format_d81: |
| 370 | 389 | for (i = 1; i < D81_MAX_TRACKS; i++) |
| 371 | | image_offset[i] = image_offset[i - 1] + 40 * 256; |
| 390 | offset_list[i] = offset_list[i - 1] + 40 * length; |
| 372 | 391 | break; |
| 373 | 392 | |
| 374 | 393 | case format_d80: |
| 375 | 394 | for (i = 1; i < D80_MAX_TRACKS; i++) |
| 376 | | image_offset[i] = image_offset[i - 1] + d80_sectors_per_track[i - 1] * 256; |
| 395 | offset_list[i] = offset_list[i - 1] + d80_sectors_per_track[i - 1] * length; |
| 377 | 396 | break; |
| 378 | 397 | |
| 379 | 398 | case format_d82: |
| 380 | 399 | for (i = 1; i < D82_MAX_TRACKS; i++) |
| 381 | | image_offset[i] = image_offset[i - 1] + d82_sectors_per_track[i - 1] * 256; |
| 400 | offset_list[i] = offset_list[i - 1] + d82_sectors_per_track[i - 1] * length; |
| 382 | 401 | break; |
| 383 | 402 | |
| 384 | 403 | default: |
| r4790 | r4791 | |
| 587 | 606 | |
| 588 | 607 | /************************************** |
| 589 | 608 | |
| 590 | | 1541 / 1541II |
| 609 | Drive timers (aka floppy reading) |
| 591 | 610 | |
| 592 | 611 | **************************************/ |
| 593 | 612 | |
| 613 | static TIMER_CALLBACK(vc1541_drive_timer) |
| 614 | { |
| 615 | const device_config *via_1 = devtag_get_device(machine, "_1541_via_1"); |
| 594 | 616 | |
| 595 | | static ADDRESS_MAP_START( _1541_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 596 | | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 597 | | AM_RANGE(0x1800, 0x180f) AM_DEVREADWRITE("_1541_via_0", via_r, via_w) /* 0 and 1 used in vc20 */ // IEC Bus |
| 598 | | // AM_RANGE(0x1810, 0x189f) AM_READ(SMH_NOP) /* for debugger */ |
| 599 | | AM_RANGE(0x1c00, 0x1c0f) AM_DEVREADWRITE("_1541_via_1", via_r, via_w) // Drive |
| 600 | | // AM_RANGE(0x1c10, 0x1c9f) AM_READ(SMH_NOP) /* for debugger */ |
| 601 | | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 602 | | ADDRESS_MAP_END |
| 603 | | |
| 604 | | |
| 605 | | static ADDRESS_MAP_START( dolphin_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 606 | | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 607 | | AM_RANGE(0x1800, 0x180f) AM_DEVREADWRITE("_1541_via_0", via_r, via_w) /* 0 and 1 used in vc20 */ |
| 608 | | AM_RANGE(0x1c00, 0x1c0f) AM_DEVREADWRITE("_1541_via_1", via_r, via_w) |
| 609 | | AM_RANGE(0x8000, 0x9fff) AM_RAM |
| 610 | | AM_RANGE(0xa000, 0xffff) AM_ROM |
| 611 | | ADDRESS_MAP_END |
| 612 | | |
| 613 | | |
| 614 | | static TIMER_CALLBACK(drive_timer) |
| 615 | | { |
| 616 | 617 | if (vc1541_drive->clock == 0) |
| 617 | 618 | { |
| 618 | 619 | vc1541_drive->gcr.ready = 0; |
| r4790 | r4791 | |
| 620 | 621 | // or is it the way the serial port reads the sync count?!? |
| 621 | 622 | vc1541_drive->gcr.sync = 0; |
| 622 | 623 | |
| 623 | | if (vc1541_drive->type == type_1541) |
| 624 | | { |
| 625 | | const device_config *via_1 = devtag_get_device(machine, "_1541_via_1"); |
| 624 | cputag_set_input_line(machine, vc1541_drive->cputag, M6502_SET_OVERFLOW, 1); |
| 625 | via_ca1_w(via_1, 0, 1); |
| 626 | 626 | |
| 627 | | cputag_set_input_line(machine, vc1541_drive->cputag, M6502_SET_OVERFLOW, 1); |
| 628 | | via_ca1_w(via_1, 0, 1); |
| 629 | | } |
| 630 | | |
| 631 | 627 | vc1541_drive->clock = 1; |
| 632 | 628 | return; |
| 633 | 629 | } |
| r4790 | r4791 | |
| 658 | 654 | vc1541_drive->gcr.sync = 0; |
| 659 | 655 | } |
| 660 | 656 | |
| 661 | | if (vc1541_drive->type == type_1541) |
| 657 | cputag_set_input_line(machine, vc1541_drive->cputag, M6502_SET_OVERFLOW, 0); |
| 658 | via_ca1_w(via_1, 0, 0); |
| 659 | |
| 660 | vc1541_drive->clock = 0; |
| 661 | } |
| 662 | |
| 663 | static TIMER_CALLBACK(c1551_drive_timer) |
| 664 | { |
| 665 | if (c1551_drive->clock == 0) |
| 662 | 666 | { |
| 663 | | const device_config *via_1 = devtag_get_device(machine, "_1541_via_1"); |
| 664 | | cputag_set_input_line(machine, vc1541_drive->cputag, M6502_SET_OVERFLOW, 0); |
| 665 | | via_ca1_w(via_1, 0, 0); |
| 667 | c1551_drive->gcr.ready = 0; |
| 668 | // why put sync back to 0 here?!? it would break the sync count, isn't it? |
| 669 | // or is it the way the serial port reads the sync count?!? |
| 670 | c1551_drive->gcr.sync = 0; |
| 671 | |
| 672 | c1551_drive->clock = 1; |
| 673 | return; |
| 666 | 674 | } |
| 667 | 675 | |
| 668 | | vc1541_drive->clock = 0; |
| 676 | // this code has 2 effects: move on the pos on the data and reset it to 0 at the end of the track! |
| 677 | // size of the track is: (# sectors in the track) * (size of sector GCR endoded) |
| 678 | // Here, size of sector is 368 because of our choices in the loading: 9 bytes of header gap & 14 bytes of sector gap |
| 679 | // We will need to set the size at loading time when adding support for G64 images |
| 680 | if (++(c1551_drive->pos) >= (d64_sectors_per_track[(int)c1551_drive->track - 1] * 368)) |
| 681 | c1551_drive->pos = 0; |
| 682 | // should we check if there is a change of track? to reset the pos in that case as well? |
| 683 | |
| 684 | c1551_drive->gcr.ready = 1; |
| 685 | |
| 686 | // notice that if there is a sequence of more than 40 1s it correctly does not reset the sync |
| 687 | // counter until a 0 is found |
| 688 | if (c1551_drive->gcr.data[c1551_drive->pos] == 0xff) |
| 689 | { |
| 690 | c1551_drive->gcr.ones_count++; |
| 691 | |
| 692 | // if (c1551_drive->gcr.ones_count == 2) // 9 ones should already mark it as a sync, even if CBM chose to use 40 of them |
| 693 | if (c1551_drive->gcr.ones_count == 5) |
| 694 | c1551_drive->gcr.sync = 1; |
| 695 | } |
| 696 | else |
| 697 | { |
| 698 | c1551_drive->gcr.ones_count = 0; |
| 699 | c1551_drive->gcr.sync = 0; |
| 700 | } |
| 701 | |
| 702 | c1551_drive->clock = 0; |
| 669 | 703 | } |
| 670 | 704 | |
| 671 | 705 | |
| r4790 | r4791 | |
| 844 | 878 | |
| 845 | 879 | static READ8_DEVICE_HANDLER( vc1541_via1_read_porta ) |
| 846 | 880 | { |
| 847 | | int data = vc1541_drive->gcr.data[vc1541_drive->pos]; |
| 848 | | logerror("Data read: Track %.1f Pos %d\n", vc1541_drive->track, vc1541_drive->pos); |
| 881 | UINT8 data = vc1541_drive->gcr.data[vc1541_drive->start_pos + vc1541_drive->pos]; |
| 849 | 882 | |
| 883 | // logerror("Data read: Track %.1f Pos %d\n", vc1541_drive->track, vc1541_drive->pos); |
| 884 | |
| 850 | 885 | DBG_LOG(device->machine, 2, "vc1541 drive", ("port a read %.2x\n", data)); |
| 851 | 886 | return data; |
| 852 | 887 | } |
| r4790 | r4791 | |
| 923 | 958 | vc1541_drive->track = 35.0; |
| 924 | 959 | |
| 925 | 960 | logerror("Track #: %.1f\n", vc1541_drive->track); |
| 961 | |
| 962 | /* We now adjust the vc1541_drive->pos according to the new track */ |
| 963 | /* This seems a simple way to deal with half tracks */ |
| 964 | vc1541_drive->pos = 0; |
| 965 | vc1541_drive->start_pos = gcr_offset[(int)vc1541_drive->track - 1] // starting point of Track # |
| 966 | + (int)(2 * (vc1541_drive->track - (int)vc1541_drive->track)) * 184 / 2; // half track if needed (again, 184 comes from out loading choices) |
| 926 | 967 | } |
| 927 | 968 | |
| 928 | 969 | if ((vc1541_drive->motor != (data & 0x04)) || (vc1541_drive->frequency != (data & 0x60))) |
| r4790 | r4791 | |
| 1108 | 1149 | |
| 1109 | 1150 | /************************************** |
| 1110 | 1151 | |
| 1152 | 1541 / 1541B / 1541C / 1541II / |
| 1153 | 2031 (same as 1541 but IEEE) |
| 1154 | |
| 1155 | **************************************/ |
| 1156 | |
| 1157 | static ADDRESS_MAP_START( _1541_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1158 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 1159 | AM_RANGE(0x1800, 0x180f) AM_DEVREADWRITE("_1541_via_0", via_r, via_w) /* 0 and 1 used in vc20 */ // IEC Bus |
| 1160 | AM_RANGE(0x1c00, 0x1c0f) AM_DEVREADWRITE("_1541_via_1", via_r, via_w) // Drive |
| 1161 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 1162 | ADDRESS_MAP_END |
| 1163 | |
| 1164 | |
| 1165 | static ADDRESS_MAP_START( dolphin_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1166 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 1167 | AM_RANGE(0x1800, 0x180f) AM_DEVREADWRITE("_1541_via_0", via_r, via_w) /* 0 and 1 used in vc20 */ |
| 1168 | AM_RANGE(0x1c00, 0x1c0f) AM_DEVREADWRITE("_1541_via_1", via_r, via_w) |
| 1169 | AM_RANGE(0x8000, 0x9fff) AM_RAM |
| 1170 | AM_RANGE(0xa000, 0xffff) AM_ROM |
| 1171 | ADDRESS_MAP_END |
| 1172 | |
| 1173 | /************************************** |
| 1174 | |
| 1111 | 1175 | 1570 / 1571 / 1571CR |
| 1112 | 1176 | |
| 1113 | 1177 | **************************************/ |
| r4790 | r4791 | |
| 1115 | 1179 | static ADDRESS_MAP_START( _1571_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1116 | 1180 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 1117 | 1181 | AM_RANGE(0x1800, 0x180f) AM_DEVREADWRITE("_1541_via_0", via_r, via_w) /* 0 and 1 used in vc20 */ |
| 1118 | | AM_RANGE(0x1810, 0x189f) AM_READ(SMH_NOP) /* for debugger */ |
| 1119 | 1182 | AM_RANGE(0x1c00, 0x1c0f) AM_DEVREADWRITE("_1541_via_1", via_r, via_w) |
| 1120 | | AM_RANGE(0x1c10, 0x1c9f) AM_READ(SMH_NOP) /* for debugger */ |
| 1121 | 1183 | // AM_RANGE(0x2000, 0x2003) // WD17xx |
| 1122 | 1184 | // AM_RANGE(0x4000, 0x400f) // CIA |
| 1123 | | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 1185 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 1124 | 1186 | ADDRESS_MAP_END |
| 1125 | 1187 | |
| 1188 | // for the C128DCR Drive |
| 1189 | /* |
| 1190 | David Gahris provided info about differences between 128DCR and stand-alone 1571s |
| 1126 | 1191 | |
| 1192 | * There is no 6526 or 8521 in the drive section of the 128DCR. I believe the |
| 1193 | 5710 handles fast serial because the 5710 is a Commodore custom chip and |
| 1194 | 128 fast serial is a Commodore custom protocol. [Ed's note: Commodore lists |
| 1195 | NTE229, ECG229, SK3246A/229, and 121-Z9021 as substitutes of the 5710.] |
| 1196 | |
| 1197 | * There is no 177x or heat-shrink-wrapped daughterboard in the drive section |
| 1198 | of the 128DCR. I believe the Motorola plastic quad flat-pack chip handles |
| 1199 | MFM because I am pretty sure that I have seen this chip in IBM PC drive |
| 1200 | mechanisms. |
| 1201 | |
| 1202 | * The 1571cr ROM works great in 1541 mode but not at all in 1571 mode in a |
| 1203 | standalone 1571. |
| 1204 | |
| 1205 | * Olaf Seibert informed me that the 1571cr ROM contains a string to the |
| 1206 | effect of "5710 (c) 1986 by c. hauck" |
| 1207 | */ |
| 1208 | static ADDRESS_MAP_START( _1571cr_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1209 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 1210 | AM_RANGE(0x1800, 0x180f) AM_DEVREADWRITE("_1541_via_0", via_r, via_w) /* 0 and 1 used in vc20 */ |
| 1211 | AM_RANGE(0x1c00, 0x1c0f) AM_DEVREADWRITE("_1541_via_1", via_r, via_w) |
| 1212 | // AM_RANGE(0x2000, 0x2005) // 5710 FDC |
| 1213 | // AM_RANGE(0x400c, 0x400f) // 5710 CIA Serial Port |
| 1214 | // AM_RANGE(0x4010, 0x4017) // 5710 FDC2 |
| 1215 | // AM_RANGE(0x6000, 0x7fff) // RAM shadows |
| 1216 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 1217 | ADDRESS_MAP_END |
| 1218 | |
| 1219 | |
| 1127 | 1220 | /************************************** |
| 1128 | 1221 | |
| 1129 | 1222 | 1581 |
| r4790 | r4791 | |
| 1133 | 1226 | static ADDRESS_MAP_START( _1581_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1134 | 1227 | // AM_RANGE(0x4000, 0x400f) // CIA |
| 1135 | 1228 | // AM_RANGE(0x6000, 0x6003) // WD17xx |
| 1229 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 1136 | 1230 | ADDRESS_MAP_END |
| 1137 | 1231 | |
| 1138 | 1232 | |
| 1139 | 1233 | /************************************** |
| 1140 | 1234 | |
| 1141 | | 2031 / 2040 / 3040 / 4040 / |
| 1142 | | 1001 / 8050 / 8250 |
| 1235 | 1001 / 8050 / 8250 |
| 1143 | 1236 | |
| 1237 | http://www.zimmers.net/anonftp/pub/cbm/firmware/drives/old/8050/d/8250.notes |
| 1238 | |
| 1144 | 1239 | **************************************/ |
| 1145 | 1240 | |
| 1146 | | static ADDRESS_MAP_START( _2031_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1241 | static ADDRESS_MAP_START( sfd1001_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1147 | 1242 | // AM_RANGE(0x0200, 0x021f) // RIOT1 |
| 1148 | 1243 | // AM_RANGE(0x0280, 0x029f) // RIOT2 |
| 1244 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 1149 | 1245 | ADDRESS_MAP_END |
| 1150 | 1246 | |
| 1151 | 1247 | |
| 1152 | 1248 | /************************************** |
| 1153 | 1249 | |
| 1250 | 2040 / 3040 / 4040 |
| 1251 | |
| 1252 | http://www.zimmers.net/anonftp/pub/cbm/schematics/drives/old/4040/memorymap.txt |
| 1253 | |
| 1254 | **************************************/ |
| 1255 | |
| 1256 | static ADDRESS_MAP_START( _4040_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1257 | ADDRESS_MAP_END |
| 1258 | |
| 1259 | |
| 1260 | /************************************** |
| 1261 | |
| 1154 | 1262 | 1551 |
| 1155 | 1263 | |
| 1156 | 1264 | **************************************/ |
| r4790 | r4791 | |
| 1183 | 1291 | |
| 1184 | 1292 | if (data != old) |
| 1185 | 1293 | { |
| 1186 | | DBG_LOG(space->machine, 1, "vc1541 drive",("%.2x\n", data)); |
| 1294 | DBG_LOG(space->machine, 1, "c1551 drive",("%.2x\n", data)); |
| 1187 | 1295 | |
| 1188 | 1296 | if ((old & 0x03) != (data & 0x03)) |
| 1189 | 1297 | { |
| r4790 | r4791 | |
| 1223 | 1331 | c1551_drive->track = 1.0; |
| 1224 | 1332 | if (c1551_drive->track > 35) |
| 1225 | 1333 | c1551_drive->track = 35.0; |
| 1334 | |
| 1335 | logerror("Track #: %.1f\n", c1551_drive->track); |
| 1336 | |
| 1337 | /* We now adjust the c1551_drive->pos according to the new track */ |
| 1338 | /* This seems a simple way to deal with half tracks */ |
| 1339 | c1551_drive->pos = 0; |
| 1340 | c1551_drive->start_pos = gcr_offset[(int)c1551_drive->track - 1] // starting point of Track # |
| 1341 | + (int)(2 * (c1551_drive->track - (int)c1551_drive->track)) * 184 / 2; // half track if needed (again, 184 comes from out loading choices) |
| 1226 | 1342 | } |
| 1227 | 1343 | |
| 1228 | 1344 | if ( (c1551_drive->motor != (data & 0x04)) || (c1551_drive->frequency != (data & 0x60)) ) |
| r4790 | r4791 | |
| 1284 | 1400 | return data; |
| 1285 | 1401 | } |
| 1286 | 1402 | |
| 1403 | |
| 1404 | static ADDRESS_MAP_START( _1551_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1405 | AM_RANGE(0x0000, 0x0001) AM_READWRITE(c1551_port_r, c1551_port_w) |
| 1406 | AM_RANGE(0x0002, 0x07ff) AM_RAM |
| 1407 | AM_RANGE(0x4000, 0x4007) AM_DEVREADWRITE("c1551_tpi", tpi6525_r, tpi6525_w) |
| 1408 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 1409 | ADDRESS_MAP_END |
| 1410 | |
| 1411 | |
| 1412 | /******************** Handlers for the C1551 TPI ********************/ |
| 1413 | |
| 1287 | 1414 | /* |
| 1288 | 1415 | tia6523 |
| 1289 | 1416 | port a |
| r4790 | r4791 | |
| 1314 | 1441 | |
| 1315 | 1442 | static READ8_DEVICE_HANDLER( c1551_port_b_r ) |
| 1316 | 1443 | { |
| 1317 | | int data = c1551_drive->gcr.data[c1551_drive->pos]; |
| 1444 | UINT8 data = c1551_drive->gcr.data[c1551_drive->start_pos + c1551_drive->pos]; |
| 1318 | 1445 | |
| 1319 | 1446 | DBG_LOG(device->machine, 2, "c1551 drive",("port a read %.2x\n", data)); |
| 1320 | 1447 | return data; |
| 1321 | 1448 | } |
| 1322 | 1449 | |
| 1450 | static const tpi6525_interface c1551_tpi_intf = |
| 1451 | { |
| 1452 | NULL, |
| 1453 | c1551_port_b_r, |
| 1454 | c1551_port_c_r, |
| 1455 | NULL, |
| 1456 | NULL, |
| 1457 | NULL, |
| 1458 | NULL, |
| 1459 | NULL, |
| 1460 | NULL |
| 1461 | }; |
| 1323 | 1462 | |
| 1324 | | static ADDRESS_MAP_START( _1551_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1325 | | AM_RANGE(0x0000, 0x0001) AM_READWRITE(c1551_port_r, c1551_port_w) |
| 1326 | | AM_RANGE(0x0002, 0x07ff) AM_RAM |
| 1327 | | AM_RANGE(0x4000, 0x4007) AM_DEVREADWRITE("c1551_tpi", tpi6525_r, tpi6525_w) |
| 1328 | | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 1329 | | ADDRESS_MAP_END |
| 1330 | 1463 | |
| 1464 | /******************** Handlers for the C16 TPI ********************/ |
| 1331 | 1465 | |
| 1332 | 1466 | WRITE8_DEVICE_HANDLER( c1551x_write_data ) |
| 1333 | 1467 | { |
| r4790 | r4791 | |
| 1335 | 1469 | #ifdef CPU_SYNC |
| 1336 | 1470 | cpu_sync(); |
| 1337 | 1471 | #endif |
| 1338 | | tpi6525_porta_w(device, 0, data); |
| 1472 | const device_config *tpi_0 = devtag_get_device(device->machine, "c1551_tpi"); |
| 1473 | |
| 1474 | tpi6525_porta_w(tpi_0, 0, data); |
| 1339 | 1475 | } |
| 1340 | 1476 | |
| 1341 | 1477 | READ8_DEVICE_HANDLER( c1551x_read_data ) |
| 1342 | 1478 | { |
| 1343 | | int data = 0xff; |
| 1479 | UINT8 data = 0xff; |
| 1480 | const device_config *tpi_0 = devtag_get_device(device->machine, "c1551_tpi"); |
| 1481 | |
| 1344 | 1482 | #ifdef CPU_SYNC |
| 1345 | 1483 | cpu_sync (); |
| 1346 | 1484 | #endif |
| 1347 | 1485 | |
| 1348 | | data = tpi6525_porta_r(device, 0); |
| 1486 | data = tpi6525_porta_r(tpi_0, 0); |
| 1349 | 1487 | // DBG_LOG(device->machine, 2, "c1551 cpu",("%d read data %.2x\n", cpu_getactivecpu (), data)); |
| 1350 | 1488 | return data; |
| 1351 | 1489 | } |
| 1352 | 1490 | |
| 1353 | 1491 | WRITE8_DEVICE_HANDLER( c1551x_write_handshake ) |
| 1354 | 1492 | { |
| 1493 | const device_config *tpi_0 = devtag_get_device(device->machine, "c1551_tpi"); |
| 1355 | 1494 | // DBG_LOG(device->machine, 1, "c1551 cpu",("%d write handshake %.2x\n", cpu_getactivecpu (), data)); |
| 1356 | 1495 | #ifdef CPU_SYNC |
| 1357 | 1496 | cpu_sync(); |
| 1358 | 1497 | #endif |
| 1359 | 1498 | |
| 1360 | | tpi6525_portc_w(device, 0, data & 0x40 ? 0xff : 0x7f); |
| 1499 | tpi6525_portc_w(tpi_0, 0, data & 0x40 ? 0xff : 0x7f); |
| 1361 | 1500 | } |
| 1362 | 1501 | |
| 1363 | 1502 | READ8_DEVICE_HANDLER( c1551x_read_handshake ) |
| 1364 | 1503 | { |
| 1365 | | int data = 0xff; |
| 1504 | const device_config *tpi_0 = devtag_get_device(device->machine, "c1551_tpi"); |
| 1505 | UINT8 data = 0xff; |
| 1366 | 1506 | #ifdef CPU_SYNC |
| 1367 | 1507 | cpu_sync(); |
| 1368 | 1508 | #endif |
| 1369 | 1509 | |
| 1370 | | data = tpi6525_portc_r(device, 0) & 0x08 ? 0x80 : 0x00; |
| 1510 | data = tpi6525_portc_r(tpi_0, 0) & 0x08 ? 0x80 : 0x00; |
| 1371 | 1511 | // DBG_LOG(device->machine, 2, "c1551 cpu",("%d read handshake %.2x\n", cpu_getactivecpu (), data)); |
| 1372 | 1512 | return data; |
| 1373 | 1513 | } |
| 1374 | 1514 | |
| 1375 | 1515 | READ8_DEVICE_HANDLER( c1551x_read_status ) |
| 1376 | 1516 | { |
| 1377 | | int data = 0xff; |
| 1517 | const device_config *tpi_0 = devtag_get_device(device->machine, "c1551_tpi"); |
| 1518 | UINT8 data = 0xff; |
| 1378 | 1519 | #ifdef CPU_SYNC |
| 1379 | 1520 | cpu_sync(); |
| 1380 | 1521 | #endif |
| 1381 | 1522 | |
| 1382 | | data = tpi6525_portc_r(device, 0) & 0x03; |
| 1523 | data = tpi6525_portc_r(tpi_0, 0) & 0x03; |
| 1383 | 1524 | // DBG_LOG(device->machine, 1, "c1551 cpu",("%d read status %.2x\n", cpu_getactivecpu (), data)); |
| 1384 | 1525 | |
| 1385 | 1526 | return data; |
| 1386 | 1527 | } |
| 1387 | 1528 | |
| 1388 | 1529 | |
| 1530 | |
| 1389 | 1531 | /************************************** |
| 1390 | 1532 | |
| 1533 | Machine drivers |
| 1534 | |
| 1535 | **************************************/ |
| 1536 | |
| 1537 | |
| 1538 | MACHINE_DRIVER_START( cpu_vc1540 ) |
| 1539 | MDRV_CPU_ADD("cpu_vc1540", M6502, XTAL_16_MHz / 16) |
| 1540 | MDRV_CPU_PROGRAM_MAP(_1541_map) |
| 1541 | |
| 1542 | MDRV_VIA6522_ADD("_1541_via_0", 0, vc1541_via0) |
| 1543 | MDRV_VIA6522_ADD("_1541_via_1", 0, vc1541_via1) |
| 1544 | MACHINE_DRIVER_END |
| 1545 | |
| 1546 | MACHINE_DRIVER_START( cpu_vc1541 ) |
| 1547 | MDRV_IMPORT_FROM(cpu_vc1540) |
| 1548 | MACHINE_DRIVER_END |
| 1549 | |
| 1550 | MACHINE_DRIVER_START( cpu_c1571 ) |
| 1551 | MDRV_CPU_ADD("cpu_vc1571", M6502, XTAL_16_MHz / 16) |
| 1552 | MDRV_CPU_PROGRAM_MAP(_1571_map) |
| 1553 | |
| 1554 | MDRV_VIA6522_ADD("_1541_via_0", 0, vc1541_via0) |
| 1555 | MDRV_VIA6522_ADD("_1541_via_1", 0, vc1541_via1) |
| 1556 | MACHINE_DRIVER_END |
| 1557 | |
| 1558 | MACHINE_DRIVER_START( cpu_c1571cr ) |
| 1559 | MDRV_CPU_ADD("cpu_vc1571", M6502, XTAL_16_MHz / 16) |
| 1560 | MDRV_CPU_PROGRAM_MAP(_1571cr_map) |
| 1561 | |
| 1562 | MDRV_VIA6522_ADD("_1541_via_0", 0, vc1541_via0) |
| 1563 | MDRV_VIA6522_ADD("_1541_via_1", 0, vc1541_via1) |
| 1564 | MACHINE_DRIVER_END |
| 1565 | |
| 1566 | MACHINE_DRIVER_START( cpu_c1581 ) |
| 1567 | MDRV_IMPORT_FROM(cpu_c1571) // obviously incorrect: we need proper 1581 memory map and emulation! |
| 1568 | MACHINE_DRIVER_END |
| 1569 | |
| 1570 | MACHINE_DRIVER_START( cpu_c2031 ) |
| 1571 | MDRV_IMPORT_FROM(cpu_vc1540) // not sure the memory map is exactly the vc1541 one! |
| 1572 | MACHINE_DRIVER_END |
| 1573 | |
| 1574 | MACHINE_DRIVER_START( cpu_dolphin ) |
| 1575 | MDRV_CPU_ADD("cpu_dolphin", M6502, XTAL_16_MHz / 16) |
| 1576 | MDRV_CPU_PROGRAM_MAP(dolphin_map) |
| 1577 | MACHINE_DRIVER_END |
| 1578 | |
| 1579 | MACHINE_DRIVER_START( cpu_c1551 ) |
| 1580 | MDRV_CPU_ADD("cpu_c1551", M6510T, 2000000) |
| 1581 | MDRV_CPU_PROGRAM_MAP(_1551_map) |
| 1582 | |
| 1583 | /* tpi */ |
| 1584 | MDRV_TPI6525_ADD("c1551_tpi", c1551_tpi_intf) |
| 1585 | MACHINE_DRIVER_END |
| 1586 | |
| 1587 | |
| 1588 | |
| 1589 | /************************************** |
| 1590 | |
| 1391 | 1591 | Drive init & reset |
| 1392 | 1592 | |
| 1393 | 1593 | **************************************/ |
| 1394 | 1594 | |
| 1395 | | int drive_config( running_machine *machine, int type, int id, int mode, const char *cputag, int devicenr ) |
| 1595 | void drive_config( running_machine *machine, int type, int id, int mode, const char *cputag, int devicenr ) |
| 1396 | 1596 | { |
| 1397 | 1597 | vc1541_drive->type = type; |
| 1398 | 1598 | vc1541_drive->cputag = cputag; |
| 1399 | 1599 | vc1541_drive->vc1541_serial.deviceid = devicenr; |
| 1400 | | vc1541_drive->timer = timer_alloc(machine, drive_timer, NULL); |
| 1401 | | |
| 1402 | | return 0; |
| 1600 | vc1541_drive->timer = timer_alloc(machine, vc1541_drive_timer, NULL); |
| 1403 | 1601 | } |
| 1404 | 1602 | |
| 1405 | 1603 | void c1551_config( running_machine *machine, const char *cputag ) |
| 1406 | 1604 | { |
| 1605 | c1551_drive->type = type_1551; |
| 1407 | 1606 | c1551_drive->cputag = cputag; |
| 1607 | c1551_drive->timer = timer_alloc(machine, c1551_drive_timer, NULL); |
| 1408 | 1608 | |
| 1409 | 1609 | /* time should be small enough to allow quitting of the irq |
| 1410 | 1610 | line before the next interrupt is triggered */ |
| r4790 | r4791 | |
| 1424 | 1624 | } |
| 1425 | 1625 | } |
| 1426 | 1626 | |
| 1427 | | vc1541_drive->track = 1.0; |
| 1428 | | } |
| 1627 | /* Create offset map for GCR encoded images: it speeds up finding position where to read data from */ |
| 1628 | switch (vc1541_drive->type) |
| 1629 | { |
| 1630 | case type_1541: |
| 1631 | case type_1541ii: |
| 1632 | offset_init(format_d64_40t, gcr_offset, 368); // offset map is the same for both 35 and 40 track discs |
| 1633 | break; |
| 1429 | 1634 | |
| 1635 | case type_1570: |
| 1636 | case type_1571: |
| 1637 | case type_1571cr: |
| 1638 | offset_init(format_d71, gcr_offset, 368); |
| 1639 | break; |
| 1430 | 1640 | |
| 1431 | | /************************************** |
| 1641 | case type_1581: |
| 1642 | offset_init(format_d81, gcr_offset, 368); |
| 1643 | break; |
| 1432 | 1644 | |
| 1433 | | Machine drivers |
| 1645 | default: |
| 1646 | logerror("GCR offset map not created\n"); |
| 1647 | } |
| 1434 | 1648 | |
| 1435 | | **************************************/ |
| 1649 | vc1541_drive->track = 1.0; |
| 1650 | vc1541_drive->start_pos = 0; |
| 1651 | vc1541_drive->pos = 0; |
| 1652 | } |
| 1436 | 1653 | |
| 1437 | | static const tpi6525_interface c1551_tpi_intf = |
| 1654 | void c1551_drive_reset (void) |
| 1438 | 1655 | { |
| 1439 | | NULL, |
| 1440 | | c1551_port_b_r, |
| 1441 | | c1551_port_c_r, |
| 1442 | | NULL, |
| 1443 | | NULL, |
| 1444 | | NULL, |
| 1445 | | NULL, |
| 1446 | | NULL, |
| 1447 | | NULL |
| 1448 | | }; |
| 1656 | offset_init(format_d64_40t, gcr_offset, 368); // offset map is the same for both 35 and 40 track discs |
| 1657 | c1551_drive->track = 1.0; |
| 1658 | c1551_drive->start_pos = 0; |
| 1659 | c1551_drive->pos = 0; |
| 1660 | } |
| 1449 | 1661 | |
| 1450 | 1662 | |
| 1451 | | MACHINE_DRIVER_START( cpu_vc1540 ) |
| 1452 | | MDRV_CPU_ADD("cpu_vc1540", M6502, XTAL_16_MHz / 16) |
| 1453 | | MDRV_CPU_PROGRAM_MAP(_1541_map) |
| 1454 | 1663 | |
| 1455 | | MDRV_VIA6522_ADD("_1541_via_0", 0, vc1541_via0) |
| 1456 | | MDRV_VIA6522_ADD("_1541_via_1", 0, vc1541_via1) |
| 1457 | | MACHINE_DRIVER_END |
| 1458 | | |
| 1459 | | MACHINE_DRIVER_START( cpu_vc1541 ) |
| 1460 | | MDRV_IMPORT_FROM(cpu_vc1540) |
| 1461 | | MACHINE_DRIVER_END |
| 1462 | | |
| 1463 | | MACHINE_DRIVER_START( cpu_c2031 ) |
| 1464 | | MDRV_IMPORT_FROM(cpu_vc1540) |
| 1465 | | MACHINE_DRIVER_END |
| 1466 | | |
| 1467 | | MACHINE_DRIVER_START( cpu_dolphin ) |
| 1468 | | MDRV_CPU_ADD("cpu_dolphin", M6502, XTAL_16_MHz / 16) |
| 1469 | | MDRV_CPU_PROGRAM_MAP(dolphin_map) |
| 1470 | | MACHINE_DRIVER_END |
| 1471 | | |
| 1472 | | MACHINE_DRIVER_START( cpu_c1551 ) |
| 1473 | | MDRV_CPU_ADD("cpu_c1551", M6510T, 2000000) |
| 1474 | | MDRV_CPU_PROGRAM_MAP(_1551_map) |
| 1475 | | |
| 1476 | | /* tpi */ |
| 1477 | | MDRV_TPI6525_ADD("c1551_tpi", c1551_tpi_intf) |
| 1478 | | MACHINE_DRIVER_END |
| 1479 | | |
| 1480 | | MACHINE_DRIVER_START( cpu_c1571 ) |
| 1481 | | MDRV_CPU_ADD("cpu_vc1540", M6502, XTAL_16_MHz / 16) |
| 1482 | | MDRV_CPU_PROGRAM_MAP(_1571_map) |
| 1483 | | |
| 1484 | | MDRV_VIA6522_ADD("_1541_via_0", 0, vc1541_via0) |
| 1485 | | MDRV_VIA6522_ADD("_1541_via_1", 0, vc1541_via1) |
| 1486 | | MACHINE_DRIVER_END |
| 1487 | | |
| 1488 | | |
| 1489 | 1664 | /************************************** |
| 1490 | 1665 | |
| 1491 | 1666 | Device configurations |
| r4790 | r4791 | |
| 1662 | 1837 | } |
| 1663 | 1838 | |
| 1664 | 1839 | /* Set up track / sector map according to the format of the image */ |
| 1665 | | offset_init (format); |
| 1840 | offset_init(format, image_offset, 256); |
| 1666 | 1841 | |
| 1667 | 1842 | /* Claim memory */ |
| 1668 | 1843 | temp_copy = auto_alloc_array(image->machine, UINT8, filesize); |
| r4790 | r4791 | |
| 1721 | 1896 | } |
| 1722 | 1897 | |
| 1723 | 1898 | /* Set up track / sector map according to the format of the image */ |
| 1724 | | offset_init (format); |
| 1899 | offset_init(format, image_offset, 256); |
| 1725 | 1900 | |
| 1726 | 1901 | /* Claim memory */ |
| 1727 | 1902 | temp_copy = auto_alloc_array(image->machine, UINT8, filesize); |
src/mess/drivers/c128.c
| r4790 | r4791 | |
| 644 | 644 | MDRV_IMPORT_FROM( cpu_c1571 ) |
| 645 | 645 | MACHINE_DRIVER_END |
| 646 | 646 | |
| 647 | static MACHINE_DRIVER_START( c128dcr ) |
| 648 | MDRV_IMPORT_FROM( c128 ) |
| 649 | MDRV_IMPORT_FROM( cpu_c1571cr ) |
| 650 | MACHINE_DRIVER_END |
| 647 | 651 | |
| 652 | static MACHINE_DRIVER_START( c128d81 ) |
| 653 | MDRV_IMPORT_FROM( c128 ) |
| 654 | MDRV_IMPORT_FROM( cpu_c1581 ) |
| 655 | MACHINE_DRIVER_END |
| 656 | |
| 657 | |
| 648 | 658 | static MACHINE_DRIVER_START( c128pal ) |
| 649 | 659 | MDRV_IMPORT_FROM( c128 ) |
| 650 | 660 | MDRV_CPU_REPLACE( "maincpu", Z80, VIC6569_CLOCK ) |
| r4790 | r4791 | |
| 671 | 681 | MDRV_IMPORT_FROM( cpu_c1571 ) |
| 672 | 682 | MACHINE_DRIVER_END |
| 673 | 683 | |
| 684 | static MACHINE_DRIVER_START( c128dcrp ) |
| 685 | MDRV_IMPORT_FROM( c128pal ) |
| 686 | MDRV_IMPORT_FROM( cpu_c1571cr ) |
| 687 | MACHINE_DRIVER_END |
| 674 | 688 | |
| 675 | 689 | |
| 690 | |
| 676 | 691 | /************************************* |
| 677 | 692 | * |
| 678 | 693 | * ROM definition(s) |
| r4790 | r4791 | |
| 740 | 755 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 741 | 756 | ROM_END |
| 742 | 757 | |
| 743 | | ROM_START( c128fin ) |
| 758 | ROM_START( c128sfi ) |
| 744 | 759 | ROM_REGION( 0x132800, "maincpu", 0 ) |
| 760 | ROM_LOAD( "318018-0x.u33", 0x100000, 0x4000, CRC(2ee6e2fa) SHA1(60e1491e1d5782e3cf109f518eb73427609badc6) ) // labels not available |
| 761 | ROM_LOAD( "318019-0x.u34", 0x104000, 0x4000, CRC(d551fce0) SHA1(4d223883e866645328f86a904b221464682edc4f) ) // labels not available |
| 762 | ROM_LOAD( "251913-0x.u32", 0x108000, 0x4000, CRC(2aff27d3) SHA1(267654823c4fdf2167050f41faa118218d2569ce) ) // labels not available |
| 763 | ROM_LOAD( "318020-0x.u35", 0x10c000, 0x4000, CRC(9526fac4) SHA1(a01dd871241c801db51e8ebc30fedfafd8cc506b) ) // labels not available |
| 764 | |
| 765 | /* This was not included in the submission, unfortunately */ |
| 766 | ROM_LOAD( "325181-01.bin", 0x120000, 0x2000, BAD_DUMP CRC(7a70d9b8) SHA1(aca3f7321ee7e6152f1f0afad646ae41964de4fb) ) |
| 767 | |
| 768 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 769 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 770 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 771 | ROM_END |
| 772 | |
| 773 | ROM_START( c128fino ) |
| 774 | ROM_REGION( 0x132800, "maincpu", 0 ) |
| 745 | 775 | ROM_LOAD( "318018-04.bin", 0x100000, 0x4000, BAD_DUMP CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441) ) // BASIC lo |
| 746 | 776 | ROM_LOAD( "318019-04.bin", 0x104000, 0x4000, BAD_DUMP CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0) ) // BASIC hi |
| 747 | 777 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, BAD_DUMP CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| r4790 | r4791 | |
| 804 | 834 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) |
| 805 | 835 | |
| 806 | 836 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 807 | | C1571_ROM("cpu_vc1540") |
| 837 | C1571_ROM("cpu_vc1571") |
| 808 | 838 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 809 | 839 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 810 | 840 | ROM_END |
| r4790 | r4791 | |
| 819 | 849 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) // Character |
| 820 | 850 | |
| 821 | 851 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 822 | | C1571_ROM("cpu_vc1540") |
| 852 | C1571CR_ROM("cpu_vc1571") |
| 823 | 853 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 824 | 854 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 825 | 855 | ROM_END |
| r4790 | r4791 | |
| 834 | 864 | ROM_LOAD( "315079-01.bin", 0x120000, 0x2000, CRC(fe5a2db1) SHA1(638f8aff51c2ac4f99a55b12c4f8c985ef4bebd3) ) |
| 835 | 865 | |
| 836 | 866 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 837 | | C1571_ROM("cpu_vc1540") |
| 867 | C1571CR_ROM("cpu_vc1571") |
| 838 | 868 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 839 | 869 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 840 | 870 | ROM_END |
| r4790 | r4791 | |
| 847 | 877 | ROM_LOAD( "325181-01.bin", 0x120000, 0x2000, CRC(7a70d9b8) SHA1(aca3f7321ee7e6152f1f0afad646ae41964de4fb) ) |
| 848 | 878 | |
| 849 | 879 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 850 | | C1571_ROM("cpu_vc1540") |
| 880 | C1571CR_ROM("cpu_vc1571") |
| 851 | 881 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 852 | 882 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 853 | 883 | ROM_END |
| r4790 | r4791 | |
| 863 | 893 | ROM_LOAD( "325167-01.bin", 0x120000, 0x2000, BAD_DUMP CRC(bad36b88) SHA1(9119b27a1bf885fa4c76fff5d858c74c194dd2b8) ) |
| 864 | 894 | |
| 865 | 895 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 866 | | C1571_ROM("cpu_vc1540") |
| 896 | C1571CR_ROM("cpu_vc1571") |
| 867 | 897 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 868 | 898 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 869 | 899 | ROM_END |
| 870 | 900 | |
| 871 | 901 | |
| 902 | ROM_START( c128d81 ) |
| 903 | ROM_REGION( 0x132800, "maincpu", 0 ) |
| 904 | ROM_LOAD( "318018-04.bin", 0x100000, 0x4000, CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441) ) // BASIC lo |
| 905 | ROM_LOAD( "318019-04.bin", 0x104000, 0x4000, CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0) ) // BASIC hi |
| 906 | ROM_LOAD( "251913-01.bin", 0x108000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) // C64 OS ROM |
| 907 | ROM_LOAD( "318020-05.bin", 0x10c000, 0x4000, CRC(ba456b8e) SHA1(ceb6e1a1bf7e08eb9cbc651afa29e26adccf38ab) ) // Kernal |
| 908 | ROM_LOAD( "390059-01.bin", 0x120000, 0x2000, CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f) ) |
| 872 | 909 | |
| 910 | ROM_REGION( 0x10000, "m8502", ROMREGION_ERASEFF ) |
| 911 | C1581_ROM("cpu_vc1571") |
| 912 | ROM_REGION( 0x2000, "gfx1", ROMREGION_ERASEFF ) |
| 913 | ROM_REGION( 0x100, "gfx2", ROMREGION_ERASEFF ) |
| 914 | ROM_END |
| 915 | |
| 916 | |
| 917 | |
| 873 | 918 | /************************************* |
| 874 | 919 | * |
| 875 | 920 | * System configuration(s) |
| r4790 | r4791 | |
| 885 | 930 | CONFIG_DEVICE(c1571_device_getinfo) |
| 886 | 931 | SYSTEM_CONFIG_END |
| 887 | 932 | |
| 933 | static SYSTEM_CONFIG_START(c128d81) |
| 934 | CONFIG_DEVICE(c1581_device_getinfo) |
| 935 | SYSTEM_CONFIG_END |
| 888 | 936 | |
| 937 | |
| 889 | 938 | /*************************************************************************** |
| 890 | 939 | |
| 891 | 940 | Game driver(s) |
| r4790 | r4791 | |
| 894 | 943 | |
| 895 | 944 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 896 | 945 | |
| 897 | | COMP( 1985, c128, 0, 0, c128, c128, c128, c128, "Commodore Business Machines Co.", "Commodore 128 NTSC", 0) |
| 946 | COMP( 1985, c128, 0, 0, c128, c128, c128, c128, "Commodore Business Machines Co.", "Commodore 128 (NTSC)", 0) |
| 898 | 947 | COMP( 1985, c128cr, c128, 0, c128, c128, c128, c128, "Commodore Business Machines Co.", "Commodore 128CR (NTSC, proto?)", 0) |
| 899 | 948 | |
| 900 | | COMP( 1985, c128fin, c128, 0, c128pal, c128swe, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Finland)", 0) |
| 949 | COMP( 1985, c128sfi, c128, 0, c128pal, c128fra, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Swedish / Finnish)", 0) |
| 950 | COMP( 1985, c128fino, c128, 0, c128pal, c128swe, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Finland, Unconfirmed Dumps)", 0) |
| 901 | 951 | COMP( 1985, c128fra, c128, 0, c128pal, c128fra, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, France)", 0) |
| 902 | 952 | COMP( 1985, c128ger, c128, 0, c128pal, c128ger, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Germany)", 0) |
| 903 | 953 | COMP( 1985, c128nor, c128, 0, c128pal, c128ita, c128pal, c128, "Commodore Business Machines Co.", "Commodore 128 (PAL, Norway)", 0) |
| 904 | | /* other countries spain, belgium, ... */ |
| 954 | // we miss other countries: Spain, Belgium, etc. |
| 905 | 955 | |
| 956 | // the following drivers use a 1571 floppy drive |
| 906 | 957 | COMP( 1985, c128dpr, c128, 0, c128d, c128, c128d, c128d, "Commodore Business Machines Co.", "Commodore 128D (NTSC, proto)", GAME_NOT_WORKING) |
| 907 | | COMP( 1985, c128d, c128, 0, c128dpal, c128, c128dpal, c128d, "Commodore Business Machines Co.", "Commodore 128D PAL", GAME_NOT_WORKING) |
| 958 | COMP( 1985, c128d, c128, 0, c128dpal, c128, c128dpal, c128d, "Commodore Business Machines Co.", "Commodore 128D (PAL)", GAME_NOT_WORKING) |
| 908 | 959 | |
| 909 | | COMP( 1986, c128dcr, c128, 0, c128d, c128, c128d, c128d, "Commodore Business Machines Co.", "Commodore 128DCR NTSC", GAME_NOT_WORKING) |
| 910 | | COMP( 1986, c128drde, c128, 0, c128dpal, c128ger, c128dpal, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Germany)", GAME_NOT_WORKING) |
| 911 | | COMP( 1986, c128drit, c128, 0, c128dpal, c128ita, c128dpal, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Italy)", GAME_NOT_WORKING) |
| 912 | | COMP( 1986, c128drsw, c128, 0, c128dpal, c128swe, c128dpal, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Sweden)", GAME_NOT_WORKING) |
| 913 | | //COMP( 1986, c128d81, c128, 0, c128d, c128, c128d, c128d, "Commodore Business Machines Co.", "Commodore "128D/81" NTSC", GAME_NOT_WORKING) // no floppy drive emulation makes this useless atm |
| 960 | // the following drivers use a 1571CR floppy drive |
| 961 | COMP( 1986, c128dcr, c128, 0, c128dcr, c128, c128dcr, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (NTSC)", GAME_NOT_WORKING) |
| 962 | COMP( 1986, c128drde, c128, 0, c128dcrp, c128ger, c128dcrp, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Germany)", GAME_NOT_WORKING) |
| 963 | COMP( 1986, c128drit, c128, 0, c128dcrp, c128ita, c128dcrp, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Italy)", GAME_NOT_WORKING) |
| 964 | COMP( 1986, c128drsw, c128, 0, c128dcrp, c128swe, c128dcrp, c128d, "Commodore Business Machines Co.", "Commodore 128DCR (PAL, Sweden)", GAME_NOT_WORKING) |
| 965 | |
| 966 | // the following driver is a c128 with 1581 floppy drive. it allows us to document 1581 firmware dumps, but it does not do much more |
| 967 | COMP( 1986, c128d81, c128, 0, c128d81, c128, c128d81, c128d81, "Commodore Business Machines Co.", "Commodore 128D/81 (NTSC, proto)", GAME_NOT_WORKING) |
src/mess/drivers/c16.c
| r4790 | r4791 | |
| 461 | 461 | MDRV_IMPORT_FROM( c16 ) |
| 462 | 462 | |
| 463 | 463 | /* c16c uses 'real' floppy drive emulation from machine/vc1541.c... |
| 464 | | still in progress and slow as hell, atm */ |
| 465 | | /* by default, it is also disabled atm => no floppies for c16c. it will be fixed */ |
| 464 | still in progress, atm */ |
| 466 | 465 | MDRV_TPI6525_REMOVE("tpi6535_tpi_2") |
| 467 | 466 | MDRV_TPI6525_ADD("tpi6535_tpi_2", c16_tpi6525_tpi_2_c1551_intf) |
| 468 | 467 | |
| r4790 | r4791 | |
| 509 | 508 | MDRV_IMPORT_FROM( plus4 ) |
| 510 | 509 | |
| 511 | 510 | /* plus4c uses 'real' floppy drive emulation from machine/vc1541.c... |
| 512 | | still in progress and slow as hell, atm */ |
| 513 | | /* by default, it is also disabled atm => no floppies for plus4c. it will be fixed */ |
| 511 | still in progress, atm */ |
| 514 | 512 | MDRV_TPI6525_REMOVE("tpi6535_tpi_2") |
| 515 | 513 | MDRV_TPI6525_ADD("tpi6535_tpi_2", c16_tpi6525_tpi_2_c1551_intf) |
| 516 | 514 | |
| r4790 | r4791 | |
| 565 | 563 | *************************************/ |
| 566 | 564 | |
| 567 | 565 | ROM_START( c232 ) |
| 568 | | ROM_REGION (0x40000, "maincpu", 0) |
| 566 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 569 | 567 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 570 | 568 | ROM_LOAD( "318004-01.bin", 0x14000, 0x4000, CRC(dbdc3319) SHA1(3c77caf72914c1c0a0875b3a7f6935cd30c54201) ) |
| 571 | 569 | ROM_END |
| 572 | 570 | |
| 573 | 571 | ROM_START( c264 ) |
| 574 | | ROM_REGION (0x40000, "maincpu", 0) |
| 572 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 575 | 573 | ROM_LOAD( "basic-264.bin", 0x10000, 0x4000, CRC(6a2fc8e3) SHA1(473fce23afa07000cdca899fbcffd6961b36a8a0) ) |
| 576 | 574 | ROM_LOAD( "kernal-264.bin", 0x14000, 0x4000, CRC(8f32abe7) SHA1(d481faf5fcbb331878dc7851c642d04f26a32873) ) |
| 577 | 575 | ROM_END |
| 578 | 576 | |
| 579 | 577 | ROM_START( c364 ) |
| 580 | | ROM_REGION (0x40000, "maincpu", 0) |
| 578 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 581 | 579 | ROM_LOAD( "318006.01", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 582 | 580 | ROM_LOAD( "kern364p.bin", 0x14000, 0x4000, CRC(84fd4f7a) SHA1(b9a5b5dacd57ca117ef0b3af29e91998bf4d7e5f) ) |
| 583 | 581 | ROM_LOAD( "317053-01.bin", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) ) |
| r4790 | r4791 | |
| 588 | 586 | |
| 589 | 587 | |
| 590 | 588 | ROM_START( c16 ) |
| 591 | | ROM_REGION (0x40000, "maincpu", 0) |
| 589 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 592 | 590 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 593 | 591 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 594 | 592 | ROMX_LOAD( "318004-05.bin", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(1) ) |
| r4790 | r4791 | |
| 599 | 597 | ROM_END |
| 600 | 598 | |
| 601 | 599 | ROM_START( c16c ) |
| 602 | | ROM_REGION (0x40000, "maincpu", 0) |
| 600 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 603 | 601 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 604 | 602 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 605 | 603 | ROMX_LOAD( "318004-05.bin", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(1) ) |
| r4790 | r4791 | |
| 608 | 606 | ROM_SYSTEM_BIOS( 2, "rev4", "rev. 4" ) |
| 609 | 607 | ROMX_LOAD( "318004-04.bin", 0x14000, 0x4000, CRC(be54ed79) SHA1(514ad3c29d01a2c0a3b143d9c1d4143b1912b793), ROM_BIOS(3) ) |
| 610 | 608 | |
| 611 | | C1551_ROM ("cpu_c1551") |
| 609 | C1551_ROM("cpu_c1551") |
| 612 | 610 | ROM_END |
| 613 | 611 | |
| 614 | 612 | ROM_START( c16v ) |
| 615 | | ROM_REGION (0x40000, "maincpu", 0) |
| 613 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 616 | 614 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 617 | | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 618 | | ROMX_LOAD( "318004-05.bin", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(1) ) |
| 619 | | ROM_SYSTEM_BIOS( 1, "rev3", "rev. 3" ) |
| 620 | | ROMX_LOAD( "318004-03.bin", 0x14000, 0x4000, CRC(77bab934) SHA1(97814dab9d757fe5a3a61d357a9a81da588a9783), ROM_BIOS(2) ) |
| 621 | | ROM_SYSTEM_BIOS( 2, "rev4", "rev. 4" ) |
| 622 | | ROMX_LOAD( "318004-04.bin", 0x14000, 0x4000, CRC(be54ed79) SHA1(514ad3c29d01a2c0a3b143d9c1d4143b1912b793), ROM_BIOS(3) ) |
| 615 | ROM_LOAD( "318004-05.bin", 0x14000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb) ) |
| 623 | 616 | |
| 624 | | VC1541_ROM ("cpu_vc1540") |
| 617 | /* we temporarily use -bios to select among vc1541 firmwares, for this system */ |
| 618 | VC1541_ROM("cpu_vc1540") |
| 625 | 619 | ROM_END |
| 626 | 620 | |
| 627 | 621 | #define rom_c116 rom_c16 |
| r4790 | r4791 | |
| 629 | 623 | #define rom_c116v rom_c16v |
| 630 | 624 | |
| 631 | 625 | ROM_START( c16hun ) |
| 632 | | ROM_REGION (0x40000, "maincpu", 0) |
| 626 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 633 | 627 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 634 | 628 | ROM_LOAD( "hungary.bin", 0x14000, 0x4000, CRC(775f60c5) SHA1(20cf3c4bf6c54ef09799af41887218933f2e27ee) ) |
| 635 | 629 | ROM_END |
| 636 | 630 | |
| 637 | 631 | ROM_START( plus4 ) |
| 638 | | ROM_REGION (0x40000, "maincpu", 0) |
| 632 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 639 | 633 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 640 | 634 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 641 | 635 | ROMX_LOAD( "318005-05.bin", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(1) ) |
| r4790 | r4791 | |
| 647 | 641 | ROM_END |
| 648 | 642 | |
| 649 | 643 | ROM_START( plus4c ) |
| 650 | | ROM_REGION (0x40000, "maincpu", 0) |
| 644 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 651 | 645 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 652 | 646 | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 653 | 647 | ROMX_LOAD( "318005-05.bin", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(1) ) |
| r4790 | r4791 | |
| 657 | 651 | ROM_LOAD( "317053-01.bin", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) ) |
| 658 | 652 | ROM_LOAD( "317054-01.bin", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) ) |
| 659 | 653 | |
| 660 | | C1551_ROM ("cpu_c1551") |
| 654 | C1551_ROM("cpu_c1551") |
| 661 | 655 | ROM_END |
| 662 | 656 | |
| 663 | 657 | ROM_START( plus4v ) |
| 664 | | ROM_REGION (0x40000, "maincpu", 0) |
| 658 | ROM_REGION( 0x40000, "maincpu", 0 ) |
| 665 | 659 | ROM_LOAD( "318006-01.bin", 0x10000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) ) |
| 666 | | ROM_SYSTEM_BIOS( 0, "default", "rev. 5" ) |
| 667 | | ROMX_LOAD( "318005-05.bin", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(1) ) |
| 668 | | ROM_SYSTEM_BIOS( 1, "rev4", "rev. 4" ) |
| 669 | | ROMX_LOAD( "318005-04.bin", 0x14000, 0x4000, CRC(799a633d) SHA1(5df52c693387c0e2b5d682613a3b5a65477311cf), ROM_BIOS(2) ) |
| 660 | ROM_LOAD( "318005-05.bin", 0x14000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682) ) |
| 670 | 661 | |
| 671 | 662 | ROM_LOAD( "317053-01.bin", 0x18000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) ) |
| 672 | 663 | ROM_LOAD( "317054-01.bin", 0x1c000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) ) |
| 673 | 664 | |
| 674 | | VC1541_ROM ("cpu_vc1540") |
| 665 | /* we temporarily use -bios to select among vc1541 firmwares, for this system */ |
| 666 | VC1541_ROM("cpu_vc1540") |
| 675 | 667 | ROM_END |
| 676 | 668 | |
| 677 | 669 | |
src/mess/drivers/vc20.c
| r4790 | r4791 | |
| 310 | 310 | |
| 311 | 311 | static MACHINE_DRIVER_START( vic20i ) |
| 312 | 312 | MDRV_IMPORT_FROM( vic20 ) |
| 313 | | /*MDRV_IMPORT_FROM( cpu_c2031 )*/ |
| 313 | /* MDRV_IMPORT_FROM( cpu_c2031 ) */ // not emulated yet, we only include the firmware below |
| 314 | 314 | #if 1 || CPU_SYNC |
| 315 | 315 | MDRV_QUANTUM_TIME(HZ(60)) |
| 316 | 316 | #else |
| r4790 | r4791 | |
| 318 | 318 | #endif |
| 319 | 319 | |
| 320 | 320 | MDRV_CPU_MODIFY( "maincpu" ) |
| 321 | | MDRV_CPU_PROGRAM_MAP( vc20i_mem) |
| 321 | MDRV_CPU_PROGRAM_MAP(vc20i_mem) |
| 322 | 322 | MACHINE_DRIVER_END |
| 323 | 323 | |
| 324 | 324 | |
| r4790 | r4791 | |
| 326 | 326 | MDRV_IMPORT_FROM( vic20 ) |
| 327 | 327 | |
| 328 | 328 | MDRV_CPU_REPLACE( "maincpu", M6502, VIC6561_CLOCK ) |
| 329 | | MDRV_CPU_PROGRAM_MAP( vc20i_mem) |
| 329 | MDRV_CPU_PROGRAM_MAP(vc20i_mem) |
| 330 | 330 | |
| 331 | 331 | MDRV_SCREEN_MODIFY("screen") |
| 332 | 332 | MDRV_SCREEN_REFRESH_RATE(VIC6561_VRETRACERATE) |
| r4790 | r4791 | |
| 354 | 354 | |
| 355 | 355 | |
| 356 | 356 | ROM_START( vic1001 ) |
| 357 | | ROM_REGION (0x10000, "maincpu", 0 ) |
| 357 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 358 | 358 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 359 | 359 | ROM_LOAD( "901460.02", 0x8000, 0x1000, CRC(fcfd8a4b) SHA1(dae61ac03065aa2904af5c123ce821855898c555) ) |
| 360 | 360 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| r4790 | r4791 | |
| 364 | 364 | |
| 365 | 365 | |
| 366 | 366 | ROM_START( vic20 ) |
| 367 | | ROM_REGION (0x10000, "maincpu", 0 ) |
| 367 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 368 | 368 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 369 | 369 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 370 | 370 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| r4790 | r4791 | |
| 373 | 373 | ROM_END |
| 374 | 374 | |
| 375 | 375 | ROM_START( vic20pal ) |
| 376 | | ROM_REGION (0x10000, "maincpu", 0 ) |
| 376 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 377 | 377 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 378 | 378 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 379 | 379 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| r4790 | r4791 | |
| 389 | 389 | ROM_START( vic20swe ) |
| 390 | 390 | /* patched pal system for swedish/finish keyboard and chars */ |
| 391 | 391 | /* but in rom? (maybe patched means in this case nec version) */ |
| 392 | | ROM_REGION (0x10000, "maincpu", 0 ) |
| 392 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 393 | 393 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 394 | 394 | ROM_LOAD( "nec22101.207", 0x8000, 0x1000, CRC(d808551d) SHA1(f403f0b0ce5922bd61bbd768bdd6f0b38e648c9f) ) |
| 395 | 395 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| r4790 | r4791 | |
| 399 | 399 | |
| 400 | 400 | |
| 401 | 401 | ROM_START( vic20i ) |
| 402 | | ROM_REGION (0x10000, "maincpu", 0 ) |
| 402 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 403 | 403 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 404 | 404 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 405 | 405 | ROM_FILL( 0x9000, 0x2000, 0xff ) |
| r4790 | r4791 | |
| 407 | 407 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 408 | 408 | ROM_LOAD( "901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19) ) |
| 409 | 409 | |
| 410 | | /* C2031_ROM ("cpu_vc1540") */ |
| 410 | C2031_ROM("cpu_vc1540") // this is not currently emulated, but we document here the firmware |
| 411 | 411 | ROM_END |
| 412 | 412 | |
| 413 | 413 | ROM_START( vic20v ) |
| 414 | | ROM_REGION (0x10000, "maincpu", 0 ) |
| 414 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 415 | 415 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 416 | 416 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 417 | 417 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 418 | 418 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 419 | 419 | ROM_LOAD( "901486.06", 0xe000, 0x2000, CRC(e5e7c174) SHA1(06de7ec017a5e78bd6746d89c2ecebb646efeb19) ) |
| 420 | 420 | |
| 421 | | VC1540_ROM ("cpu_vc1540") |
| 421 | VC1540_ROM("cpu_vc1540") |
| 422 | 422 | ROM_END |
| 423 | 423 | |
| 424 | 424 | ROM_START( vic20plv ) |
| 425 | | ROM_REGION (0x10000, "maincpu", 0 ) |
| 425 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 426 | 426 | ROM_FILL( 0x0000, 0x8000, 0xff ) |
| 427 | 427 | ROM_LOAD( "901460.03", 0x8000, 0x1000, CRC(83e032a6) SHA1(4fd85ab6647ee2ac7ba40f729323f2472d35b9b4) ) |
| 428 | 428 | ROM_FILL( 0x9000, 0x3000, 0xff ) |
| 429 | 429 | ROM_LOAD( "901486.01", 0xc000, 0x2000, CRC(db4c43c1) SHA1(587d1e90950675ab6b12d91248a3f0d640d02e8d) ) |
| 430 | 430 | ROM_LOAD( "901486.07", 0xe000, 0x2000, CRC(4be07cb4) SHA1(ce0137ed69f003a299f43538fa9eee27898e621e) ) |
| 431 | 431 | |
| 432 | | VC1541_ROM("cpu_vc1540") |
| 432 | VC1540_ROM("cpu_vc1540") |
| 433 | 433 | ROM_END |
| 434 | 434 | |
| 435 | 435 | #define rom_vc20v rom_vic20plv |
| r4790 | r4791 | |
| 478 | 478 | |
| 479 | 479 | COMP( 1981, vic20pal, vic20, 0, vc20, vc20, vc20, vic20, "Commodore Business Machines Co.", "VC 20 (PAL)", GAME_IMPERFECT_SOUND) |
| 480 | 480 | COMP( 1981, vic20crp, vic20, 0, vc20, vc20, vc20, vic20, "Commodore Business Machines Co.", "VC 20CR (PAL)", GAME_IMPERFECT_SOUND) |
| 481 | | COMP( 1981, vic20plv, vic20, 0, vc20v, vic20, vc20v, vic20v, "Commodore Business Machines Co.", "VC 20 (PAL, VC1541)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 481 | COMP( 1981, vic20plv, vic20, 0, vc20v, vic20, vc20v, vic20v, "Commodore Business Machines Co.", "VC 20 (PAL, VC1540)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 482 | 482 | COMP( 1981, vc20, vic20, 0, vc20, vc20, vc20, vic20, "Commodore Business Machines Co.", "VIC 20 (PAL, Germany)", GAME_IMPERFECT_SOUND) |
| 483 | | COMP( 1981, vc20v, vic20, 0, vc20v, vic20, vc20v, vic20v, "Commodore Business Machines Co.", "VIC 20 (PAL, Germany, VC1541)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 483 | COMP( 1981, vc20v, vic20, 0, vc20v, vic20, vc20v, vic20v, "Commodore Business Machines Co.", "VIC 20 (PAL, Germany, VC1540)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 484 | 484 | |
| 485 | 485 | COMP( 1981, vic20swe, vic20, 0, vc20, vic20swe, vc20, vic20, "Commodore Business Machines Co.", "VIC 20 (PAL, Swedish Expansion Kit)", GAME_IMPERFECT_SOUND) |