src/mess/machine/apf.c
| r5609 | r5610 | |
| 1 | | /*********************************************************************** |
| 2 | | |
| 3 | | apf.c |
| 4 | | |
| 5 | | Functions to emulate general aspects of the machine (RAM, ROM, |
| 6 | | interrupts, I/O ports) |
| 7 | | |
| 8 | | ***********************************************************************/ |
| 9 | | |
| 10 | | #include "driver.h" |
| 11 | | #include "includes/apf.h" |
| 12 | | #include "devices/cassette.h" |
| 13 | | #include "devices/basicdsk.h" |
| 14 | | |
| 15 | | |
| 16 | | /* 256 bytes per sector, single sided, single density, 40 track */ |
| 17 | | DEVICE_IMAGE_LOAD( apfimag_floppy ) |
| 18 | | { |
| 19 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 20 | | { |
| 21 | | basicdsk_set_geometry(image, 40, 1, 8, 256, 1, 0, FALSE); |
| 22 | | return INIT_PASS; |
| 23 | | } |
| 24 | | |
| 25 | | return INIT_FAIL; |
| 26 | | } |
src/mess/machine/adam.c
| r5609 | r5610 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "video/tms9928a.h" |
| 11 | 11 | #include "includes/adam.h" |
| 12 | #include "devices/flopdrv.h" |
| 12 | 13 | #include "devices/cartslot.h" |
| 13 | | #include "devices/basicdsk.h" |
| 14 | 14 | |
| 15 | 15 | int adam_lower_memory; /* Lower 32k memory Z80 address configuration */ |
| 16 | 16 | int adam_upper_memory; /* Upper 32k memory Z80 address configuration */ |
| r5609 | r5610 | |
| 40 | 40 | return retval; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | | DEVICE_IMAGE_LOAD( adam_floppy ) |
| 44 | | { |
| 45 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 46 | | { |
| 47 | | /* img, tracks, sides, sectors_per_track, sector_length, first_sector_id, offset_track_zero, track_skipping */ |
| 48 | | basicdsk_set_geometry(image, 40, 1, 8, 512, 0, 0, FALSE); |
| 49 | | return INIT_PASS; |
| 50 | | } |
| 51 | | else |
| 52 | | { |
| 53 | | return INIT_FAIL; |
| 54 | | } |
| 55 | | } |
| 56 | | |
| 57 | | |
| 58 | | |
| 59 | | DEVICE_IMAGE_UNLOAD( adam_floppy ) |
| 60 | | { |
| 61 | | device_unload_basicdsk_floppy(image); |
| 62 | | } |
| 63 | | |
| 64 | | |
| 65 | | |
| 66 | 43 | void adam_clear_keyboard_buffer(void) |
| 67 | 44 | { |
| 68 | 45 | int i; |
src/mess/machine/mbee.c
| r5609 | r5610 | |
| 154 | 154 | wd17xx_set_density(mbee_fdc, (data & 8) ? 1 : 0); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | | static DEVICE_IMAGE_LOAD( mbee_floppy ) |
| 158 | | { |
| 159 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 160 | | { |
| 161 | | if (!mame_stricmp(image_filetype(image), "ss80")) |
| 162 | | { |
| 163 | | basicdsk_set_geometry(image, 80, 1, 10, 512, 1, 0, FALSE); |
| 164 | | return INIT_PASS; |
| 165 | | } |
| 166 | | else |
| 167 | | if (!mame_stricmp(image_filetype(image), "ds40")) |
| 168 | | { |
| 169 | | basicdsk_set_geometry(image, 80, 2, 10, 512, 1, 0, FALSE); |
| 170 | | return INIT_PASS; |
| 171 | | } |
| 172 | | else |
| 173 | | if (!mame_stricmp(image_filetype(image), "ds80")) |
| 174 | | { |
| 175 | | basicdsk_set_geometry(image, 160, 2, 10, 512, 1, 0, FALSE); |
| 176 | | return INIT_PASS; |
| 177 | | } |
| 178 | | else |
| 179 | | if (!mame_stricmp(image_filetype(image), "ds84")) |
| 180 | | { |
| 181 | | basicdsk_set_geometry(image, 168, 2, 10, 512, 1, 0, FALSE); |
| 182 | | return INIT_PASS; |
| 183 | | } |
| 184 | | else |
| 185 | | if (!mame_stricmp(image_filetype(image), "dsk")) |
| 186 | | { |
| 187 | | return INIT_FAIL; // not handled yet - CPC-EMU formatted image |
| 188 | | } |
| 189 | | else |
| 190 | | if (!mame_stricmp(image_filetype(image), "img")) |
| 191 | | { |
| 192 | | return INIT_FAIL; // not handled - not investigated yet |
| 193 | | } |
| 194 | | } |
| 195 | | |
| 196 | | return INIT_FAIL; |
| 197 | | } |
| 198 | | |
| 199 | | void mbee_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 200 | | { |
| 201 | | /* floppy */ |
| 202 | | switch(state) |
| 203 | | { |
| 204 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 205 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 206 | | |
| 207 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 208 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(mbee_floppy); break; |
| 209 | | |
| 210 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 211 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "ss80,ds40,ds80,ds84,dsk,img"); break; |
| 212 | | |
| 213 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 214 | | } |
| 215 | | } |
| 216 | | |
| 217 | | |
| 218 | 157 | /*********************************************************** |
| 219 | 158 | |
| 220 | 159 | Machine |
src/mess/machine/b2m.c
| r5609 | r5610 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "cpu/i8085/i8085.h" |
| 12 | 12 | #include "devices/cassette.h" |
| 13 | | #include "devices/basicdsk.h" |
| 14 | 13 | #include "machine/i8255a.h" |
| 15 | 14 | #include "machine/pit8253.h" |
| 16 | 15 | #include "machine/wd17xx.h" |
| r5609 | r5610 | |
| 360 | 359 | b2m_set_bank(machine, 7); |
| 361 | 360 | } |
| 362 | 361 | |
| 363 | | DEVICE_IMAGE_LOAD( b2m_floppy ) |
| 364 | | { |
| 365 | | int size; |
| 366 | | |
| 367 | | if (! image_has_been_created(image)) |
| 368 | | { |
| 369 | | size = image_length(image); |
| 370 | | |
| 371 | | switch (size) |
| 372 | | { |
| 373 | | case 800*1024: |
| 374 | | break; |
| 375 | | default: |
| 376 | | return INIT_FAIL; |
| 377 | | } |
| 378 | | } |
| 379 | | else |
| 380 | | return INIT_FAIL; |
| 381 | | |
| 382 | | if (device_load_basicdsk_floppy (image) != INIT_PASS) |
| 383 | | return INIT_FAIL; |
| 384 | | |
| 385 | | basicdsk_set_geometry (image, 80, 2, 5, 1024, 1, 0, FALSE); |
| 386 | | return INIT_PASS; |
| 387 | | } |
| 388 | | |
| 389 | | |
| 390 | 362 | static STREAM_UPDATE( b2m_sh_update ) |
| 391 | 363 | { |
| 392 | 364 | INT16 channel_1_signal; |
src/mess/machine/vector06.c
| r5609 | r5610 | |
| 12 | 12 | #include "machine/i8255a.h" |
| 13 | 13 | #include "machine/wd17xx.h" |
| 14 | 14 | #include "devices/cassette.h" |
| 15 | | #include "devices/basicdsk.h" |
| 16 | 15 | #include "includes/vector06.h" |
| 17 | 16 | |
| 18 | 17 | UINT8 vector06_keyboard_mask; |
| r5609 | r5610 | |
| 176 | 175 | wd17xx_set_drive(fdc,data & 1); |
| 177 | 176 | } |
| 178 | 177 | |
| 179 | | DEVICE_IMAGE_LOAD( vector_floppy ) |
| 180 | | { |
| 181 | | int size; |
| 182 | | |
| 183 | | if (! image_has_been_created(image)) |
| 184 | | { |
| 185 | | size = image_length(image); |
| 186 | | |
| 187 | | switch (size) |
| 188 | | { |
| 189 | | case 820*1024: |
| 190 | | break; |
| 191 | | default: |
| 192 | | return INIT_FAIL; |
| 193 | | } |
| 194 | | } |
| 195 | | else |
| 196 | | return INIT_FAIL; |
| 197 | | |
| 198 | | if (device_load_basicdsk_floppy (image) != INIT_PASS) |
| 199 | | return INIT_FAIL; |
| 200 | | |
| 201 | | basicdsk_set_geometry (image, 82, 2, 5, 1024, 1, 0, FALSE); |
| 202 | | return INIT_PASS; |
| 203 | | } |
| 204 | | |
| 205 | | |
| 206 | 178 | MACHINE_START( vector06 ) |
| 207 | 179 | { |
| 208 | 180 | const device_config *fdc = devtag_get_device(machine, "wd1793"); |
src/mess/machine/orion.c
| r5609 | r5610 | |
| 11 | 11 | #include "driver.h" |
| 12 | 12 | #include "cpu/i8085/i8085.h" |
| 13 | 13 | #include "devices/cassette.h" |
| 14 | | #include "devices/basicdsk.h" |
| 15 | 14 | #include "machine/mc146818.h" |
| 16 | 15 | #include "machine/wd17xx.h" |
| 17 | 16 | #include "sound/speaker.h" |
| r5609 | r5610 | |
| 185 | 184 | radio86_init_keyboard(); |
| 186 | 185 | } |
| 187 | 186 | |
| 188 | | |
| 189 | | DEVICE_IMAGE_LOAD( orion_floppy ) |
| 190 | | { |
| 191 | | int size; |
| 192 | | |
| 193 | | if (! image_has_been_created(image)) |
| 194 | | { |
| 195 | | size = image_length(image); |
| 196 | | |
| 197 | | switch (size) |
| 198 | | { |
| 199 | | case 800*1024: |
| 200 | | break; |
| 201 | | case 720*1024: |
| 202 | | break; |
| 203 | | default: |
| 204 | | return INIT_FAIL; |
| 205 | | } |
| 206 | | } |
| 207 | | else |
| 208 | | return INIT_FAIL; |
| 209 | | |
| 210 | | if (device_load_basicdsk_floppy (image) != INIT_PASS) |
| 211 | | return INIT_FAIL; |
| 212 | | |
| 213 | | if (size==800*1024) |
| 214 | | { |
| 215 | | basicdsk_set_geometry (image, 80, 2, 5, 1024, 1, 0, FALSE); |
| 216 | | } |
| 217 | | else |
| 218 | | { |
| 219 | | basicdsk_set_geometry (image, 80, 2, 9, 512, 1, 0, FALSE); |
| 220 | | } |
| 221 | | return INIT_PASS; |
| 222 | | } |
| 223 | | |
| 224 | 187 | static WRITE8_HANDLER ( orion_disk_control_w ) |
| 225 | 188 | { |
| 226 | 189 | const device_config *fdc = devtag_get_device(space->machine, "wd1793"); |
src/mess/machine/abcbus.c
| r5609 | r5610 | |
| 1 | 1 | #include "driver.h" |
| 2 | 2 | #include "abcbus.h" |
| 3 | | #include "devices/basicdsk.h" |
| 4 | 3 | |
| 4 | #include "formats/basicdsk.h" |
| 5 | |
| 5 | 6 | typedef struct _abcbus_daisy_state abcbus_daisy_state; |
| 6 | 7 | struct _abcbus_daisy_state |
| 7 | 8 | { |
| r5609 | r5610 | |
| 66 | 67 | return 0xff; |
| 67 | 68 | } |
| 68 | 69 | |
| 69 | | DEVICE_IMAGE_LOAD( abc_floppy ) |
| 70 | | { |
| 71 | | int size, tracks, heads, sectors; |
| 72 | | |
| 73 | | if (image_has_been_created(image)) |
| 74 | | return INIT_FAIL; |
| 75 | | |
| 76 | | size = image_length (image); |
| 77 | | switch (size) |
| 78 | | { |
| 79 | | case 80*1024: /* Scandia Metric FD2 */ |
| 80 | | tracks = 40; |
| 81 | | heads = 1; |
| 82 | | sectors = 8; |
| 83 | | break; |
| 84 | | case 160*1024: /* ABC 830 */ |
| 85 | | tracks = 40; |
| 86 | | heads = 1; |
| 87 | | sectors = 16; |
| 88 | | break; |
| 89 | | case 640*1024: /* ABC 832/834 */ |
| 90 | | tracks = 80; |
| 91 | | heads = 2; |
| 92 | | sectors = 16; |
| 93 | | break; |
| 94 | | case 1001*1024: /* ABC 838 */ |
| 95 | | tracks = 77; |
| 96 | | heads = 2; |
| 97 | | sectors = 26; |
| 98 | | break; |
| 99 | | default: |
| 100 | | return INIT_FAIL; |
| 101 | | } |
| 102 | | |
| 103 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 104 | | { |
| 105 | | /* sector id's 0-9 */ |
| 106 | | /* drive, tracks, heads, sectors per track, sector length, dir_sector, dir_length, first sector id */ |
| 107 | | basicdsk_set_geometry(image, tracks, heads, sectors, 256, 0, 0, FALSE); |
| 108 | | return INIT_PASS; |
| 109 | | } |
| 110 | | |
| 111 | | return INIT_FAIL; |
| 112 | | } |
| 70 | FLOPPY_OPTIONS_START(abc80) |
| 71 | FLOPPY_OPTION(abc80, "dsk", "Scandia Metric FD2", basicdsk_identify_default, basicdsk_construct_default, |
| 72 | HEADS([1]) |
| 73 | TRACKS([40]) |
| 74 | SECTORS([8]) |
| 75 | SECTOR_LENGTH([256]) |
| 76 | FIRST_SECTOR_ID([0])) |
| 77 | FLOPPY_OPTION(abc80, "dsk", "ABC 830", basicdsk_identify_default, basicdsk_construct_default, |
| 78 | HEADS([1]) |
| 79 | TRACKS([40]) |
| 80 | SECTORS([16]) |
| 81 | SECTOR_LENGTH([256]) |
| 82 | FIRST_SECTOR_ID([0])) |
| 83 | FLOPPY_OPTION(abc80, "dsk", "ABC 832/834", basicdsk_identify_default, basicdsk_construct_default, |
| 84 | HEADS([2]) |
| 85 | TRACKS([80]) |
| 86 | SECTORS([16]) |
| 87 | SECTOR_LENGTH([256]) |
| 88 | FIRST_SECTOR_ID([0])) |
| 89 | FLOPPY_OPTION(abc80, "dsk", "ABC 838", basicdsk_identify_default, basicdsk_construct_default, |
| 90 | HEADS([2]) |
| 91 | TRACKS([77]) |
| 92 | SECTORS([26]) |
| 93 | SECTOR_LENGTH([256]) |
| 94 | FIRST_SECTOR_ID([0])) |
| 95 | FLOPPY_OPTIONS_END |
src/mess/machine/nascom1.c
| r5609 | r5610 | |
| 14 | 14 | #include "machine/ay31015.h" |
| 15 | 15 | |
| 16 | 16 | /* Devices */ |
| 17 | | #include "devices/basicdsk.h" |
| 18 | 17 | #include "devices/snapquik.h" |
| 19 | 18 | #include "devices/cassette.h" |
| 20 | 19 | |
| r5609 | r5610 | |
| 103 | 102 | return (nascom2_fdc.drq << 7) | nascom2_fdc.irq; |
| 104 | 103 | } |
| 105 | 104 | |
| 106 | | |
| 107 | | DEVICE_IMAGE_LOAD( nascom2_floppy ) |
| 108 | | { |
| 109 | | int sides, sectors; |
| 110 | | const device_config *fdc = devtag_get_device(image->machine, "wd1793"); |
| 111 | | if (!image_has_been_created(image)) |
| 112 | | { |
| 113 | | switch (image_length(image)) |
| 114 | | { |
| 115 | | case 80 * 2 * 2 * 8 * 256: |
| 116 | | sides = 2; |
| 117 | | sectors = 2 * 8; |
| 118 | | wd17xx_set_density(fdc,DEN_FM_HI); |
| 119 | | break; |
| 120 | | |
| 121 | | case 80 * 1 * 2 * 8 * 256: |
| 122 | | sides = 1; |
| 123 | | sectors = 2 * 8; |
| 124 | | wd17xx_set_density(fdc,DEN_FM_HI); |
| 125 | | break; |
| 126 | | |
| 127 | | default: |
| 128 | | return INIT_FAIL; |
| 129 | | } |
| 130 | | } |
| 131 | | else |
| 132 | | { |
| 133 | | return INIT_FAIL; |
| 134 | | } |
| 135 | | |
| 136 | | if (device_load_basicdsk_floppy(image) != INIT_PASS) |
| 137 | | { |
| 138 | | return INIT_FAIL; |
| 139 | | } |
| 140 | | |
| 141 | | basicdsk_set_geometry(image, 80, sides, sectors, 256, 1, 0, FALSE); |
| 142 | | |
| 143 | | return INIT_PASS; |
| 144 | | } |
| 145 | | |
| 146 | | |
| 147 | | |
| 148 | 105 | /************************************* |
| 149 | 106 | * |
| 150 | 107 | * Keyboard |
| r5609 | r5610 | |
| 296 | 253 | |
| 297 | 254 | MACHINE_RESET( nascom1 ) |
| 298 | 255 | { |
| 256 | const device_config *fdc = devtag_get_device(machine, "wd1793"); |
| 257 | |
| 258 | wd17xx_set_density(fdc,DEN_FM_HI); |
| 259 | |
| 299 | 260 | nascom1_hd6402 = devtag_get_device(machine, "hd6402"); |
| 300 | 261 | |
| 301 | 262 | /* Set up hd6402 pins */ |
src/mess/machine/z80ne.c
| r5609 | r5610 | |
| 18 | 18 | #include "video/m6847.h" |
| 19 | 19 | |
| 20 | 20 | /* Devices */ |
| 21 | | #include "devices/basicdsk.h" |
| 22 | 21 | #include "devices/cassette.h" |
| 23 | 22 | #include "devices/flopdrv.h" |
| 24 | 23 | |
| r5609 | r5610 | |
| 73 | 72 | UINT8 head; /* current head */ |
| 74 | 73 | } wd17xx_state; |
| 75 | 74 | |
| 76 | | |
| 77 | | DEVICE_IMAGE_LOAD( z80ne_floppy ) |
| 78 | | { |
| 79 | | static UINT8 pdrive[4*16]; |
| 80 | | int i; |
| 81 | | int tracks; /* total tracks count per drive */ |
| 82 | | int heads; /* total heads count per drive */ |
| 83 | | int spt; /* sector per track count per drive */ |
| 84 | | int dir_sector; /* first directory sector (aka DDSL) */ |
| 85 | | int dir_length; /* length of directory in sectors (aka DDGA) */ |
| 86 | | int id = image_index_in_device(image); |
| 87 | | |
| 88 | | if (device_load_basicdsk_floppy(image) != INIT_PASS) |
| 89 | | return INIT_FAIL; |
| 90 | | |
| 91 | | if (image_index_in_device(image) == 0) /* first floppy? */ |
| 92 | | { |
| 93 | | image_fseek(image, 0, SEEK_SET); |
| 94 | | image_fread(image, pdrive, 2); |
| 95 | | #if 0 |
| 96 | | if (pdrive[0] != 0x00 || pdrive[1] != 0xfe) |
| 97 | | { |
| 98 | | basicdsk_read_sectormap(image, &tracks[id], &heads[id], &spt[id]); |
| 99 | | } |
| 100 | | else |
| 101 | | #endif |
| 102 | | |
| 103 | | image_fseek(image, 2 * 256, SEEK_SET); |
| 104 | | image_fread(image, pdrive, 4*16); |
| 105 | | } |
| 106 | | |
| 107 | | tracks = pdrive[id*16+3] + 1; |
| 108 | | heads = (pdrive[id*16+7] & 0x40) ? 2 : 1; |
| 109 | | spt = pdrive[id*16+4] / heads; |
| 110 | | dir_sector = 5 * pdrive[id*16+0] * pdrive[id*16+5]; |
| 111 | | dir_length = 5 * pdrive[id*16+9]; |
| 112 | | |
| 113 | | /* set geometry so disk image can be read */ |
| 114 | | basicdsk_set_geometry(image, tracks, heads, spt, 256, 0, 0, FALSE); |
| 115 | | |
| 116 | | /* mark directory sectors with deleted data address mark */ |
| 117 | | /* assumption dir_sector is a sector offset */ |
| 118 | | for (i = 0; i < dir_length; i++) |
| 119 | | { |
| 120 | | int track, side, sector_id; |
| 121 | | int track_offset, sector_offset; |
| 122 | | |
| 123 | | /* calc sector offset */ |
| 124 | | sector_offset = dir_sector + i; |
| 125 | | |
| 126 | | /* get track offset */ |
| 127 | | track_offset = sector_offset / spt; |
| 128 | | |
| 129 | | /* calc track */ |
| 130 | | track = track_offset / heads; |
| 131 | | |
| 132 | | /* calc side */ |
| 133 | | side = track_offset % heads; |
| 134 | | |
| 135 | | /* calc sector id - first sector id is 0! */ |
| 136 | | sector_id = sector_offset % spt; |
| 137 | | |
| 138 | | /* set deleted data address mark for sector specified */ |
| 139 | | basicdsk_set_ddam(image, track, side, sector_id, 1); |
| 140 | | } |
| 141 | | return INIT_PASS; |
| 142 | | } |
| 143 | | |
| 144 | | |
| 145 | 75 | static const device_config *cassette_device_image(running_machine *machine) |
| 146 | 76 | { |
| 147 | 77 | if (lx385_ctrl & 0x08) |
src/mess/machine/msx.c
| r5609 | r5610 | |
| 17 | 17 | #include "includes/msx.h" |
| 18 | 18 | #include "machine/tc8521.h" |
| 19 | 19 | #include "machine/wd17xx.h" |
| 20 | | #include "devices/basicdsk.h" |
| 20 | #include "devices/mflopimg.h" |
| 21 | #include "formats/basicdsk.h" |
| 21 | 22 | #include "video/tms9928a.h" |
| 22 | 23 | #include "cpu/z80/z80.h" |
| 23 | 24 | #include "video/v9938.h" |
| r5609 | r5610 | |
| 722 | 723 | |
| 723 | 724 | const wd17xx_interface msx_wd17xx_interface = { msx_wd179x_int, NULL }; |
| 724 | 725 | |
| 725 | | DEVICE_IMAGE_LOAD( msx_floppy ) |
| 726 | | { |
| 727 | | int size, heads = 2; |
| 726 | FLOPPY_OPTIONS_START(msx) |
| 727 | FLOPPY_OPTION(msx, "dsk", "MSX SS", basicdsk_identify_default, basicdsk_construct_default, |
| 728 | HEADS([1]) |
| 729 | TRACKS([80]) |
| 730 | SECTORS([9]) |
| 731 | SECTOR_LENGTH([512]) |
| 732 | FIRST_SECTOR_ID([1])) |
| 733 | FLOPPY_OPTION(msx, "dsk", "MSX DS", basicdsk_identify_default, basicdsk_construct_default, |
| 734 | HEADS([2]) |
| 735 | TRACKS([80]) |
| 736 | SECTORS([9]) |
| 737 | SECTOR_LENGTH([512]) |
| 738 | FIRST_SECTOR_ID([1])) |
| 739 | FLOPPY_OPTIONS_END |
| 728 | 740 | |
| 729 | | if (! image_has_been_created(image)) |
| 730 | | { |
| 731 | | size = image_length(image); |
| 732 | | |
| 733 | | switch (size) |
| 734 | | { |
| 735 | | case 360*1024: |
| 736 | | heads = 1; |
| 737 | | case 720*1024: |
| 738 | | break; |
| 739 | | default: |
| 740 | | return INIT_FAIL; |
| 741 | | } |
| 742 | | } |
| 743 | | else |
| 744 | | return INIT_FAIL; |
| 745 | | |
| 746 | | if (device_load_basicdsk_floppy (image) != INIT_PASS) |
| 747 | | return INIT_FAIL; |
| 748 | | |
| 749 | | basicdsk_set_geometry (image, 80, heads, 9, 512, 1, 0, FALSE); |
| 750 | | |
| 751 | | return INIT_PASS; |
| 752 | | } |
| 753 | | |
| 754 | 741 | /* |
| 755 | 742 | ** The PPI functions |
| 756 | 743 | */ |
src/mess/machine/kaypro.c
| r5609 | r5610 | |
| 3 | 3 | #include "cpu/z80/z80.h" |
| 4 | 4 | #include "machine/ctronics.h" |
| 5 | 5 | #include "machine/kay_kbd.h" |
| 6 | | #include "devices/basicdsk.h" |
| 7 | 6 | #include "devices/snapquik.h" |
| 8 | 7 | #include "includes/kaypro.h" |
| 9 | 8 | |
| r5609 | r5610 | |
| 348 | 347 | |
| 349 | 348 | const wd17xx_interface kaypro_wd1793_interface = { kaypro_fdc_callback, NULL }; |
| 350 | 349 | |
| 351 | | static DEVICE_IMAGE_LOAD( kayproii_floppy ) |
| 352 | | { |
| 353 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 354 | | { |
| 355 | | basicdsk_set_geometry(image, 40, 1, 10, 512, 0, 0, FALSE); |
| 356 | | return INIT_PASS; |
| 357 | | } |
| 358 | | |
| 359 | | return INIT_FAIL; |
| 360 | | } |
| 361 | | |
| 362 | | static DEVICE_IMAGE_LOAD( kaypro2x_floppy ) |
| 363 | | { |
| 364 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 365 | | { |
| 366 | | basicdsk_set_geometry(image, 80, 2, 10, 512, 0, 0, FALSE); |
| 367 | | return INIT_PASS; |
| 368 | | } |
| 369 | | |
| 370 | | return INIT_FAIL; |
| 371 | | } |
| 372 | | |
| 373 | | void kayproii_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 374 | | { |
| 375 | | /* floppy */ |
| 376 | | switch(state) |
| 377 | | { |
| 378 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 379 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 380 | | |
| 381 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 382 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(kayproii_floppy); break; |
| 383 | | |
| 384 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 385 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 386 | | |
| 387 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 388 | | } |
| 389 | | } |
| 390 | | |
| 391 | | /* all machines have 2 floppies except kaypro 10 has one floppy and one hard drive */ |
| 392 | | void kaypro2x_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 393 | | { |
| 394 | | /* floppy */ |
| 395 | | switch(state) |
| 396 | | { |
| 397 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 398 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 399 | | |
| 400 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 401 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(kaypro2x_floppy); break; |
| 402 | | |
| 403 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 404 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 405 | | |
| 406 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 407 | | } |
| 408 | | } |
| 409 | | |
| 410 | | |
| 411 | 350 | /*********************************************************** |
| 412 | 351 | |
| 413 | 352 | Machine |
src/mess/machine/exidy.c
| r5609 | r5610 | |
| 8 | 8 | #include "sound/speaker.h" |
| 9 | 9 | #include "sound/wave.h" |
| 10 | 10 | #include "machine/ctronics.h" |
| 11 | | #include "devices/basicdsk.h" |
| 12 | 11 | #include "devices/cassette.h" |
| 13 | 12 | #include "devices/snapquik.h" |
| 14 | 13 | #include "devices/cartslot.h" |
| 15 | 14 | #include "machine/ay31015.h" |
| 16 | 15 | #include "includes/exidy.h" |
| 16 | #include "devices/mflopimg.h" |
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | static const device_config *exidy_ay31015; |
| 20 | 20 | |
| 21 | | |
| 22 | | static DEVICE_IMAGE_LOAD( exidy_floppy ) |
| 23 | | { |
| 24 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 25 | | { |
| 26 | | /* not correct */ |
| 27 | | basicdsk_set_geometry(image, 80, 2, 9, 512, 1, 0, FALSE); |
| 28 | | return INIT_PASS; |
| 29 | | } |
| 30 | | |
| 31 | | return INIT_FAIL; |
| 32 | | } |
| 33 | | |
| 34 | | |
| 35 | 21 | static UINT8 exidy_fe = 0xff; |
| 36 | 22 | static UINT8 exidy_keyboard_line; |
| 37 | 23 | |
| r5609 | r5610 | |
| 404 | 390 | } |
| 405 | 391 | } |
| 406 | 392 | |
| 407 | | void exidy_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 408 | | { |
| 409 | | /* floppy */ |
| 410 | | switch(state) |
| 411 | | { |
| 412 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 413 | | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 414 | | |
| 415 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 416 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(exidy_floppy); break; |
| 417 | | |
| 418 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 419 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 420 | | |
| 421 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 422 | | } |
| 423 | | } |
| 424 | | |
| 425 | 393 | MACHINE_START( exidyd ) |
| 426 | 394 | { |
| 427 | 395 | // serial_timer = timer_alloc(machine, exidy_serial_timer_callback, NULL); |
src/mess/machine/atom.c
| r5609 | r5610 | |
| 21 | 21 | #include "machine/ctronics.h" |
| 22 | 22 | #include "machine/i8271.h" |
| 23 | 23 | #include "machine/6522via.h" |
| 24 | | #include "devices/basicdsk.h" |
| 25 | 24 | #include "devices/flopdrv.h" |
| 26 | 25 | #include "devices/cassette.h" |
| 27 | 26 | #include "devices/snapquik.h" |
| r5609 | r5610 | |
| 268 | 267 | return INIT_PASS; |
| 269 | 268 | } |
| 270 | 269 | |
| 271 | | |
| 272 | | /* load floppy */ |
| 273 | | DEVICE_IMAGE_LOAD( atom_floppy ) |
| 274 | | { |
| 275 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 276 | | { |
| 277 | | /* sector id's 0-9 */ |
| 278 | | /* drive, tracks, heads, sectors per track, sector length, dir_sector, dir_length, first sector id */ |
| 279 | | basicdsk_set_geometry(image, 80, 1, 10, 256, 0, 0, FALSE); |
| 280 | | |
| 281 | | return INIT_PASS; |
| 282 | | } |
| 283 | | |
| 284 | | return INIT_PASS; |
| 285 | | } |
| 286 | | |
| 287 | | |
| 288 | 270 | READ8_DEVICE_HANDLER (atom_8255_porta_r ) |
| 289 | 271 | { |
| 290 | 272 | /* logerror("8255: Read port a\n"); */ |
src/mess/machine/partner.c
| r5609 | r5610 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "cpu/i8085/i8085.h" |
| 12 | 12 | #include "devices/cassette.h" |
| 13 | | #include "devices/basicdsk.h" |
| 14 | 13 | #include "machine/i8255a.h" |
| 15 | 14 | #include "machine/8257dma.h" |
| 16 | 15 | #include "machine/wd17xx.h" |
| r5609 | r5610 | |
| 54 | 53 | wd17xx_set_pause_time(fdc,10); |
| 55 | 54 | } |
| 56 | 55 | |
| 57 | | DEVICE_IMAGE_LOAD( partner_floppy ) |
| 58 | | { |
| 59 | | int size; |
| 60 | | |
| 61 | | if (! image_has_been_created(image)) |
| 62 | | { |
| 63 | | size = image_length(image); |
| 64 | | |
| 65 | | switch (size) |
| 66 | | { |
| 67 | | case 800*1024: |
| 68 | | break; |
| 69 | | default: |
| 70 | | return INIT_FAIL; |
| 71 | | } |
| 72 | | } |
| 73 | | else |
| 74 | | return INIT_FAIL; |
| 75 | | |
| 76 | | if (device_load_basicdsk_floppy (image) != INIT_PASS) |
| 77 | | return INIT_FAIL; |
| 78 | | |
| 79 | | basicdsk_set_geometry (image, 80, 2, 5, 1024, 0, 0, FALSE); |
| 80 | | return INIT_PASS; |
| 81 | | } |
| 82 | | |
| 83 | 56 | static void partner_window_1(running_machine *machine, UINT8 bank, UINT16 offset,UINT8 *rom) |
| 84 | 57 | { |
| 85 | 58 | switch(partner_win_mem_page) { |
src/mess/machine/special.c
| r5609 | r5610 | |
| 12 | 12 | #include "cpu/i8085/i8085.h" |
| 13 | 13 | #include "sound/dac.h" |
| 14 | 14 | #include "devices/cassette.h" |
| 15 | | #include "devices/basicdsk.h" |
| 16 | 15 | #include "machine/i8255a.h" |
| 17 | 16 | #include "machine/pit8253.h" |
| 18 | 17 | #include "machine/wd17xx.h" |
| r5609 | r5610 | |
| 294 | 293 | } |
| 295 | 294 | } |
| 296 | 295 | |
| 297 | | static unsigned long specimx_calcoffset(UINT8 t, UINT8 h, UINT8 s, |
| 298 | | UINT8 tracks, UINT8 heads, UINT8 sec_per_track, UINT16 sector_length, UINT8 first_sector_id, UINT16 offset_track_zero) |
| 299 | | { |
| 300 | | unsigned long o; |
| 301 | | o = (t * 1024 * 5 * 2) + (h * 1024 * 5) + 1024 * (s-1); |
| 302 | | return o; |
| 303 | | } |
| 304 | | |
| 305 | | DEVICE_IMAGE_LOAD( specimx_floppy ) |
| 306 | | { |
| 307 | | int size; |
| 308 | | |
| 309 | | if (! image_has_been_created(image)) |
| 310 | | { |
| 311 | | size = image_length(image); |
| 312 | | |
| 313 | | switch (size) |
| 314 | | { |
| 315 | | case 800*1024: |
| 316 | | break; |
| 317 | | default: |
| 318 | | return INIT_FAIL; |
| 319 | | } |
| 320 | | } |
| 321 | | else |
| 322 | | return INIT_FAIL; |
| 323 | | |
| 324 | | if (device_load_basicdsk_floppy (image) != INIT_PASS) |
| 325 | | return INIT_FAIL; |
| 326 | | |
| 327 | | basicdsk_set_geometry (image, 80, 2, 6, 1024, 1, 0, FALSE); |
| 328 | | basicdsk_set_calcoffset(image, specimx_calcoffset); |
| 329 | | return INIT_PASS; |
| 330 | | } |
| 331 | | |
| 332 | | |
| 333 | 296 | /* |
| 334 | 297 | Erik |
| 335 | 298 | */ |
src/mess/machine/bbc.c
| r5609 | r5610 | |
| 20 | 20 | #include "machine/i8271.h" |
| 21 | 21 | #include "machine/mc146818.h" |
| 22 | 22 | #include "machine/ctronics.h" |
| 23 | | #include "devices/basicdsk.h" |
| 24 | 23 | #include "devices/cassette.h" |
| 25 | 24 | |
| 26 | 25 | /* BBC Memory Size */ |
| r5609 | r5610 | |
| 1459 | 1458 | BBC_Cassette_motor(space->machine, (data & 0x80) >> 7); |
| 1460 | 1459 | } |
| 1461 | 1460 | |
| 1462 | | |
| 1463 | | |
| 1464 | | |
| 1465 | 1461 | /************************************** |
| 1466 | | load floppy disc |
| 1467 | | ***************************************/ |
| 1468 | | |
| 1469 | | DEVICE_IMAGE_LOAD( bbc_floppy ) |
| 1470 | | { |
| 1471 | | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 1472 | | { |
| 1473 | | /* sector id's 0-9 */ |
| 1474 | | /* drive, tracks, heads, sectors per track, sector length, dir_sector, dir_length, first sector id */ |
| 1475 | | basicdsk_set_geometry(image, 80, 1, 10, 256, 0, 0, FALSE); |
| 1476 | | |
| 1477 | | return INIT_PASS; |
| 1478 | | } |
| 1479 | | |
| 1480 | | return INIT_FAIL; |
| 1481 | | } |
| 1482 | | |
| 1483 | | |
| 1484 | | /************************************** |
| 1485 | 1462 | i8271 disc control function |
| 1486 | 1463 | ***************************************/ |
| 1487 | 1464 | |
src/mess/drivers/mbee.c
| r5609 | r5610 | |
| 66 | 66 | #include "cpu/z80/z80.h" |
| 67 | 67 | #include "cpu/z80/z80daisy.h" |
| 68 | 68 | #include "sound/wave.h" |
| 69 | #include "devices/mflopimg.h" |
| 70 | #include "formats/basicdsk.h" |
| 69 | 71 | #include "includes/mbee.h" |
| 70 | 72 | |
| 71 | 73 | size_t mbee_size; |
| r5609 | r5610 | |
| 667 | 669 | Game driver(s) |
| 668 | 670 | |
| 669 | 671 | ***************************************************************************/ |
| 672 | static FLOPPY_OPTIONS_START(mbee) |
| 673 | FLOPPY_OPTION(mbee, "ss80", "SS80 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 674 | HEADS([1]) |
| 675 | TRACKS([80]) |
| 676 | SECTORS([10]) |
| 677 | SECTOR_LENGTH([512]) |
| 678 | FIRST_SECTOR_ID([1])) |
| 679 | FLOPPY_OPTION(mbee, "ds40", "DS40 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 680 | HEADS([2]) |
| 681 | TRACKS([80]) |
| 682 | SECTORS([10]) |
| 683 | SECTOR_LENGTH([512]) |
| 684 | FIRST_SECTOR_ID([1])) |
| 685 | FLOPPY_OPTION(mbee, "ds80", "DS80 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 686 | HEADS([2]) |
| 687 | TRACKS([160]) |
| 688 | SECTORS([10]) |
| 689 | SECTOR_LENGTH([512]) |
| 690 | FIRST_SECTOR_ID([1])) |
| 691 | FLOPPY_OPTION(mbee, "ds84", "DS84 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 692 | HEADS([2]) |
| 693 | TRACKS([168]) |
| 694 | SECTORS([10]) |
| 695 | SECTOR_LENGTH([512]) |
| 696 | FIRST_SECTOR_ID([1])) |
| 697 | FLOPPY_OPTIONS_END |
| 670 | 698 | |
| 699 | static void mbee_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 700 | { |
| 701 | /* floppy */ |
| 702 | switch(state) |
| 703 | { |
| 704 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 705 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 706 | |
| 707 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 708 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_mbee; break; |
| 709 | |
| 710 | default: floppy_device_getinfo(devclass, state, info); break; |
| 711 | } |
| 712 | } |
| 713 | |
| 671 | 714 | static SYSTEM_CONFIG_START(mbeeic) |
| 672 | 715 | CONFIG_DEVICE(mbee_floppy_getinfo) |
| 673 | 716 | SYSTEM_CONFIG_END |
src/mess/drivers/tmc600.c
| r5609 | r5610 | |
| 81 | 81 | |
| 82 | 82 | #include "driver.h" |
| 83 | 83 | #include "machine/ctronics.h" |
| 84 | | #include "devices/basicdsk.h" |
| 84 | #include "devices/mflopimg.h" |
| 85 | #include "formats/basicdsk.h" |
| 85 | 86 | #include "devices/cassette.h" |
| 86 | 87 | #include "devices/snapquik.h" |
| 87 | 88 | #include "cpu/cdp1802/cdp1802.h" |
| r5609 | r5610 | |
| 363 | 364 | ROM_END |
| 364 | 365 | |
| 365 | 366 | /* System Configuration */ |
| 367 | static FLOPPY_OPTIONS_START(tmc600) |
| 368 | // dsk |
| 369 | FLOPPY_OPTIONS_END |
| 366 | 370 | |
| 367 | 371 | static void tmc600_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 368 | 372 | { |
| r5609 | r5610 | |
| 370 | 374 | switch(state) |
| 371 | 375 | { |
| 372 | 376 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 373 | | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 377 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 374 | 378 | |
| 375 | 379 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 376 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(basicdsk_floppy); break; |
| 380 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_tmc600; break; |
| 377 | 381 | |
| 378 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 379 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 380 | | |
| 381 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 382 | default: floppy_device_getinfo(devclass, state, info); break; |
| 382 | 383 | } |
| 383 | 384 | } |
| 384 | 385 | |
src/mess/drivers/b2m.c
| r5609 | r5610 | |
| 15 | 15 | #include "machine/pic8259.h" |
| 16 | 16 | #include "machine/msm8251.h" |
| 17 | 17 | #include "machine/wd17xx.h" |
| 18 | | #include "devices/basicdsk.h" |
| 18 | #include "devices/mflopimg.h" |
| 19 | #include "formats/basicdsk.h" |
| 19 | 20 | #include "includes/b2m.h" |
| 20 | 21 | |
| 21 | 22 | |
| r5609 | r5610 | |
| 225 | 226 | MDRV_CPU_IO_MAP(b2m_rom_io) |
| 226 | 227 | MACHINE_DRIVER_END |
| 227 | 228 | |
| 228 | | static void b2m_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 229 | static FLOPPY_OPTIONS_START(b2m) |
| 230 | FLOPPY_OPTION(b2m, "cpm", "Bashkiria-2M disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 231 | HEADS([2]) |
| 232 | TRACKS([80]) |
| 233 | SECTORS([5]) |
| 234 | SECTOR_LENGTH([1024]) |
| 235 | FIRST_SECTOR_ID([1])) |
| 236 | FLOPPY_OPTIONS_END |
| 237 | |
| 238 | static void b2m_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 229 | 239 | { |
| 230 | 240 | /* floppy */ |
| 231 | 241 | switch(state) |
| r5609 | r5610 | |
| 234 | 244 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 235 | 245 | |
| 236 | 246 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 237 | | case MESS_DEVINFO_PTR_LOAD: info->load = device_load_b2m_floppy; break; |
| 247 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_b2m; break; |
| 238 | 248 | |
| 239 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 240 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "cpm"); break; |
| 249 | default: floppy_device_getinfo(devclass, state, info); break; |
| 250 | } |
| 251 | } |
| 241 | 252 | |
| 242 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 243 | | } |
| 244 | | } |
| 245 | 253 | /* ROM definition */ |
| 246 | 254 | |
| 247 | 255 | ROM_START( b2m ) |
src/mess/drivers/abc80.c
| r5609 | r5610 | |
| 87 | 87 | #include "machine/conkort.h" |
| 88 | 88 | |
| 89 | 89 | /* Devices */ |
| 90 | | #include "devices/basicdsk.h" |
| 90 | #include "devices/mflopimg.h" |
| 91 | 91 | #include "devices/cassette.h" |
| 92 | 92 | #include "devices/printer.h" |
| 93 | 93 | |
| r5609 | r5610 | |
| 623 | 623 | ROM_END |
| 624 | 624 | |
| 625 | 625 | /* System Configuration */ |
| 626 | | |
| 627 | 626 | static void abc80_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 628 | 627 | { |
| 629 | 628 | /* floppy */ |
| 630 | 629 | switch(state) |
| 631 | 630 | { |
| 632 | 631 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 633 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 632 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 634 | 633 | |
| 635 | 634 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 636 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(abc_floppy); break; |
| 635 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_abc80; break; |
| 637 | 636 | |
| 638 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 639 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 640 | | |
| 641 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 637 | default: floppy_device_getinfo(devclass, state, info); break; |
| 642 | 638 | } |
| 643 | 639 | } |
| 644 | 640 | |
src/mess/drivers/sg1000.c
| r5609 | r5610 | |
| 66 | 66 | #include "driver.h" |
| 67 | 67 | #include "cpu/z80/z80.h" |
| 68 | 68 | #include "includes/sg1000.h" |
| 69 | | #include "devices/basicdsk.h" |
| 69 | #include "devices/mflopimg.h" |
| 70 | #include "formats/basicdsk.h" |
| 70 | 71 | #include "devices/cartslot.h" |
| 71 | 72 | #include "devices/cassette.h" |
| 72 | 73 | #include "devices/printer.h" |
| r5609 | r5610 | |
| 979 | 980 | ROM_END |
| 980 | 981 | |
| 981 | 982 | /* System Configuration */ |
| 983 | static FLOPPY_OPTIONS_START(sf7000) |
| 984 | FLOPPY_OPTION(sf7000, "sf7", "SF7 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 985 | HEADS([1]) |
| 986 | TRACKS([40]) |
| 987 | SECTORS([16]) |
| 988 | SECTOR_LENGTH([256]) |
| 989 | FIRST_SECTOR_ID([1])) |
| 990 | FLOPPY_OPTIONS_END |
| 982 | 991 | |
| 983 | | static DEVICE_IMAGE_LOAD( sf7000_floppy ) |
| 984 | | { |
| 985 | | if (image_has_been_created(image)) |
| 986 | | return INIT_FAIL; |
| 987 | | |
| 988 | | if (image_length(image) == 40*1*16*256) // 160K |
| 989 | | { |
| 990 | | if (DEVICE_IMAGE_LOAD_NAME(basicdsk_floppy)(image) == INIT_PASS) |
| 991 | | { |
| 992 | | /* image, tracks, sides, sectors per track, sector length, first sector id, offset of track 0, track skipping */ |
| 993 | | basicdsk_set_geometry(image, 40, 1, 16, 256, 1, 0, FALSE); |
| 994 | | |
| 995 | | return INIT_PASS; |
| 996 | | } |
| 997 | | } |
| 998 | | |
| 999 | | return INIT_FAIL; |
| 1000 | | } |
| 1001 | | |
| 1002 | 992 | static void sf7000_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1003 | 993 | { |
| 994 | /* floppy */ |
| 1004 | 995 | switch(state) |
| 1005 | 996 | { |
| 1006 | 997 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1007 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 998 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 1008 | 999 | |
| 1009 | 1000 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1010 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(sf7000_floppy); break; |
| 1001 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_sf7000; break; |
| 1011 | 1002 | |
| 1012 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1013 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "sf7"); break; |
| 1014 | | |
| 1015 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 1003 | default: floppy_device_getinfo(devclass, state, info); break; |
| 1016 | 1004 | } |
| 1017 | 1005 | } |
| 1018 | 1006 | |
src/mess/drivers/osi.c
| r5609 | r5610 | |
| 183 | 183 | #include "machine/6821pia.h" |
| 184 | 184 | #include "sound/discrete.h" |
| 185 | 185 | #include "sound/beep.h" |
| 186 | | #include "devices/basicdsk.h" |
| 186 | #include "devices/mflopimg.h" |
| 187 | #include "formats/basicdsk.h" |
| 187 | 188 | #include "devices/cassette.h" |
| 188 | 189 | |
| 189 | 190 | /* Sound */ |
| r5609 | r5610 | |
| 883 | 884 | CONFIG_RAM (20 * 1024 ) |
| 884 | 885 | SYSTEM_CONFIG_END |
| 885 | 886 | |
| 886 | | static DEVICE_IMAGE_LOAD( osi ) |
| 887 | | { |
| 888 | | if (image_has_been_created(image)) |
| 889 | | return INIT_FAIL; |
| 887 | static FLOPPY_OPTIONS_START(osi) |
| 888 | FLOPPY_OPTION(osi, "img", "OSI disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 889 | HEADS([1]) |
| 890 | TRACKS([36]) |
| 891 | SECTORS([10]) |
| 892 | SECTOR_LENGTH([256]) |
| 893 | FIRST_SECTOR_ID([0])) |
| 894 | FLOPPY_OPTIONS_END |
| 890 | 895 | |
| 891 | | switch (image_length(image)) |
| 892 | | { |
| 893 | | case 36*1*10*256: // 90KB 5.25" |
| 894 | | basicdsk_set_geometry(image, 36, 1, 10, 256, 0, 0, FALSE); |
| 895 | | break; |
| 896 | | /* |
| 897 | | case 77*1*12*256: // 231KB 8" |
| 898 | | basicdsk_set_geometry(image, 77, 1, 12, 256, 0, 0, FALSE); |
| 899 | | break; |
| 900 | | */ |
| 901 | | default: |
| 902 | | return INIT_FAIL; |
| 903 | | } |
| 904 | | |
| 905 | | return device_load_basicdsk_floppy(image); |
| 906 | | } |
| 907 | | |
| 908 | 896 | static void osi_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 909 | 897 | { |
| 898 | /* floppy */ |
| 910 | 899 | switch(state) |
| 911 | 900 | { |
| 912 | 901 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 913 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 902 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 914 | 903 | |
| 915 | 904 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 916 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(osi); break; |
| 905 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_osi; break; |
| 917 | 906 | |
| 918 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 919 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "img"); break; |
| 920 | | |
| 921 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 907 | default: floppy_device_getinfo(devclass, state, info); break; |
| 922 | 908 | } |
| 923 | 909 | } |
| 924 | | |
| 925 | 910 | static SYSTEM_CONFIG_START( c1pmf ) |
| 926 | 911 | CONFIG_RAM_DEFAULT(20 * 1024 ) |
| 927 | 912 | CONFIG_DEVICE( osi_floppy_getinfo ) |
src/mess/drivers/vector06.c
| r5609 | r5610 | |
| 15 | 15 | #include "machine/wd17xx.h" |
| 16 | 16 | #include "devices/cassette.h" |
| 17 | 17 | #include "devices/cartslot.h" |
| 18 | | #include "devices/basicdsk.h" |
| 18 | #include "devices/mflopimg.h" |
| 19 | #include "formats/basicdsk.h" |
| 19 | 20 | #include "includes/vector06.h" |
| 20 | 21 | |
| 21 | 22 | /* Address maps */ |
| r5609 | r5610 | |
| 134 | 135 | CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED |
| 135 | 136 | }; |
| 136 | 137 | |
| 138 | static FLOPPY_OPTIONS_START(vector) |
| 139 | FLOPPY_OPTION(vector, "fdd", "Vector disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 140 | HEADS([2]) |
| 141 | TRACKS([82]) |
| 142 | SECTORS([5]) |
| 143 | SECTOR_LENGTH([1024]) |
| 144 | FIRST_SECTOR_ID([1])) |
| 145 | FLOPPY_OPTIONS_END |
| 146 | |
| 137 | 147 | static void vector_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 138 | 148 | { |
| 139 | 149 | /* floppy */ |
| 140 | 150 | switch(state) |
| 141 | 151 | { |
| 142 | 152 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 143 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 153 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 144 | 154 | |
| 145 | 155 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 146 | | case MESS_DEVINFO_PTR_LOAD: info->load = device_load_vector_floppy; break; |
| 156 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_vector; break; |
| 147 | 157 | |
| 148 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 149 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "fdd"); break; |
| 150 | | |
| 151 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 152 | | } |
| 158 | default: floppy_device_getinfo(devclass, state, info); break; |
| 159 | } |
| 153 | 160 | } |
| 154 | 161 | |
| 155 | 162 | /* Machine driver */ |
src/mess/drivers/ql.c
| r5609 | r5610 | |
| 42 | 42 | #include "includes/ql.h" |
| 43 | 43 | #include "cpu/mcs48/mcs48.h" |
| 44 | 44 | #include "cpu/m68000/m68000.h" |
| 45 | | #include "devices/basicdsk.h" |
| 45 | #include "devices/mflopimg.h" |
| 46 | #include "formats/basicdsk.h" |
| 46 | 47 | #include "devices/cartslot.h" |
| 47 | 48 | #include "devices/microdrv.h" |
| 48 | 49 | #include "devices/snapquik.h" |
| r5609 | r5610 | |
| 867 | 868 | } |
| 868 | 869 | } |
| 869 | 870 | |
| 870 | | static DEVICE_IMAGE_LOAD( ql_floppy ) |
| 871 | | { |
| 872 | | if (image_has_been_created(image)) |
| 873 | | return INIT_FAIL; |
| 871 | static FLOPPY_OPTIONS_START(ql) |
| 872 | FLOPPY_OPTION(ql, "dsk", "SSSD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 873 | HEADS([1]) |
| 874 | TRACKS([40]) |
| 875 | SECTORS([9]) |
| 876 | SECTOR_LENGTH([512]) |
| 877 | FIRST_SECTOR_ID([1])) |
| 878 | FLOPPY_OPTION(ql, "dsk", "DSSD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 879 | HEADS([2]) |
| 880 | TRACKS([40]) |
| 881 | SECTORS([9]) |
| 882 | SECTOR_LENGTH([512]) |
| 883 | FIRST_SECTOR_ID([1])) |
| 884 | FLOPPY_OPTION(ql, "dsk", "DSDD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 885 | HEADS([2]) |
| 886 | TRACKS([80]) |
| 887 | SECTORS([9]) |
| 888 | SECTOR_LENGTH([512]) |
| 889 | FIRST_SECTOR_ID([1])) |
| 890 | FLOPPY_OPTION(ql, "dsk", "DSHD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 891 | HEADS([2]) |
| 892 | TRACKS([80]) |
| 893 | SECTORS([18]) |
| 894 | SECTOR_LENGTH([512]) |
| 895 | FIRST_SECTOR_ID([1])) |
| 896 | FLOPPY_OPTION(ql, "dsk", "DSED disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 897 | HEADS([2]) |
| 898 | TRACKS([80]) |
| 899 | SECTORS([40]) |
| 900 | SECTOR_LENGTH([512]) |
| 901 | FIRST_SECTOR_ID([1])) |
| 902 | FLOPPY_OPTIONS_END |
| 874 | 903 | |
| 875 | | switch (image_length(image)) |
| 876 | | { |
| 877 | | case 40*1*9*512: // 184320 (SSSD) |
| 878 | | basicdsk_set_geometry(image, 40, 1, 9, 512, 1, 0, FALSE); |
| 879 | | return INIT_PASS; |
| 880 | | |
| 881 | | case 40*2*9*512: // 368640 (DSSD) |
| 882 | | basicdsk_set_geometry(image, 40, 2, 9, 512, 1, 0, FALSE); |
| 883 | | return INIT_PASS; |
| 884 | | |
| 885 | | case 80*2*9*512: // 737280 (DSDD) |
| 886 | | basicdsk_set_geometry(image, 80, 2, 9, 512, 1, 0, FALSE); |
| 887 | | return INIT_PASS; |
| 888 | | |
| 889 | | case 80*2*18*512: // 1474560 (HD) |
| 890 | | basicdsk_set_geometry(image, 80, 2, 18, 512, 1, 0, FALSE); |
| 891 | | return INIT_PASS; |
| 892 | | |
| 893 | | case 80*2*40*512: // 3276800 (ED) |
| 894 | | basicdsk_set_geometry(image, 80, 2, 40, 512, 1, 0, FALSE); |
| 895 | | return INIT_PASS; |
| 896 | | } |
| 897 | | |
| 898 | | return INIT_FAIL; |
| 899 | | } |
| 900 | | |
| 901 | 904 | static void ql_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 902 | 905 | { |
| 906 | /* floppy */ |
| 903 | 907 | switch(state) |
| 904 | 908 | { |
| 905 | 909 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 906 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 910 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 907 | 911 | |
| 908 | 912 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 909 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ql_floppy); break; |
| 913 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_ql; break; |
| 910 | 914 | |
| 911 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 912 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 913 | | |
| 914 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 915 | default: floppy_device_getinfo(devclass, state, info); break; |
| 915 | 916 | } |
| 916 | 917 | } |
| 917 | | |
| 918 | 918 | static SYSTEM_CONFIG_START( ql ) |
| 919 | 919 | CONFIG_RAM_DEFAULT (128 * 1024) |
| 920 | 920 | CONFIG_RAM (192 * 1024) // 64K expansion |
src/mess/drivers/abc80x.c
| r5609 | r5610 | |
| 80 | 80 | #include "sound/discrete.h" |
| 81 | 81 | |
| 82 | 82 | /* Devices */ |
| 83 | | #include "devices/basicdsk.h" |
| 83 | #include "devices/mflopimg.h" |
| 84 | 84 | #include "devices/cassette.h" |
| 85 | 85 | #include "devices/printer.h" |
| 86 | 86 | |
| r5609 | r5610 | |
| 1457 | 1457 | ROM_END |
| 1458 | 1458 | |
| 1459 | 1459 | /* System Configuration */ |
| 1460 | | |
| 1461 | 1460 | static void abc800_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1462 | 1461 | { |
| 1463 | 1462 | /* floppy */ |
| 1464 | 1463 | switch(state) |
| 1465 | 1464 | { |
| 1466 | 1465 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1467 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 1466 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 1468 | 1467 | |
| 1469 | 1468 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1470 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(abc_floppy); break; |
| 1469 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_abc80; break; |
| 1471 | 1470 | |
| 1472 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1473 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 1474 | | |
| 1475 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 1471 | default: floppy_device_getinfo(devclass, state, info); break; |
| 1476 | 1472 | } |
| 1477 | 1473 | } |
| 1478 | 1474 | |
src/mess/drivers/orion.c
| r5609 | r5610 | |
| 16 | 16 | #include "sound/wave.h" |
| 17 | 17 | #include "machine/mc146818.h" |
| 18 | 18 | #include "machine/wd17xx.h" |
| 19 | | #include "devices/basicdsk.h" |
| 19 | #include "devices/mflopimg.h" |
| 20 | #include "formats/basicdsk.h" |
| 20 | 21 | #include "devices/cassette.h" |
| 21 | 22 | #include "devices/cartslot.h" |
| 22 | 23 | #include "formats/rk_cas.h" |
| r5609 | r5610 | |
| 231 | 232 | MDRV_CARTSLOT_ADD("cart") |
| 232 | 233 | MACHINE_DRIVER_END |
| 233 | 234 | |
| 235 | static FLOPPY_OPTIONS_START(orion) |
| 236 | FLOPPY_OPTION(orion, "odi,img", "Orion disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 237 | HEADS([2]) |
| 238 | TRACKS([80]) |
| 239 | SECTORS([5]) |
| 240 | SECTOR_LENGTH([1024]) |
| 241 | FIRST_SECTOR_ID([1])) |
| 242 | FLOPPY_OPTION(orion, "odi,img", "Lucksian Key Orion disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 243 | HEADS([2]) |
| 244 | TRACKS([80]) |
| 245 | SECTORS([9]) |
| 246 | SECTOR_LENGTH([512]) |
| 247 | FIRST_SECTOR_ID([1])) |
| 248 | FLOPPY_OPTIONS_END |
| 234 | 249 | |
| 235 | 250 | static void orion_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 236 | 251 | { |
| r5609 | r5610 | |
| 241 | 256 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 242 | 257 | |
| 243 | 258 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 244 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(orion_floppy); break; |
| 259 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_orion; break; |
| 245 | 260 | |
| 246 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 247 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "odi,img"); break; |
| 248 | | |
| 249 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 261 | default: floppy_device_getinfo(devclass, state, info); break; |
| 250 | 262 | } |
| 251 | 263 | } |
| 252 | 264 | |
src/mess/drivers/nascom1.c
| r5609 | r5610 | |
| 59 | 59 | #include "machine/z80pio.h" |
| 60 | 60 | |
| 61 | 61 | /* Devices */ |
| 62 | | #include "devices/basicdsk.h" |
| 62 | #include "devices/mflopimg.h" |
| 63 | #include "formats/basicdsk.h" |
| 63 | 64 | #include "devices/cartslot.h" |
| 64 | 65 | #include "devices/cassette.h" |
| 65 | 66 | |
| r5609 | r5610 | |
| 384 | 385 | // } |
| 385 | 386 | //} |
| 386 | 387 | |
| 388 | static FLOPPY_OPTIONS_START(nascom2) |
| 389 | FLOPPY_OPTION(nascom2, "dsk", "Nascom 2 SS disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 390 | HEADS([1]) |
| 391 | TRACKS([80]) |
| 392 | SECTORS([16]) |
| 393 | SECTOR_LENGTH([256]) |
| 394 | FIRST_SECTOR_ID([1])) |
| 395 | FLOPPY_OPTION(nascom2, "dsk", "Nascom 2 DS disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 396 | HEADS([2]) |
| 397 | TRACKS([80]) |
| 398 | SECTORS([16]) |
| 399 | SECTOR_LENGTH([256]) |
| 400 | FIRST_SECTOR_ID([1])) |
| 401 | FLOPPY_OPTIONS_END |
| 387 | 402 | |
| 388 | 403 | static void nascom2_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 389 | 404 | { |
| r5609 | r5610 | |
| 394 | 409 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 395 | 410 | |
| 396 | 411 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 397 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(nascom2_floppy); break; |
| 412 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_nascom2; break; |
| 398 | 413 | |
| 399 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 400 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 401 | | |
| 402 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 414 | default: floppy_device_getinfo(devclass, state, info); break; |
| 403 | 415 | } |
| 404 | 416 | } |
| 405 | 417 | |
| 406 | | |
| 407 | 418 | static SYSTEM_CONFIG_START( nascom1 ) |
| 408 | 419 | CONFIG_RAM(1 * 1024) |
| 409 | 420 | CONFIG_RAM(16 * 1024) |
src/mess/drivers/newbrain.c
| r5609 | r5610 | |
| 9 | 9 | #include "machine/z80sio.h" |
| 10 | 10 | #include "includes/newbrain.h" |
| 11 | 11 | #include "includes/serial.h" |
| 12 | | #include "devices/basicdsk.h" |
| 12 | #include "devices/mflopimg.h" |
| 13 | #include "formats/basicdsk.h" |
| 13 | 14 | #include "devices/cassette.h" |
| 14 | 15 | #include "machine/rescap.h" |
| 15 | 16 | |
| r5609 | r5610 | |
| 1633 | 1634 | ROM_END |
| 1634 | 1635 | |
| 1635 | 1636 | /* System Configuration */ |
| 1637 | static FLOPPY_OPTIONS_START(newbrain) |
| 1638 | // 180K img |
| 1639 | FLOPPY_OPTIONS_END |
| 1636 | 1640 | |
| 1637 | | static DEVICE_IMAGE_LOAD( newbrain_floppy ) |
| 1638 | | { |
| 1639 | | if (image_has_been_created(image)) |
| 1640 | | return INIT_FAIL; |
| 1641 | | |
| 1642 | | if (device_load_basicdsk_floppy(image) == INIT_PASS) |
| 1643 | | { |
| 1644 | | // 180K |
| 1645 | | } |
| 1646 | | |
| 1647 | | return INIT_PASS; |
| 1648 | | } |
| 1649 | | |
| 1650 | 1641 | static void newbrain_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1651 | 1642 | { |
| 1652 | 1643 | /* floppy */ |
| 1653 | 1644 | switch(state) |
| 1654 | 1645 | { |
| 1655 | 1646 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1656 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 1647 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 1657 | 1648 | |
| 1658 | 1649 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1659 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(newbrain_floppy); break; |
| 1650 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_newbrain; break; |
| 1660 | 1651 | |
| 1661 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1662 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "img"); break; |
| 1663 | | |
| 1664 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 1652 | default: floppy_device_getinfo(devclass, state, info); break; |
| 1665 | 1653 | } |
| 1666 | 1654 | } |
| 1667 | 1655 | |
src/mess/drivers/amstrad.c
| r5609 | r5610 | |
| 99 | 99 | |
| 100 | 100 | /* Devices */ |
| 101 | 101 | #include "devices/dsk.h" /* for CPCEMU style disk images */ |
| 102 | | #include "devices/basicdsk.h" /* for 720k MSX disk images (Aleste supports these) */ |
| 102 | #include "devices/mflopimg.h" |
| 103 | #include "formats/basicdsk.h" |
| 103 | 104 | #include "includes/msx_slot.h" |
| 104 | 105 | #include "includes/msx.h" /* MSX floppy device load */ |
| 105 | 106 | #include "devices/snapquik.h" |
| r5609 | r5610 | |
| 1137 | 1138 | { |
| 1138 | 1139 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1139 | 1140 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 1140 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(msx_floppy); break; |
| 1141 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 1142 | 1141 | |
| 1143 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 1142 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1143 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_msx; break; |
| 1144 | |
| 1145 | default: floppy_device_getinfo(devclass, state, info); break; |
| 1144 | 1146 | } |
| 1145 | 1147 | } |
| 1146 | 1148 | |
src/mess/drivers/tiki100.c
| r5609 | r5610 | |
| 27 | 27 | #include "includes/tiki100.h" |
| 28 | 28 | #include "cpu/z80/z80.h" |
| 29 | 29 | #include "cpu/z80/z80daisy.h" |
| 30 | | #include "devices/basicdsk.h" |
| 30 | #include "devices/mflopimg.h" |
| 31 | #include "formats/basicdsk.h" |
| 31 | 32 | #include "machine/z80ctc.h" |
| 32 | 33 | #include "machine/z80dart.h" |
| 33 | 34 | #include "machine/z80pio.h" |
| r5609 | r5610 | |
| 678 | 679 | ROM_END |
| 679 | 680 | |
| 680 | 681 | /* System Configuration */ |
| 682 | static FLOPPY_OPTIONS_START(tiki100) |
| 683 | FLOPPY_OPTION(tiki100, "dsk", "SSSD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 684 | HEADS([1]) |
| 685 | TRACKS([40]) |
| 686 | SECTORS([18]) |
| 687 | SECTOR_LENGTH([128]) |
| 688 | FIRST_SECTOR_ID([1])) |
| 689 | FLOPPY_OPTION(tiki100, "dsk", "SSDD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 690 | HEADS([1]) |
| 691 | TRACKS([40]) |
| 692 | SECTORS([10]) |
| 693 | SECTOR_LENGTH([512]) |
| 694 | FIRST_SECTOR_ID([1])) |
| 695 | FLOPPY_OPTION(tiki100, "dsk", "DSDD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 696 | HEADS([2]) |
| 697 | TRACKS([40]) |
| 698 | SECTORS([10]) |
| 699 | SECTOR_LENGTH([512]) |
| 700 | FIRST_SECTOR_ID([1])) |
| 701 | FLOPPY_OPTION(tiki100, "dsk", "DSHD disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 702 | HEADS([2]) |
| 703 | TRACKS([80]) |
| 704 | SECTORS([10]) |
| 705 | SECTOR_LENGTH([512]) |
| 706 | FIRST_SECTOR_ID([1])) |
| 707 | FLOPPY_OPTIONS_END |
| 681 | 708 | |
| 682 | | static DEVICE_IMAGE_LOAD( tiki100_floppy ) |
| 683 | | { |
| 684 | | if (image_has_been_created(image)) |
| 685 | | { |
| 686 | | return INIT_FAIL; |
| 687 | | } |
| 688 | | |
| 689 | | if (DEVICE_IMAGE_LOAD_NAME(basicdsk_floppy)(image) == INIT_PASS) |
| 690 | | { |
| 691 | | switch (image_length(image)) |
| 692 | | { |
| 693 | | case 40*1*18*128: /* 90KB SSSD */ |
| 694 | | basicdsk_set_geometry(image, 40, 1, 18, 128, 1, 0, FALSE); |
| 695 | | break; |
| 696 | | |
| 697 | | case 40*1*10*512: /* 200KB SSDD */ |
| 698 | | basicdsk_set_geometry(image, 40, 1, 10, 512, 1, 0, FALSE); |
| 699 | | break; |
| 700 | | |
| 701 | | case 40*2*10*512: /* 400KB DSDD */ |
| 702 | | basicdsk_set_geometry(image, 40, 2, 10, 512, 1, 0, FALSE); |
| 703 | | break; |
| 704 | | |
| 705 | | case 80*2*10*512: // 800KB DSHD |
| 706 | | basicdsk_set_geometry(image, 80, 2, 10, 512, 1, 0, FALSE); |
| 707 | | break; |
| 708 | | |
| 709 | | default: |
| 710 | | return INIT_FAIL; |
| 711 | | } |
| 712 | | |
| 713 | | return INIT_PASS; |
| 714 | | } |
| 715 | | |
| 716 | | return INIT_FAIL; |
| 717 | | } |
| 718 | | |
| 719 | 709 | static void tiki100_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 720 | 710 | { |
| 721 | | switch (state) |
| 711 | /* floppy */ |
| 712 | switch(state) |
| 722 | 713 | { |
| 723 | 714 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 724 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 715 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 725 | 716 | |
| 726 | 717 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 727 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(tiki100_floppy); break; |
| 718 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_tiki100; break; |
| 728 | 719 | |
| 729 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 730 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 731 | | |
| 732 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 720 | default: floppy_device_getinfo(devclass, state, info); break; |
| 733 | 721 | } |
| 734 | 722 | } |
| 735 | 723 | |
src/mess/drivers/nanos.c
| r5609 | r5610 | |
| 13 | 13 | #include "machine/z80sio.h" |
| 14 | 14 | #include "machine/z80ctc.h" |
| 15 | 15 | #include "machine/nec765.h" |
| 16 | | #include "devices/basicdsk.h" |
| 16 | #include "devices/mflopimg.h" |
| 17 | #include "formats/basicdsk.h" |
| 17 | 18 | |
| 18 | | |
| 19 | 19 | static const UINT8 *FNT; |
| 20 | 20 | |
| 21 | 21 | static ADDRESS_MAP_START(nanos_mem, ADDRESS_SPACE_PROGRAM, 8) |
| r5609 | r5610 | |
| 470 | 470 | |
| 471 | 471 | MACHINE_DRIVER_END |
| 472 | 472 | |
| 473 | | static DEVICE_IMAGE_LOAD( nanos_floppy ) |
| 474 | | { |
| 475 | | int size; |
| 476 | | if (! image_has_been_created(image)) |
| 477 | | { |
| 478 | | size = image_length(image); |
| 473 | static FLOPPY_OPTIONS_START(nanos) |
| 474 | FLOPPY_OPTION(nanos, "img", "NANOS disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 475 | HEADS([2]) |
| 476 | TRACKS([80]) |
| 477 | SECTORS([5]) |
| 478 | SECTOR_LENGTH([1024]) |
| 479 | FIRST_SECTOR_ID([1])) |
| 480 | FLOPPY_OPTIONS_END |
| 479 | 481 | |
| 480 | | switch (size) |
| 481 | | { |
| 482 | | case 800*1024: |
| 483 | | break; |
| 484 | | default: |
| 485 | | return INIT_FAIL; |
| 486 | | } |
| 487 | | } |
| 488 | | else |
| 489 | | return INIT_FAIL; |
| 490 | | |
| 491 | | if (device_load_basicdsk_floppy (image) != INIT_PASS) |
| 492 | | return INIT_FAIL; |
| 493 | | |
| 494 | | basicdsk_set_geometry (image, 80, 2, 5, 1024, 1, 0, FALSE); |
| 495 | | return INIT_PASS; |
| 496 | | } |
| 497 | | |
| 498 | 482 | static void nanos_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 499 | 483 | { |
| 484 | /* floppy */ |
| 500 | 485 | switch(state) |
| 501 | 486 | { |
| 502 | 487 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 503 | | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 488 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 504 | 489 | |
| 505 | 490 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 506 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(nanos_floppy); break; |
| 491 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_nanos; break; |
| 507 | 492 | |
| 508 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 509 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "img"); break; |
| 510 | | |
| 511 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 493 | default: floppy_device_getinfo(devclass, state, info); break; |
| 512 | 494 | } |
| 513 | 495 | } |
| 514 | 496 | |
src/mess/drivers/bw12.c
| r5609 | r5610 | |
| 26 | 26 | #include "driver.h" |
| 27 | 27 | #include "includes/bw12.h" |
| 28 | 28 | #include "cpu/z80/z80.h" |
| 29 | | #include "devices/basicdsk.h" |
| 29 | #include "devices/mflopimg.h" |
| 30 | #include "formats/basicdsk.h" |
| 30 | 31 | #include "machine/6821pia.h" |
| 31 | 32 | #include "machine/ctronics.h" |
| 32 | 33 | #include "machine/nec765.h" |
| r5609 | r5610 | |
| 775 | 776 | #define rom_bw14 rom_bw12 |
| 776 | 777 | |
| 777 | 778 | /* System Configurations */ |
| 779 | static FLOPPY_OPTIONS_START(bw12) |
| 780 | FLOPPY_OPTION(bw12, "dsk", "180KB BW 12 SSDD", basicdsk_identify_default, basicdsk_construct_default, |
| 781 | HEADS([1]) |
| 782 | TRACKS([40]) |
| 783 | SECTORS([18]) |
| 784 | SECTOR_LENGTH([256]) |
| 785 | FIRST_SECTOR_ID([0])) |
| 786 | FLOPPY_OPTION(bw12, "dsk", "360KB BW 14 DSDD", basicdsk_identify_default, basicdsk_construct_default, |
| 787 | HEADS([2]) |
| 788 | TRACKS([40]) |
| 789 | SECTORS([18]) |
| 790 | SECTOR_LENGTH([256]) |
| 791 | FIRST_SECTOR_ID([0])) |
| 792 | FLOPPY_OPTION(bw12, "dsk", "SVI-328 SSDD", basicdsk_identify_default, basicdsk_construct_default, |
| 793 | HEADS([1]) |
| 794 | TRACKS([40]) |
| 795 | SECTORS([17]) |
| 796 | SECTOR_LENGTH([256]) |
| 797 | FIRST_SECTOR_ID([0])) |
| 798 | FLOPPY_OPTION(bw12, "dsk", "SVI-328 DSDD", basicdsk_identify_default, basicdsk_construct_default, |
| 799 | HEADS([2]) |
| 800 | TRACKS([40]) |
| 801 | SECTORS([17]) |
| 802 | SECTOR_LENGTH([256]) |
| 803 | FIRST_SECTOR_ID([0])) |
| 804 | FLOPPY_OPTION(bw12, "dsk", "Kaypro II SSDD", basicdsk_identify_default, basicdsk_construct_default, |
| 805 | HEADS([1]) |
| 806 | TRACKS([40]) |
| 807 | SECTORS([10]) |
| 808 | SECTOR_LENGTH([512]) |
| 809 | FIRST_SECTOR_ID([0])) |
| 810 | FLOPPY_OPTIONS_END |
| 778 | 811 | |
| 779 | | static DEVICE_IMAGE_LOAD( bw12_floppy ) |
| 780 | | { |
| 781 | | if (image_has_been_created(image)) |
| 782 | | { |
| 783 | | return INIT_FAIL; |
| 784 | | } |
| 785 | | |
| 786 | | if (DEVICE_IMAGE_LOAD_NAME(basicdsk_floppy)(image) == INIT_PASS) |
| 787 | | { |
| 788 | | switch (image_length(image)) |
| 789 | | { |
| 790 | | case 40*1*18*256: /* 180KB BW 12 SSDD */ |
| 791 | | basicdsk_set_geometry(image, 40, 1, 18, 256, 0, 0, FALSE); |
| 792 | | break; |
| 793 | | |
| 794 | | case 40*2*18*256: /* 360KB BW 14 DSDD */ |
| 795 | | basicdsk_set_geometry(image, 40, 2, 18, 256, 0, 0, FALSE); |
| 796 | | break; |
| 797 | | |
| 798 | | case 40*1*17*256: /* SVI-328 SSDD */ |
| 799 | | basicdsk_set_geometry(image, 40, 1, 17, 256, 0, 0, FALSE); |
| 800 | | break; |
| 801 | | |
| 802 | | case 40*2*17*256: /* SVI-328 DSDD */ |
| 803 | | basicdsk_set_geometry(image, 40, 2, 17, 256, 0, 0, FALSE); |
| 804 | | break; |
| 805 | | |
| 806 | | case 40*1*10*512: /* Kaypro II SSDD */ |
| 807 | | basicdsk_set_geometry(image, 40, 1, 10, 512, 0, 0, FALSE); |
| 808 | | break; |
| 809 | | |
| 810 | | default: |
| 811 | | return INIT_FAIL; |
| 812 | | } |
| 813 | | |
| 814 | | return INIT_PASS; |
| 815 | | } |
| 816 | | |
| 817 | | return INIT_FAIL; |
| 818 | | } |
| 819 | | |
| 820 | 812 | static void bw12_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 821 | 813 | { |
| 822 | | switch (state) |
| 814 | /* floppy */ |
| 815 | switch(state) |
| 823 | 816 | { |
| 824 | 817 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 825 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 818 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 826 | 819 | |
| 827 | 820 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 828 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(bw12_floppy); break; |
| 821 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_bw12; break; |
| 829 | 822 | |
| 830 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 831 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 832 | | |
| 833 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 823 | default: floppy_device_getinfo(devclass, state, info); break; |
| 834 | 824 | } |
| 835 | 825 | } |
| 836 | | |
| 837 | 826 | static SYSTEM_CONFIG_START( bw12 ) |
| 838 | 827 | CONFIG_RAM_DEFAULT( 64 * 1024 ) |
| 839 | 828 | CONFIG_DEVICE( bw12_floppy_getinfo ) |
src/mess/drivers/msx.c
| r5609 | r5610 | |
| 286 | 286 | #include "machine/ctronics.h" |
| 287 | 287 | #include "includes/msx_slot.h" |
| 288 | 288 | #include "includes/msx.h" |
| 289 | | #include "devices/basicdsk.h" |
| 289 | #include "devices/mflopimg.h" |
| 290 | 290 | #include "devices/cartslot.h" |
| 291 | 291 | #include "devices/cassette.h" |
| 292 | 292 | #include "formats/fmsx_cas.h" |
| r5609 | r5610 | |
| 3658 | 3658 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 3659 | 3659 | |
| 3660 | 3660 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 3661 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(msx_floppy); break; |
| 3661 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_msx; break; |
| 3662 | 3662 | |
| 3663 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 3664 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 3665 | | |
| 3666 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 3663 | default: floppy_device_getinfo(devclass, state, info); break; |
| 3667 | 3664 | } |
| 3668 | 3665 | } |
| 3669 | 3666 | |
| 3670 | | |
| 3671 | 3667 | static SYSTEM_CONFIG_START(msx) |
| 3672 | 3668 | CONFIG_DEVICE(msx_floppy_getinfo) |
| 3673 | 3669 | SYSTEM_CONFIG_END |
src/mess/drivers/prof80.c
| r5609 | r5610 | |
| 32 | 32 | #include "includes/prof80.h" |
| 33 | 33 | #include "cpu/z80/z80.h" |
| 34 | 34 | #include "cpu/z80/z80daisy.h" |
| 35 | | #include "devices/basicdsk.h" |
| 36 | 35 | #include "video/mc6845.h" |
| 37 | 36 | #include "machine/i8255a.h" |
| 38 | 37 | #include "machine/nec765.h" |
| r5609 | r5610 | |
| 40 | 39 | #include "machine/z80sti.h" |
| 41 | 40 | #include "machine/ctronics.h" |
| 42 | 41 | #include "machine/rescap.h" |
| 42 | #include "devices/mflopimg.h" |
| 43 | #include "formats/basicdsk.h" |
| 43 | 44 | |
| 45 | |
| 44 | 46 | INLINE const device_config *get_floppy_image(running_machine *machine, int drive) |
| 45 | 47 | { |
| 46 | 48 | return image_from_devtype_and_index(machine, IO_FLOPPY, drive); |
| r5609 | r5610 | |
| 1253 | 1255 | ROM_END |
| 1254 | 1256 | |
| 1255 | 1257 | /* System Configurations */ |
| 1258 | static FLOPPY_OPTIONS_START(prof80) |
| 1259 | // dsk |
| 1260 | FLOPPY_OPTIONS_END |
| 1256 | 1261 | |
| 1257 | | static DEVICE_IMAGE_LOAD( prof80_floppy ) |
| 1258 | | { |
| 1259 | | if (image_has_been_created(image)) |
| 1260 | | return INIT_FAIL; |
| 1261 | | |
| 1262 | | return INIT_FAIL; |
| 1263 | | } |
| 1264 | | |
| 1265 | 1262 | static void prof80_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 1266 | 1263 | { |
| 1264 | /* floppy */ |
| 1267 | 1265 | switch(state) |
| 1268 | 1266 | { |
| 1269 | 1267 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 1270 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 1268 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 1271 | 1269 | |
| 1272 | 1270 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 1273 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(prof80_floppy); break; |
| 1271 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_prof80; break; |
| 1274 | 1272 | |
| 1275 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1276 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 1277 | | |
| 1278 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 1273 | default: floppy_device_getinfo(devclass, state, info); break; |
| 1279 | 1274 | } |
| 1280 | 1275 | } |
| 1281 | | |
| 1282 | 1276 | static SYSTEM_CONFIG_START( prof80 ) |
| 1283 | 1277 | CONFIG_RAM_DEFAULT (128 * 1024) |
| 1284 | 1278 | CONFIG_DEVICE(prof80_floppy_getinfo) |
src/mess/drivers/aquarius.c
| r5609 | r5610 | |
| 23 | 23 | #include "cpu/z80/z80.h" |
| 24 | 24 | #include "sound/ay8910.h" |
| 25 | 25 | #include "sound/speaker.h" |
| 26 | | #include "devices/basicdsk.h" |
| 26 | #include "devices/mflopimg.h" |
| 27 | #include "formats/basicdsk.h" |
| 27 | 28 | #include "devices/cartslot.h" |
| 28 | 29 | #include "devices/cassette.h" |
| 29 | 30 | #include "devices/printer.h" |
| r5609 | r5610 | |
| 486 | 487 | /*************************************************************************** |
| 487 | 488 | SYSTEM CONFIG |
| 488 | 489 | ***************************************************************************/ |
| 489 | | |
| 490 | | static DEVICE_IMAGE_LOAD( aquarius_floppy ) |
| 491 | | { |
| 490 | static FLOPPY_OPTIONS_START(aquarius) |
| 492 | 491 | /* 128K images, 64K/side */ |
| 493 | | return INIT_FAIL; |
| 494 | | } |
| 492 | FLOPPY_OPTIONS_END |
| 495 | 493 | |
| 496 | 494 | static void aquarius_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 497 | 495 | { |
| r5609 | r5610 | |
| 499 | 497 | switch(state) |
| 500 | 498 | { |
| 501 | 499 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 502 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 500 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 503 | 501 | |
| 504 | 502 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 505 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(aquarius_floppy); break; |
| 503 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_aquarius; break; |
| 506 | 504 | |
| 507 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 508 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 509 | | |
| 510 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 505 | default: floppy_device_getinfo(devclass, state, info); break; |
| 511 | 506 | } |
| 512 | 507 | } |
| 513 | 508 | |
src/mess/drivers/kaypro.c
| r5609 | r5610 | |
| 41 | 41 | #include "machine/kay_kbd.h" |
| 42 | 42 | #include "sound/beep.h" |
| 43 | 43 | #include "devices/snapquik.h" |
| 44 | #include "devices/mflopimg.h" |
| 45 | #include "formats/basicdsk.h" |
| 44 | 46 | #include "includes/kaypro.h" |
| 45 | 47 | |
| 46 | 48 | |
| r5609 | r5610 | |
| 307 | 309 | ROM_LOAD("81-817.u31", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) ) |
| 308 | 310 | ROM_END |
| 309 | 311 | |
| 312 | static FLOPPY_OPTIONS_START(kayproii) |
| 313 | FLOPPY_OPTION(kayproii, "img", "Kaypro II disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 314 | HEADS([1]) |
| 315 | TRACKS([40]) |
| 316 | SECTORS([10]) |
| 317 | SECTOR_LENGTH([512]) |
| 318 | FIRST_SECTOR_ID([0])) |
| 319 | FLOPPY_OPTIONS_END |
| 310 | 320 | |
| 321 | static FLOPPY_OPTIONS_START(kaypro2x) |
| 322 | FLOPPY_OPTION(kaypro2x, "img", "Kaypro 2x disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 323 | HEADS([2]) |
| 324 | TRACKS([80]) |
| 325 | SECTORS([10]) |
| 326 | SECTOR_LENGTH([512]) |
| 327 | FIRST_SECTOR_ID([0])) |
| 328 | FLOPPY_OPTIONS_END |
| 329 | |
| 330 | static void kayproii_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 331 | { |
| 332 | /* floppy */ |
| 333 | switch(state) |
| 334 | { |
| 335 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 336 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 337 | |
| 338 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 339 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_kayproii; break; |
| 340 | |
| 341 | default: floppy_device_getinfo(devclass, state, info); break; |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | static void kaypro2x_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 346 | { |
| 347 | /* floppy */ |
| 348 | switch(state) |
| 349 | { |
| 350 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 351 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 352 | |
| 353 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 354 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_kaypro2x; break; |
| 355 | |
| 356 | default: floppy_device_getinfo(devclass, state, info); break; |
| 357 | } |
| 358 | } |
| 359 | |
| 311 | 360 | static SYSTEM_CONFIG_START(kayproii) |
| 312 | 361 | CONFIG_DEVICE(kayproii_floppy_getinfo) |
| 313 | 362 | SYSTEM_CONFIG_END |
src/mess/drivers/exidy.c
| r5609 | r5610 | |
| 146 | 146 | #include "devices/snapquik.h" |
| 147 | 147 | #include "devices/cartslot.h" |
| 148 | 148 | #include "machine/ay31015.h" |
| 149 | #include "devices/mflopimg.h" |
| 150 | #include "formats/basicdsk.h" |
| 149 | 151 | #include "includes/exidy.h" |
| 150 | 152 | |
| 151 | 153 | |
| r5609 | r5610 | |
| 432 | 434 | ROM_LOAD_OPTIONAL("bruce.dat", 0x0000, 0x0020, CRC(fae922cb) SHA1(470a86844cfeab0d9282242e03ff1d8a1b2238d1)) /* video prom */ |
| 433 | 435 | ROM_END |
| 434 | 436 | |
| 437 | static FLOPPY_OPTIONS_START(exidy) |
| 438 | FLOPPY_OPTION(exidy, "dsk", "Exidy disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 439 | HEADS([2]) |
| 440 | TRACKS([80]) |
| 441 | SECTORS([9]) |
| 442 | SECTOR_LENGTH([512]) |
| 443 | FIRST_SECTOR_ID([1])) |
| 444 | FLOPPY_OPTIONS_END |
| 445 | |
| 446 | static void exidy_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 447 | { |
| 448 | /* floppy */ |
| 449 | switch(state) |
| 450 | { |
| 451 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 452 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 453 | |
| 454 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 455 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_exidy; break; |
| 456 | |
| 457 | default: floppy_device_getinfo(devclass, state, info); break; |
| 458 | } |
| 459 | } |
| 460 | |
| 435 | 461 | static SYSTEM_CONFIG_START(exidy) |
| 436 | 462 | CONFIG_DEVICE(exidy_floppy_getinfo) |
| 437 | 463 | SYSTEM_CONFIG_END |
src/mess/drivers/bw2.c
| r5609 | r5610 | |
| 36 | 36 | #include "machine/msm8251.h" |
| 37 | 37 | #include "machine/wd17xx.h" |
| 38 | 38 | #include "machine/pit8253.h" |
| 39 | | #include "devices/basicdsk.h" |
| 39 | #include "devices/mflopimg.h" |
| 40 | #include "formats/basicdsk.h" |
| 40 | 41 | #include "video/msm6255.h" |
| 41 | 42 | |
| 42 | 43 | |
| r5609 | r5610 | |
| 259 | 260 | |
| 260 | 261 | |
| 261 | 262 | /* Floppy */ |
| 262 | | |
| 263 | | static DEVICE_IMAGE_LOAD( bw2_floppy ) |
| 264 | | { |
| 265 | | if (image_has_been_created(image)) { |
| 266 | | return INIT_FAIL; |
| 267 | | } |
| 268 | | |
| 269 | | if (device_load_basicdsk_floppy(image) == INIT_PASS) |
| 270 | | { |
| 271 | | switch (image_length(image)) |
| 272 | | { |
| 273 | | case 80*1*17*256: // 340K |
| 274 | | basicdsk_set_geometry(image, 80, 1, 17, 256, 0, 0, FALSE); |
| 275 | | return INIT_PASS; |
| 276 | | |
| 277 | | case 80*1*18*256: // 360K |
| 278 | | basicdsk_set_geometry(image, 80, 1, 18, 256, 0, 0, FALSE); |
| 279 | | return INIT_PASS; |
| 280 | | } |
| 281 | | } |
| 282 | | |
| 283 | | return INIT_FAIL; |
| 284 | | } |
| 285 | | |
| 286 | 263 | static WD17XX_CALLBACK( bw2_wd17xx_callback ) |
| 287 | 264 | { |
| 288 | 265 | switch(state) |
| r5609 | r5610 | |
| 862 | 839 | ROM_LOAD("ramcard-10.bin", 0x0000, 0x4000, CRC(68cde1ba) SHA1(a776a27d64f7b857565594beb63aa2cd692dcf04)) |
| 863 | 840 | ROM_END |
| 864 | 841 | |
| 842 | static FLOPPY_OPTIONS_START(bw2) |
| 843 | FLOPPY_OPTION(bw2, "dsk", "BW2 340K disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 844 | HEADS([1]) |
| 845 | TRACKS([80]) |
| 846 | SECTORS([17]) |
| 847 | SECTOR_LENGTH([256]) |
| 848 | FIRST_SECTOR_ID([0])) |
| 849 | FLOPPY_OPTION(bw2, "dsk", "BW2 360K disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 850 | HEADS([1]) |
| 851 | TRACKS([80]) |
| 852 | SECTORS([18]) |
| 853 | SECTOR_LENGTH([256]) |
| 854 | FIRST_SECTOR_ID([0])) |
| 855 | FLOPPY_OPTIONS_END |
| 856 | |
| 865 | 857 | static void bw2_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 866 | 858 | { |
| 867 | 859 | /* floppy */ |
| 868 | 860 | switch(state) |
| 869 | 861 | { |
| 870 | 862 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 871 | | case MESS_DEVINFO_INT_COUNT: |
| 872 | | info->i = 2; |
| 873 | | break; |
| 863 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 874 | 864 | |
| 875 | 865 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 876 | | case MESS_DEVINFO_PTR_LOAD: |
| 877 | | info->load = DEVICE_IMAGE_LOAD_NAME(bw2_floppy); |
| 878 | | break; |
| 866 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_bw2; break; |
| 879 | 867 | |
| 880 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 881 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: |
| 882 | | strcpy(info->s = device_temp_str(), "dsk"); |
| 883 | | break; |
| 884 | | |
| 885 | | default: |
| 886 | | legacybasicdsk_device_getinfo(devclass, state, info); |
| 887 | | break; |
| 868 | default: floppy_device_getinfo(devclass, state, info); break; |
| 888 | 869 | } |
| 889 | 870 | } |
| 890 | | |
| 891 | 871 | static void bw2_serial_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 892 | 872 | { |
| 893 | 873 | /* serial */ |
src/mess/drivers/enterp.c
| r5609 | r5610 | |
| 20 | 20 | #include "audio/dave.h" |
| 21 | 21 | #include "video/epnick.h" |
| 22 | 22 | #include "machine/wd17xx.h" |
| 23 | | #include "devices/basicdsk.h" |
| 23 | #include "devices/mflopimg.h" |
| 24 | #include "formats/basicdsk.h" |
| 24 | 25 | |
| 25 | | |
| 26 | 26 | #define ENTERPRISE_XTAL_X1 XTAL_8MHz |
| 27 | 27 | |
| 28 | 28 | |
| r5609 | r5610 | |
| 173 | 173 | |
| 174 | 174 | static MACHINE_RESET( enterprise ) |
| 175 | 175 | { |
| 176 | const device_config *fdc = devtag_get_device(machine, "wd1770"); |
| 176 | 177 | cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), 0, 0xff); |
| 177 | 178 | |
| 178 | 179 | floppy_drive_set_geometry(image_from_devtype_and_index(machine, IO_FLOPPY, 0), FLOPPY_DRIVE_DS_80); |
| 180 | wd17xx_set_density(fdc, DEN_FM_HI); |
| 179 | 181 | } |
| 180 | 182 | |
| 181 | 183 | |
| r5609 | r5610 | |
| 236 | 238 | wd17xx_set_side(fdc, BIT(data, 4)); |
| 237 | 239 | } |
| 238 | 240 | |
| 239 | | |
| 240 | | static DEVICE_IMAGE_LOAD( enterprise_floppy ) |
| 241 | | { |
| 242 | | const device_config *fdc = devtag_get_device(image->machine, "wd1770"); |
| 243 | | |
| 244 | | wd17xx_set_density(fdc, DEN_FM_HI); |
| 245 | | |
| 246 | | if (device_load_basicdsk_floppy(image) != INIT_PASS) |
| 247 | | return INIT_FAIL; |
| 248 | | |
| 249 | | basicdsk_set_geometry(image, 80, 2, 9, 512, 1, 0, FALSE); |
| 250 | | return INIT_PASS; |
| 251 | | } |
| 252 | | |
| 253 | | |
| 254 | 241 | /*************************************************************************** |
| 255 | 242 | ADDRESS MAPS |
| 256 | 243 | ***************************************************************************/ |
| r5609 | r5610 | |
| 517 | 504 | /*************************************************************************** |
| 518 | 505 | SYSTEM CONFIG |
| 519 | 506 | ***************************************************************************/ |
| 507 | static FLOPPY_OPTIONS_START(enterprise) |
| 508 | FLOPPY_OPTION(enterprise, "dsk,img", "Enterprise disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 509 | HEADS([2]) |
| 510 | TRACKS([80]) |
| 511 | SECTORS([9]) |
| 512 | SECTOR_LENGTH([512]) |
| 513 | FIRST_SECTOR_ID([1])) |
| 514 | FLOPPY_OPTIONS_END |
| 520 | 515 | |
| 521 | 516 | static void enterprise_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 522 | 517 | { |
| r5609 | r5610 | |
| 524 | 519 | switch(state) |
| 525 | 520 | { |
| 526 | 521 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 527 | | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 522 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 528 | 523 | |
| 529 | 524 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 530 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(enterprise_floppy); break; |
| 525 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_enterprise; break; |
| 531 | 526 | |
| 532 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 533 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk,img"); break; |
| 534 | | |
| 535 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 527 | default: floppy_device_getinfo(devclass, state, info); break; |
| 536 | 528 | } |
| 537 | 529 | } |
| 538 | | |
| 539 | | |
| 540 | 530 | static SYSTEM_CONFIG_START(ep64) |
| 541 | 531 | CONFIG_RAM_DEFAULT(64*1024) |
| 542 | 532 | CONFIG_DEVICE(enterprise_floppy_getinfo) |
src/mess/drivers/atom.c
| r5609 | r5610 | |
| 69 | 69 | #include "video/m6847.h" |
| 70 | 70 | |
| 71 | 71 | /* Devices */ |
| 72 | | #include "devices/basicdsk.h" |
| 73 | | #include "devices/flopdrv.h" |
| 72 | #include "devices/mflopimg.h" |
| 73 | #include "formats/basicdsk.h" |
| 74 | 74 | #include "devices/cassette.h" |
| 75 | 75 | #include "devices/snapquik.h" |
| 76 | 76 | #include "sound/speaker.h" |
| r5609 | r5610 | |
| 334 | 334 | ROM_LOAD ("atomicw.rom",0x018000,0x1000, CRC(a3fd737d) SHA1(d418d9322c69c49106ed2c268ad0864c0f2c4c1b)) // Atomic Windows |
| 335 | 335 | ROM_END |
| 336 | 336 | |
| 337 | static FLOPPY_OPTIONS_START(atom) |
| 338 | FLOPPY_OPTION(atom, "ssd", "Atom disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 339 | HEADS([1]) |
| 340 | TRACKS([80]) |
| 341 | SECTORS([10]) |
| 342 | SECTOR_LENGTH([256]) |
| 343 | FIRST_SECTOR_ID([0])) |
| 344 | FLOPPY_OPTIONS_END |
| 337 | 345 | |
| 338 | 346 | static void atom_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 339 | 347 | { |
| r5609 | r5610 | |
| 344 | 352 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 345 | 353 | |
| 346 | 354 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 347 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(atom_floppy); break; |
| 355 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_atom; break; |
| 348 | 356 | |
| 349 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 350 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "ssd"); break; |
| 351 | | |
| 352 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 357 | default: floppy_device_getinfo(devclass, state, info); break; |
| 353 | 358 | } |
| 354 | 359 | } |
| 355 | 360 | |
src/mess/drivers/apf.c
| r5609 | r5610 | |
| 20 | 20 | |
| 21 | 21 | #include "machine/6821pia.h" |
| 22 | 22 | #include "machine/wd17xx.h" |
| 23 | | #include "devices/basicdsk.h" |
| 23 | #include "devices/mflopimg.h" |
| 24 | #include "formats/basicdsk.h" |
| 24 | 25 | #include "devices/cassette.h" |
| 25 | 26 | #include "devices/cartslot.h" |
| 26 | 27 | #include "formats/apf_apt.h" |
| r5609 | r5610 | |
| 685 | 686 | ROM_CART_LOAD("cart", 0x8000, 0x2000, ROM_OPTIONAL) |
| 686 | 687 | ROM_END |
| 687 | 688 | |
| 689 | static FLOPPY_OPTIONS_START(apfimag) |
| 690 | FLOPPY_OPTION(apfimag, "apd", "APF disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 691 | HEADS([1]) |
| 692 | TRACKS([40]) |
| 693 | SECTORS([8]) |
| 694 | SECTOR_LENGTH([256]) |
| 695 | FIRST_SECTOR_ID([1])) |
| 696 | FLOPPY_OPTIONS_END |
| 688 | 697 | |
| 689 | 698 | static void apfimag_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 690 | 699 | { |
| r5609 | r5610 | |
| 695 | 704 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 696 | 705 | |
| 697 | 706 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 698 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(apfimag_floppy); break; |
| 707 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_apfimag; break; |
| 699 | 708 | |
| 700 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 701 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "apd"); break; |
| 702 | | |
| 703 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 709 | default: floppy_device_getinfo(devclass, state, info); break; |
| 704 | 710 | } |
| 705 | 711 | } |
| 706 | 712 | |
| 707 | | |
| 708 | 713 | static SYSTEM_CONFIG_START( apfimag ) |
| 709 | 714 | CONFIG_DEVICE(apfimag_floppy_getinfo) |
| 710 | 715 | SYSTEM_CONFIG_END |
src/mess/drivers/partner.c
| r5609 | r5610 | |
| 15 | 15 | #include "machine/wd17xx.h" |
| 16 | 16 | #include "video/i8275.h" |
| 17 | 17 | #include "devices/cassette.h" |
| 18 | | #include "devices/basicdsk.h" |
| 18 | #include "devices/mflopimg.h" |
| 19 | #include "formats/basicdsk.h" |
| 19 | 20 | #include "formats/rk_cas.h" |
| 20 | 21 | #include "includes/radio86.h" |
| 21 | 22 | #include "includes/partner.h" |
| r5609 | r5610 | |
| 179 | 180 | MDRV_WD1793_ADD("wd1793", partner_wd17xx_interface ) |
| 180 | 181 | MACHINE_DRIVER_END |
| 181 | 182 | |
| 183 | static FLOPPY_OPTIONS_START(partner) |
| 184 | FLOPPY_OPTION(partner, "cpm", "Partner disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 185 | HEADS([2]) |
| 186 | TRACKS([80]) |
| 187 | SECTORS([5]) |
| 188 | SECTOR_LENGTH([1024]) |
| 189 | FIRST_SECTOR_ID([1])) |
| 190 | FLOPPY_OPTIONS_END |
| 182 | 191 | |
| 183 | 192 | static void partner_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 184 | 193 | { |
| r5609 | r5610 | |
| 189 | 198 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 190 | 199 | |
| 191 | 200 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 192 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(partner_floppy); break; |
| 201 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_partner; break; |
| 193 | 202 | |
| 194 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 195 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "cpm"); break; |
| 196 | | |
| 197 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 203 | default: floppy_device_getinfo(devclass, state, info); break; |
| 198 | 204 | } |
| 199 | 205 | } |
| 200 | 206 | |
src/mess/drivers/tmc2000e.c
| r5609 | r5610 | |
| 33 | 33 | #include "includes/tmc2000e.h" |
| 34 | 34 | #include "cpu/cdp1802/cdp1802.h" |
| 35 | 35 | #include "devices/printer.h" |
| 36 | | #include "devices/basicdsk.h" |
| 36 | #include "devices/mflopimg.h" |
| 37 | #include "formats/basicdsk.h" |
| 37 | 38 | #include "devices/cassette.h" |
| 38 | 39 | #include "video/cdp1864.h" |
| 39 | 40 | #include "sound/beep.h" |
| r5609 | r5610 | |
| 326 | 327 | ROM_END |
| 327 | 328 | |
| 328 | 329 | /* System Configuration */ |
| 330 | static FLOPPY_OPTIONS_START(tmc2000e) |
| 331 | // dsk |
| 332 | FLOPPY_OPTIONS_END |
| 329 | 333 | |
| 330 | 334 | static void tmc2000e_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 331 | 335 | { |
| r5609 | r5610 | |
| 336 | 340 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 337 | 341 | |
| 338 | 342 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 339 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(basicdsk_floppy); break; |
| 343 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_tmc2000e; break; |
| 340 | 344 | |
| 341 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 342 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 343 | | |
| 344 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 345 | default: floppy_device_getinfo(devclass, state, info); break; |
| 345 | 346 | } |
| 346 | 347 | } |
| 347 | 348 | |
src/mess/drivers/special.c
| r5609 | r5610 | |
| 17 | 17 | #include "machine/i8255a.h" |
| 18 | 18 | #include "machine/pit8253.h" |
| 19 | 19 | #include "devices/cassette.h" |
| 20 | | #include "devices/basicdsk.h" |
| 20 | #include "devices/mflopimg.h" |
| 21 | #include "formats/basicdsk.h" |
| 21 | 22 | #include "formats/rk_cas.h" |
| 22 | 23 | #include "machine/wd17xx.h" |
| 23 | 24 | |
| r5609 | r5610 | |
| 537 | 538 | ROM_LOAD( "erik.bin", 0x10000, 0x10000, CRC(6F3208F4) SHA1(41f6e2763ef60d3c7214c98893e580d25346fa2d)) |
| 538 | 539 | ROM_END |
| 539 | 540 | |
| 541 | static FLOPPY_OPTIONS_START(specimx) |
| 542 | FLOPPY_OPTION(specimx, "odi,img", "Specialist MX disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 543 | HEADS([2]) |
| 544 | TRACKS([80]) |
| 545 | SECTORS([5]) |
| 546 | SECTOR_LENGTH([1024]) |
| 547 | FIRST_SECTOR_ID([1])) |
| 548 | FLOPPY_OPTIONS_END |
| 549 | |
| 540 | 550 | static void specimx_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 541 | 551 | { |
| 542 | 552 | /* floppy */ |
| r5609 | r5610 | |
| 546 | 556 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 547 | 557 | |
| 548 | 558 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 549 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(specimx_floppy); break; |
| 559 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_specimx; break; |
| 550 | 560 | |
| 551 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 552 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "odi,img"); break; |
| 553 | | |
| 554 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 561 | default: floppy_device_getinfo(devclass, state, info); break; |
| 555 | 562 | } |
| 556 | 563 | } |
| 557 | 564 | |
src/mess/drivers/pyl601.c
| r5609 | r5610 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "cpu/m6800/m6800.h" |
| 11 | 11 | #include "video/mc6845.h" |
| 12 | | #include "devices/basicdsk.h" |
| 12 | #include "devices/mflopimg.h" |
| 13 | #include "formats/basicdsk.h" |
| 13 | 14 | #include "machine/nec765.h" |
| 14 | 15 | |
| 15 | 16 | static UINT8 rom_page; |
| r5609 | r5610 | |
| 493 | 494 | MDRV_MC6845_ADD("crtc", MC6845, XTAL_2MHz, pyl601a_crtc6845_interface) |
| 494 | 495 | MACHINE_DRIVER_END |
| 495 | 496 | |
| 496 | | static DEVICE_IMAGE_LOAD( pyldin_floppy ) |
| 497 | | { |
| 498 | | if (image_has_been_created(image)) |
| 499 | | { |
| 500 | | return INIT_FAIL; |
| 501 | | } |
| 497 | static FLOPPY_OPTIONS_START(pyldin) |
| 498 | FLOPPY_OPTION(pyldin, "img", "Pyldin disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 499 | HEADS([2]) |
| 500 | TRACKS([80]) |
| 501 | SECTORS([9]) |
| 502 | SECTOR_LENGTH([512]) |
| 503 | FIRST_SECTOR_ID([1])) |
| 504 | FLOPPY_OPTIONS_END |
| 502 | 505 | |
| 503 | | if (DEVICE_IMAGE_LOAD_NAME(basicdsk_floppy)(image) == INIT_PASS) |
| 504 | | { |
| 505 | | switch (image_length(image)) |
| 506 | | { |
| 507 | | case 720*1024: |
| 508 | | basicdsk_set_geometry(image, 80, 2, 9, 512, 1, 0, FALSE); |
| 509 | | break; |
| 510 | | default: |
| 511 | | return INIT_FAIL; |
| 512 | | } |
| 513 | | |
| 514 | | return INIT_PASS; |
| 515 | | } |
| 516 | | |
| 517 | | return INIT_FAIL; |
| 518 | | } |
| 519 | | |
| 520 | 506 | static void pyldin_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 521 | 507 | { |
| 522 | | switch (state) |
| 508 | /* floppy */ |
| 509 | switch(state) |
| 523 | 510 | { |
| 524 | 511 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 525 | | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 512 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 526 | 513 | |
| 527 | 514 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 528 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(pyldin_floppy); break; |
| 515 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_pyldin; break; |
| 529 | 516 | |
| 530 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 531 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "img"); break; |
| 532 | | |
| 533 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 517 | default: floppy_device_getinfo(devclass, state, info); break; |
| 534 | 518 | } |
| 535 | 519 | } |
| 520 | |
| 536 | 521 | static SYSTEM_CONFIG_START(pyl601) |
| 537 | 522 | CONFIG_RAM_DEFAULT((64 +512) * 1024) |
| 538 | 523 | CONFIG_DEVICE( pyldin_floppy_getinfo ) |
src/mess/drivers/pk8020.c
| r5609 | r5610 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "cpu/i8085/i8085.h" |
| 12 | 12 | #include "machine/i8255a.h" |
| 13 | #include "devices/mflopimg.h" |
| 14 | #include "formats/basicdsk.h" |
| 13 | 15 | #include "includes/pk8020.h" |
| 14 | 16 | |
| 15 | 17 | /* Address maps */ |
| r5609 | r5610 | |
| 188 | 190 | MDRV_CASSETTE_ADD( "cassette", pk8020_cassette_config ) |
| 189 | 191 | MACHINE_DRIVER_END |
| 190 | 192 | |
| 191 | | static void pk8020_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 193 | static FLOPPY_OPTIONS_START(pk8020) |
| 194 | FLOPPY_OPTION(pk8020, "kdi", "PK8020 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 195 | HEADS([2]) |
| 196 | TRACKS([80]) |
| 197 | SECTORS([5]) |
| 198 | SECTOR_LENGTH([1024]) |
| 199 | FIRST_SECTOR_ID([1])) |
| 200 | FLOPPY_OPTIONS_END |
| 201 | |
| 202 | static void pk8020_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 192 | 203 | { |
| 193 | 204 | /* floppy */ |
| 194 | 205 | switch(state) |
| r5609 | r5610 | |
| 197 | 208 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 198 | 209 | |
| 199 | 210 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 200 | | case MESS_DEVINFO_PTR_LOAD: info->load = device_load_pk8020_floppy; break; |
| 211 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_pk8020; break; |
| 201 | 212 | |
| 202 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 203 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "kdi"); break; |
| 204 | | |
| 205 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 206 | | } |
| 213 | default: floppy_device_getinfo(devclass, state, info); break; |
| 214 | } |
| 207 | 215 | } |
| 208 | 216 | |
| 209 | 217 | /* ROM definition */ |
src/mess/drivers/bbc.c
| r5609 | r5610 | |
| 17 | 17 | #include "includes/bbc.h" |
| 18 | 18 | #include "machine/upd7002.h" |
| 19 | 19 | #include "machine/ctronics.h" |
| 20 | | #include "devices/basicdsk.h" |
| 20 | #include "devices/mflopimg.h" |
| 21 | #include "formats/basicdsk.h" |
| 21 | 22 | #include "devices/cartslot.h" |
| 22 | 23 | #include "devices/cassette.h" |
| 23 | 24 | #include "formats/uef_cas.h" |
| r5609 | r5610 | |
| 915 | 916 | MDRV_IMPORT_FROM(bbc_cartslot) |
| 916 | 917 | MACHINE_DRIVER_END |
| 917 | 918 | |
| 919 | static FLOPPY_OPTIONS_START(bbc) |
| 920 | FLOPPY_OPTION(bbc, "ssd,bbc,img", "BBC disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 921 | HEADS([1]) |
| 922 | TRACKS([80]) |
| 923 | SECTORS([10]) |
| 924 | SECTOR_LENGTH([256]) |
| 925 | FIRST_SECTOR_ID([0])) |
| 926 | FLOPPY_OPTIONS_END |
| 927 | |
| 918 | 928 | static void bbc_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 919 | 929 | { |
| 920 | 930 | /* floppy */ |
| r5609 | r5610 | |
| 924 | 934 | case MESS_DEVINFO_INT_COUNT: info->i = 2; break; |
| 925 | 935 | |
| 926 | 936 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 927 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(bbc_floppy); break; |
| 937 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_bbc; break; |
| 928 | 938 | |
| 929 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 930 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "ssd,bbc,img"); break; |
| 931 | | |
| 932 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 939 | default: floppy_device_getinfo(devclass, state, info); break; |
| 933 | 940 | } |
| 934 | 941 | } |
| 935 | 942 | |
| 936 | | |
| 937 | 943 | static SYSTEM_CONFIG_START(bbc) |
| 938 | 944 | CONFIG_DEVICE(bbc_floppy_getinfo) |
| 939 | 945 | SYSTEM_CONFIG_END |
| 940 | 946 | |
| 941 | | |
| 942 | | |
| 943 | 947 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 944 | 948 | COMP ( 1981, bbca, 0, 0, bbca, bbca, bbc, 0, "Acorn","BBC Micro Model A" , 0) |
| 945 | 949 | COMP ( 1981, bbcb, bbca, 0, bbcb, bbca, bbc, bbc, "Acorn","BBC Micro Model B" , 0) |
src/mess/drivers/kc.c
| r5609 | r5610 | |
| 27 | 27 | |
| 28 | 28 | /* Devices */ |
| 29 | 29 | #include "devices/cassette.h" |
| 30 | | #include "devices/basicdsk.h" |
| 30 | #include "devices/mflopimg.h" |
| 31 | #include "formats/basicdsk.h" |
| 31 | 32 | |
| 32 | | |
| 33 | 33 | static READ8_HANDLER(kc85_4_port_r) |
| 34 | 34 | { |
| 35 | 35 | int port; |
| r5609 | r5610 | |
| 483 | 483 | CONFIG_RAM_DEFAULT (64 * 1024) |
| 484 | 484 | SYSTEM_CONFIG_END |
| 485 | 485 | |
| 486 | static FLOPPY_OPTIONS_START(kc85) |
| 487 | FLOPPY_OPTION(kc85, "img", "KC85 disk image", basicdsk_identify_default, basicdsk_construct_default, |
| 488 | HEADS([2]) |
| 489 | TRACKS([80]) |
| 490 | SECTORS([9]) |
| 491 | SECTOR_LENGTH([512]) |
| 492 | FIRST_SECTOR_ID([1])) |
| 493 | FLOPPY_OPTIONS_END |
| 494 | |
| 486 | 495 | static void kc85d_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 487 | 496 | { |
| 488 | 497 | /* floppy */ |
| r5609 | r5610 | |
| 492 | 501 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break; |
| 493 | 502 | |
| 494 | 503 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 495 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(kc85_floppy); break; |
| 504 | case MESS_DEVINFO_PTR_FLOPPY_OPTIONS: info->p = (void *) floppyoptions_kc85; break; |
| 496 | 505 | |
| 497 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 498 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "dsk"); break; |
| 499 | | |
| 500 | | default: legacybasicdsk_device_getinfo(devclass, state, info); break; |
| 506 | default: floppy_device_getinfo(devclass, state, info); break; |
| 501 | 507 | } |
| 502 | 508 | } |
| 503 | 509 | |