| Previous | 15994 Revisions | Next |
| r2175 Sunday 30th March, 2008 at 23:30:48 UTC by Nathan Woods |
|---|
| Changed the macros used to declare load/unload/create image callbacks |
| [src/mame/includes] | atari.h |
| [src/mame/machine] | atari.c |
| [src/mess] | image.h |
| [src/mess/devices] | appldriv.c basicdsk.c basicdsk.h bitbngr.c cartslot.c cassette.c chd_cd.c coco_vhd.c dsk.c harddriv.c harddriv.h idedrive.c mflopimg.c mfmdisk.c mfmdisk.h snapquik.c sonydriv.c |
| [src/mess/drivers] | a2600.c abc80x.c apexc.c arcadia.c atarist.c crvision.c exelv.c exidy.c gamepock.c genesis.c lynx.c n64.c osi.c pasogo.c ql.c sg1000.c snes.c studio2.c super80.c tm990189.c tutor.c vc4000.c x68k.c |
| [src/mess/includes] | a7800.h adam.h amstrad.h apf.h atom.h bbc.h c16.h cgenie.h coco.h coupe.h d88.h enterp.h gamecom.h gb.h intv.h jupiter.h kc.h mbee.h mekd2.h msx.h nascom1.h nc.h nes.h oric.h osborne1.h pce.h pdp1.h pokemini.h sms.h special.h spectrum.h svi318.h ti85.h trs80.h tx0.h vc1541.h vc20.h vectrex.h vtech1.h vtech2.h wswan.h |
| [src/mess/machine] | 990_hd.c 990_hd.h 990_tap.c 990_tap.h 994x_ser.c 994x_ser.h 99_hsgpl.h 99_usbsm.h a7800.c abcbus.c abcbus.h adam.c amigafdc.c amstrad.c apf.c atarifdc.c atom.c bbc.c c16.c cbm.c cbmserb.c cgenie.c coco.c coupe.c cpm_bios.c cpm_bios.h d88.c enterp.c gamecom.c gb.c intv.c jupiter.c kc.c kim1.c mbee.c mekd2.c msx.c nascom1.c nc.c nes.c oric.c osborne1.c pce.c pdp1.c pokemini.c smartmed.c smartmed.h sms.c special.c spectrum.c svi318.c ti85.c ti99_4x.c ti99_4x.h trs80.c tx0.c vc1541.c vc20.c vc20tape.c vectrex.c vtech1.c vtech2.c wswan.c |
| r2174 | r2175 | |
|---|---|---|
| 838 | 838 | |
| 839 | 839 | |
| 840 | 840 | #ifdef MESS |
| 841 | DEVICE_LOAD( a800_cart ) | |
| 841 | DEVICE_IMAGE_LOAD( a800_cart ) | |
| 842 | 842 | { |
| 843 | 843 | UINT8 *mem = memory_region(REGION_CPU1); |
| 844 | 844 | int size; |
| r2174 | r2175 | |
| 861 | 861 | return INIT_PASS; |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | DEVICE_UNLOAD( a800_cart ) | |
| 864 | DEVICE_IMAGE_UNLOAD( a800_cart ) | |
| 865 | 865 | { |
| 866 | 866 | if( image_index_in_device(image) > 0 ) |
| 867 | 867 | { |
| r2174 | r2175 | |
| 892 | 892 | |
| 893 | 893 | |
| 894 | 894 | #ifdef MESS |
| 895 | DEVICE_LOAD( a800xl_cart ) | |
| 895 | DEVICE_IMAGE_LOAD( a800xl_cart ) | |
| 896 | 896 | { |
| 897 | 897 | UINT8 *mem = memory_region(REGION_CPU1); |
| 898 | 898 | astring *fname; |
| r2174 | r2175 | |
| 949 | 949 | |
| 950 | 950 | |
| 951 | 951 | #ifdef MESS |
| 952 | DEVICE_LOAD( a5200_cart ) | |
| 952 | DEVICE_IMAGE_LOAD( a5200_cart ) | |
| 953 | 953 | { |
| 954 | 954 | UINT8 *mem = memory_region(REGION_CPU1); |
| 955 | 955 | int size; |
| r2174 | r2175 | |
| 976 | 976 | return INIT_PASS; |
| 977 | 977 | } |
| 978 | 978 | |
| 979 | DEVICE_UNLOAD( a5200_cart ) | |
| 979 | DEVICE_IMAGE_UNLOAD( a5200_cart ) | |
| 980 | 980 | { |
| 981 | 981 | UINT8 *mem = memory_region(REGION_CPU1); |
| 982 | 982 | /* zap the cartridge memory (again) */ |
| r2174 | r2175 | |
|---|---|---|
| 36 | 36 | MACHINE_START( a5200 ); |
| 37 | 37 | |
| 38 | 38 | #ifdef MESS |
| 39 | DEVICE_LOAD( a800_floppy ); | |
| 39 | DEVICE_IMAGE_LOAD( a800_floppy ); | |
| 40 | 40 | |
| 41 | DEVICE_LOAD( a800_cart ); | |
| 42 | DEVICE_UNLOAD( a800_cart ); | |
| 41 | DEVICE_IMAGE_LOAD( a800_cart ); | |
| 42 | DEVICE_IMAGE_UNLOAD( a800_cart ); | |
| 43 | 43 | |
| 44 | DEVICE_LOAD( a800xl_cart ); | |
| 45 | DEVICE_UNLOAD( a800xl_cart ); | |
| 44 | DEVICE_IMAGE_LOAD( a800xl_cart ); | |
| 45 | DEVICE_IMAGE_UNLOAD( a800xl_cart ); | |
| 46 | 46 | |
| 47 | DEVICE_LOAD( a5200_cart ); | |
| 48 | DEVICE_UNLOAD( a5200_cart ); | |
| 47 | DEVICE_IMAGE_LOAD( a5200_cart ); | |
| 48 | DEVICE_IMAGE_UNLOAD( a5200_cart ); | |
| 49 | 49 | #endif |
| 50 | 50 | |
| 51 | 51 | READ8_HANDLER ( atari_serin_r ); |
| r2174 | r2175 | |
|---|---|---|
| 166 | 166 | |
| 167 | 167 | |
| 168 | 168 | |
| 169 | DEVICE_LOAD( mess_hd ) | |
| 169 | DEVICE_IMAGE_LOAD( mess_hd ) | |
| 170 | 170 | { |
| 171 | 171 | return internal_load_mess_hd(image, NULL); |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | |
| 175 | 175 | #ifdef UNUSED_FUNCTION |
| 176 | static DEVICE_CREATE( mess_hd ) | |
| 176 | static DEVICE_IMAGE_CREATE( mess_hd ) | |
| 177 | 177 | { |
| 178 | 178 | int err; |
| 179 | 179 | char metadata[256]; |
| r2174 | r2175 | |
| 210 | 210 | * |
| 211 | 211 | *************************************/ |
| 212 | 212 | |
| 213 | DEVICE_UNLOAD( mess_hd ) | |
| 213 | DEVICE_IMAGE_UNLOAD( mess_hd ) | |
| 214 | 214 | { |
| 215 | 215 | struct mess_hd *hd = get_drive(image); |
| 216 | 216 | assert(hd->hard_disk_handle); |
| r2174 | r2175 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | DEVICE_START( mess_hd ); |
| 18 | DEVICE_LOAD( mess_hd ); | |
| 19 | DEVICE_UNLOAD( mess_hd ); | |
| 18 | DEVICE_IMAGE_LOAD( mess_hd ); | |
| 19 | DEVICE_IMAGE_UNLOAD( mess_hd ); | |
| 20 | 20 | |
| 21 | 21 | hard_disk_file *mess_hd_get_hard_disk_file(const device_config *image); |
| 22 | 22 | hard_disk_file *mess_hd_get_hard_disk_file_by_number(int drivenum); |
| r2174 | r2175 | |
|---|---|---|
| 242 | 242 | |
| 243 | 243 | |
| 244 | 244 | |
| 245 | static DEVICE_LOAD( cassette ) | |
| 245 | static DEVICE_IMAGE_LOAD( cassette ) | |
| 246 | 246 | { |
| 247 | 247 | casserr_t err; |
| 248 | 248 | int cassette_flags; |
| r2174 | r2175 | |
| 302 | 302 | |
| 303 | 303 | |
| 304 | 304 | |
| 305 | static DEVICE_UNLOAD( cassette ) | |
| 305 | static DEVICE_IMAGE_UNLOAD( cassette ) | |
| 306 | 306 | { |
| 307 | 307 | struct mess_cassetteimg *tag; |
| 308 | 308 |
| r2174 | r2175 | |
|---|---|---|
| 488 | 488 | |
| 489 | 489 | |
| 490 | 490 | |
| 491 | static DEVICE_UNLOAD( sonydriv_floppy ) | |
| 491 | static DEVICE_IMAGE_UNLOAD( sonydriv_floppy ) | |
| 492 | 492 | { |
| 493 | 493 | int id; |
| 494 | 494 | device_unload_handler parent_unload; |
| r2174 | r2175 | |
|---|---|---|
| 305 | 305 | |
| 306 | 306 | |
| 307 | 307 | /* load image */ |
| 308 | DEVICE_LOAD( mfm_disk ) | |
| 308 | DEVICE_IMAGE_LOAD( mfm_disk ) | |
| 309 | 309 | { |
| 310 | 310 | struct mfm_disk_info *pDisk = get_disk(image); |
| 311 | 311 |
| r2174 | r2175 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | |
| 68 | 68 | /*------------------------------------------------- |
| 69 | ide_hd | |
| 69 | DEVICE_IMAGE_LOAD(ide_hd) | |
| 70 | 70 | -------------------------------------------------*/ |
| 71 | 71 | |
| 72 | static | |
| 72 | static DEVICE | |
| 73 | 73 | { |
| 74 | 74 | int result, which_bus, which_address; |
| 75 | 75 | struct ide_interface *intf; |
| r2174 | r2175 | |
| 92 | 92 | |
| 93 | 93 | |
| 94 | 94 | /*------------------------------------------------- |
| 95 | ide_hd | |
| 95 | DEVICE_IMAGE_UNLOAD(ide_hd) | |
| 96 | 96 | -------------------------------------------------*/ |
| 97 | 97 | |
| 98 | static | |
| 98 | static DEVICE | |
| 99 | 99 | { |
| 100 | 100 | int which_bus, which_address; |
| 101 | 101 | struct ide_interface *intf; |
| r2174 | r2175 | |
| 161 | 161 | switch(state) |
| 162 | 162 | { |
| 163 | 163 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 164 | case MESS_DEVINFO_PTR_START: info->start = DEVICE_START_NAME(ide_hd); break; | |
| 165 | case MESS_DEVINFO_PTR_LOAD: info->load = ide_hd_load; break; | |
| 166 | case MESS_DEVINFO_PTR_UNLOAD: info->unload = ide_hd_unload; break; | |
| 164 | case MESS_DEVINFO_PTR_START: info->start = DEVICE_START_NAME(ide_hd); break; | |
| 165 | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ide_hd); break; | |
| 166 | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ide_hd); break; | |
| 167 | 167 | case MESS_DEVINFO_PTR_VALIDITY_CHECK: info->validity_check = ide_hd_validity_check; break; |
| 168 | 168 | |
| 169 | 169 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| r2174 | r2175 | |
|---|---|---|
| 146 | 146 | process_cartridge(device, NULL); |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | static DEVICE_LOAD( cartslot_specified ) | |
| 149 | static DEVICE_IMAGE_LOAD( cartslot_specified ) | |
| 150 | 150 | { |
| 151 | 151 | return process_cartridge(image, image); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | static DEVICE_UNLOAD( cartslot_specified ) | |
| 154 | static DEVICE_IMAGE_UNLOAD( cartslot_specified ) | |
| 155 | 155 | { |
| 156 | 156 | process_cartridge(image, NULL); |
| 157 | 157 | } |
| r2174 | r2175 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | extern const floppy_interface mfm_disk_floppy_interface; |
| 10 | 10 | |
| 11 | DEVICE_LOAD( mfm_disk ); | |
| 11 | DEVICE_IMAGE_LOAD( mfm_disk ); | |
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | #endif /* MFMDISK_H */ |
| r2174 | r2175 | |
|---|---|---|
| 145 | 145 | |
| 146 | 146 | |
| 147 | 147 | |
| 148 | static DEVICE_LOAD( mess_cd ) | |
| 148 | static DEVICE_IMAGE_LOAD( mess_cd ) | |
| 149 | 149 | { |
| 150 | 150 | return internal_load_mess_cd(image, NULL); |
| 151 | 151 | } |
| r2174 | r2175 | |
| 160 | 160 | * |
| 161 | 161 | *************************************/ |
| 162 | 162 | |
| 163 | static DEVICE_UNLOAD( mess_cd ) | |
| 163 | static DEVICE_IMAGE_UNLOAD( mess_cd ) | |
| 164 | 164 | { |
| 165 | 165 | struct mess_cd *cd = get_drive(image); |
| 166 | 166 | assert(cd->cdrom_handle); |
| r2174 | r2175 | |
|---|---|---|
| 331 | 331 | |
| 332 | 332 | |
| 333 | 333 | |
| 334 | static DEVICE_LOAD( floppy ) | |
| 334 | static DEVICE_IMAGE_LOAD( floppy ) | |
| 335 | 335 | { |
| 336 | 336 | return internal_floppy_device_load(image, -1, NULL); |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | |
| 340 | 340 | |
| 341 | static DEVICE_CREATE( floppy ) | |
| 341 | static DEVICE_IMAGE_CREATE( floppy ) | |
| 342 | 342 | { |
| 343 | 343 | return internal_floppy_device_load(image, create_format, create_args); |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | |
| 347 | 347 | |
| 348 | static DEVICE_UNLOAD( floppy ) | |
| 348 | static DEVICE_IMAGE_UNLOAD( floppy ) | |
| 349 | 349 | { |
| 350 | 350 | mess_flopimg *flopimg; |
| 351 | 351 | flopimg = image_lookuptag(image, FLOPPY_TAG); |
| r2174 | r2175 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | |
| 81 | 81 | /* load floppy */ |
| 82 | static DEVICE_LOAD( dsk_floppy ) | |
| 82 | static DEVICE_IMAGE_LOAD( dsk_floppy ) | |
| 83 | 83 | { |
| 84 | 84 | int id = image_index_in_device(image); |
| 85 | 85 | dsk_drive *thedrive = &drives[id]; |
| r2174 | r2175 | |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | |
| 125 | static DEVICE_UNLOAD( dsk_floppy ) | |
| 125 | static DEVICE_IMAGE_UNLOAD( dsk_floppy ) | |
| 126 | 126 | { |
| 127 | 127 | int id = image_index_in_device(image); |
| 128 | 128 | dsk_drive *thedrive = &drives[id]; |
| r2174 | r2175 | |
|---|---|---|
| 288 | 288 | |
| 289 | 289 | |
| 290 | 290 | |
| 291 | static DEVICE_LOAD( apple525_floppy ) | |
| 291 | static DEVICE_IMAGE_LOAD( apple525_floppy ) | |
| 292 | 292 | { |
| 293 | 293 | int result; |
| 294 | 294 | device_load_handler parent_load; |
| r2174 | r2175 | |
| 303 | 303 | |
| 304 | 304 | |
| 305 | 305 | |
| 306 | static DEVICE_UNLOAD( apple525_floppy ) | |
| 306 | static DEVICE_IMAGE_UNLOAD( apple525_floppy ) | |
| 307 | 307 | { |
| 308 | 308 | device_unload_handler parent_unload; |
| 309 | 309 |
| r2174 | r2175 | |
|---|---|---|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /* attempt to insert a disk into the drive specified with id */ |
| 93 | DEVICE_LOAD( basicdsk_floppy ) | |
| 93 | DEVICE_IMAGE_LOAD( basicdsk_floppy ) | |
| 94 | 94 | { |
| 95 | 95 | basicdsk *w = get_basicdsk(image); |
| 96 | 96 | |
| r2174 | r2175 | |
| 109 | 109 | return INIT_PASS; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | DEVICE_UNLOAD( basicdsk_floppy ) | |
| 112 | DEVICE_IMAGE_UNLOAD( basicdsk_floppy ) | |
| 113 | 113 | { |
| 114 | 114 | basicdsk *w = get_basicdsk(image); |
| 115 | 115 | w->image_file = NULL; |
| r2174 | r2175 | |
|---|---|---|
| 74 | 74 | |
| 75 | 75 | |
| 76 | 76 | |
| 77 | static DEVICE_LOAD( coco_vhd ) | |
| 77 | static DEVICE_IMAGE_LOAD( coco_vhd ) | |
| 78 | 78 | { |
| 79 | 79 | vhd_status = VHDSTATUS_POWER_ON_STATE; |
| 80 | 80 | logical_record_number = 0; |
| r2174 | r2175 | |
| 241 | 241 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 242 | 242 | case MESS_DEVINFO_INT_TYPE: info->i = IO_VHD; break; |
| 243 | 243 | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 244 | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; | |
| 245 | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; | |
| 246 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; | |
| 244 | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; | |
| 245 | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; | |
| 246 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; | |
| 247 | 247 | |
| 248 | 248 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 249 | case MESS_DEVINFO_PTR_START: info->start = DEVICE_START_NAME(coco_vhd); break; | |
| 250 | case MESS_DEVINFO_PTR_LOAD: info->load = device_load_coco_vhd; break; | |
| 249 | case MESS_DEVINFO_PTR_START: info->start = DEVICE_START_NAME(coco_vhd); break; | |
| 250 | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(coco_vhd); break; | |
| 251 | 251 | |
| 252 | 252 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 253 | 253 | case MESS_DEVINFO_STR_DEV_FILE: strcpy(info->s = device_temp_str(), __FILE__); break; |
| 254 | 254 | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "vhd"); break; |
| 255 | case MESS_DEVINFO_STR_DESCRIPTION+0: | |
| 255 | case MESS_DEVINFO_STR_DESCRIPTION+0: | |
| 256 | 256 | } |
| 257 | 257 | } |
| 258 | 258 |
| r2174 | r2175 | |
|---|---|---|
| 163 | 163 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 164 | 164 | case MESS_DEVINFO_INT_TYPE: info->i = IO_BITBANGER; break; |
| 165 | 165 | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 166 | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; | |
| 167 | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; | |
| 166 | case MESS_DEVINFO_INT_WRITEABLE: info->i = 1; break; | |
| 167 | case MESS_DEVINFO_INT_CREATABLE: info->i = 1; break; | |
| 168 | 168 | |
| 169 | 169 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 170 | case MESS_DEVINFO_PTR_START: | |
| 170 | case MESS_DEVINFO_PTR_START: | |
| 171 | 171 | |
| 172 | 172 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 173 | 173 | case MESS_DEVINFO_STR_DEV_FILE: strcpy(info->s = device_temp_str(), __FILE__); break; |
| r2174 | r2175 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | /* init */ |
| 18 | 18 | DEVICE_START(basicdsk_floppy); |
| 19 | DEVICE_LOAD(basicdsk_floppy); | |
| 20 | DEVICE_UNLOAD(basicdsk_floppy); | |
| 19 | DEVICE_IMAGE_LOAD(basicdsk_floppy); | |
| 20 | DEVICE_IMAGE_UNLOAD(basicdsk_floppy); | |
| 21 | 21 | |
| 22 | 22 | /* set the disk image geometry for the specified drive */ |
| 23 | 23 | /* this is required to read the disc image correct */ |
| r2174 | r2175 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | |
| 41 | static DEVICE_LOAD( snapquick ) | |
| 41 | static DEVICE_IMAGE_LOAD( snapquick ) | |
| 42 | 42 | { |
| 43 | 43 | const struct IODevice *dev; |
| 44 | 44 | struct snapquick_info *si; |
| r2174 | r2175 | |
| 70 | 70 | |
| 71 | 71 | |
| 72 | 72 | |
| 73 | static DEVICE_UNLOAD( snapquick ) | |
| 73 | static DEVICE_IMAGE_UNLOAD( snapquick ) | |
| 74 | 74 | { |
| 75 | 75 | struct snapquick_info **si = &snapquick_infolist; |
| 76 | 76 |
| r2174 | r2175 | |
|---|---|---|
| 17 | 17 | MACHINE_RESET( laser500 ); |
| 18 | 18 | MACHINE_RESET( laser700 ); |
| 19 | 19 | |
| 20 | DEVICE_LOAD( laser_cart ); | |
| 21 | DEVICE_UNLOAD( laser_cart ); | |
| 20 | DEVICE_IMAGE_LOAD( laser_cart ); | |
| 21 | DEVICE_IMAGE_UNLOAD( laser_cart ); | |
| 22 | 22 | |
| 23 | DEVICE_LOAD( laser_floppy ); | |
| 23 | DEVICE_IMAGE_LOAD( laser_floppy ); | |
| 24 | 24 | |
| 25 | 25 | extern READ8_HANDLER ( laser_fdc_r ); |
| 26 | 26 | extern WRITE8_HANDLER ( laser_fdc_w ); |
| r2174 | r2175 | |
|---|---|---|
| 47 | 47 | MACHINE_RESET( kc85_4d ); |
| 48 | 48 | |
| 49 | 49 | /* cassette */ |
| 50 | DEVICE_LOAD( kc85_floppy ); | |
| 50 | DEVICE_IMAGE_LOAD( kc85_floppy ); | |
| 51 | 51 | |
| 52 | 52 | READ8_HANDLER(kc85_4_84_r); |
| 53 | 53 | WRITE8_HANDLER(kc85_4_84_w); |
| r2174 | r2175 | |
|---|---|---|
| 97 | 97 | extern READ8_HANDLER( wswan_sram_r ); |
| 98 | 98 | extern WRITE8_HANDLER( wswan_sram_w ); |
| 99 | 99 | extern DEVICE_START(wswan_cart); |
| 100 | extern DEVICE_LOAD(wswan_cart); | |
| 100 | extern DEVICE_IMAGE_LOAD(wswan_cart); | |
| 101 | 101 | extern INTERRUPT_GEN(wswan_scanline_interrupt); |
| 102 | 102 | |
| 103 | 103 |
| r2174 | r2175 | |
|---|---|---|
| 131 | 131 | WRITE18_HANDLER ( pdp1_write_mem ); |
| 132 | 132 | |
| 133 | 133 | DEVICE_START( pdp1_tape ); |
| 134 | DEVICE_LOAD( pdp1_tape ); | |
| 135 | DEVICE_UNLOAD( pdp1_tape ); | |
| 134 | DEVICE_IMAGE_LOAD( pdp1_tape ); | |
| 135 | DEVICE_IMAGE_UNLOAD( pdp1_tape ); | |
| 136 | 136 | |
| 137 | 137 | void pdp1_tape_read_binary(void); |
| 138 | 138 | void iot_rpa(int op2, int nac, int mb, int *io, int ac); |
| r2174 | r2175 | |
| 141 | 141 | void iot_ppa(int op2, int nac, int mb, int *io, int ac); |
| 142 | 142 | void iot_ppb(int op2, int nac, int mb, int *io, int ac); |
| 143 | 143 | |
| 144 | DEVICE_LOAD(pdp1_typewriter); | |
| 145 | DEVICE_UNLOAD(pdp1_typewriter); | |
| 144 | DEVICE_IMAGE_LOAD(pdp1_typewriter); | |
| 145 | DEVICE_IMAGE_UNLOAD(pdp1_typewriter); | |
| 146 | 146 | void iot_tyo(int op2, int nac, int mb, int *io, int ac); |
| 147 | 147 | void iot_tyi(int op2, int nac, int mb, int *io, int ac); |
| 148 | 148 | |
| 149 | 149 | void iot_dpy(int op2, int nac, int mb, int *io, int ac); |
| 150 | 150 | |
| 151 | DEVICE_LOAD(pdp1_drum); | |
| 152 | DEVICE_UNLOAD(pdp1_drum); | |
| 151 | DEVICE_IMAGE_LOAD(pdp1_drum); | |
| 152 | DEVICE_IMAGE_UNLOAD(pdp1_drum); | |
| 153 | 153 | void iot_dia(int op2, int nac, int mb, int *io, int ac); |
| 154 | 154 | void iot_dba(int op2, int nac, int mb, int *io, int ac); |
| 155 | 155 | void iot_dcc(int op2, int nac, int mb, int *io, int ac); |
| r2174 | r2175 | |
|---|---|---|
| 42 | 42 | /*----------- defined in machine/nc.c -----------*/ |
| 43 | 43 | |
| 44 | 44 | DEVICE_START( nc_pcmcia_card ); |
| 45 | DEVICE_LOAD( nc_pcmcia_card ); | |
| 46 | DEVICE_UNLOAD( nc_pcmcia_card ); | |
| 45 | DEVICE_IMAGE_LOAD( nc_pcmcia_card ); | |
| 46 | DEVICE_IMAGE_UNLOAD( nc_pcmcia_card ); | |
| 47 | 47 | |
| 48 | DEVICE_LOAD( nc_serial ); | |
| 48 | DEVICE_IMAGE_LOAD( nc_serial ); | |
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | #endif /* NC_H_ */ |
| r2174 | r2175 | |
|---|---|---|
| 27 | 27 | void clear_keyboard_buffer(void); |
| 28 | 28 | void exploreKeyboard(void); |
| 29 | 29 | |
| 30 | DEVICE_LOAD( adam_floppy ); | |
| 31 | DEVICE_UNLOAD( adam_floppy ); | |
| 30 | DEVICE_IMAGE_LOAD( adam_floppy ); | |
| 31 | DEVICE_IMAGE_UNLOAD( adam_floppy ); | |
| 32 | 32 | |
| 33 | 33 | READ8_HANDLER ( adamnet_r ); |
| 34 | 34 | WRITE8_HANDLER ( adamnet_w ); |
| r2174 | r2175 | |
|---|---|---|
| 48 | 48 | /*----------- defined in machine/d88.c -----------*/ |
| 49 | 49 | |
| 50 | 50 | DEVICE_START(d88image_floppy); |
| 51 | DEVICE_LOAD(d88image_floppy); | |
| 51 | DEVICE_IMAGE_LOAD(d88image_floppy); | |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | #ifdef __cplusplus |
| r2174 | r2175 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | INTERRUPT_GEN( mbee_interrupt ); |
| 20 | 20 | |
| 21 | DEVICE_LOAD( mbee_cart ); | |
| 21 | DEVICE_IMAGE_LOAD( mbee_cart ); | |
| 22 | 22 | |
| 23 | 23 | READ8_HANDLER ( mbee_pio_r ); |
| 24 | 24 | WRITE8_HANDLER ( mbee_pio_w ); |
| r2174 | r2175 | |
|---|---|---|
| 17 | 17 | extern INTERRUPT_GEN( pokemini_int ); |
| 18 | 18 | |
| 19 | 19 | DEVICE_START( pokemini_cart ); |
| 20 | DEVICE_LOAD( pokemini_cart ); | |
| 20 | DEVICE_IMAGE_LOAD( pokemini_cart ); | |
| 21 | 21 | |
| 22 | 22 | |
| 23 | 23 | #endif /* POKEMINI_H */ |
| r2174 | r2175 | |
|---|---|---|
| 50 | 50 | MACHINE_START( coco3 ); |
| 51 | 51 | MACHINE_RESET( coco3 ); |
| 52 | 52 | |
| 53 | DEVICE_LOAD(coco_rom); | |
| 54 | DEVICE_LOAD(coco3_rom); | |
| 55 | DEVICE_UNLOAD(coco_rom); | |
| 56 | DEVICE_UNLOAD(coco3_rom); | |
| 53 | DEVICE_IMAGE_LOAD(coco_rom); | |
| 54 | DEVICE_IMAGE_LOAD(coco3_rom); | |
| 55 | DEVICE_IMAGE_UNLOAD(coco_rom); | |
| 56 | DEVICE_IMAGE_UNLOAD(coco3_rom); | |
| 57 | 57 | |
| 58 | 58 | INPUT_CHANGED(coco_keyboard_changed); |
| 59 | 59 | INPUT_CHANGED(coco_joystick_mode_changed); |
| r2174 | r2175 | |
|---|---|---|
| 84 | 84 | |
| 85 | 85 | /* protos */ |
| 86 | 86 | |
| 87 | DEVICE_LOAD(nes_cart); | |
| 87 | DEVICE_IMAGE_LOAD(nes_cart); | |
| 88 | 88 | DEVICE_START(nes_disk); |
| 89 | DEVICE_LOAD(nes_disk); | |
| 90 | DEVICE_UNLOAD(nes_disk); | |
| 89 | DEVICE_IMAGE_LOAD(nes_disk); | |
| 90 | DEVICE_IMAGE_UNLOAD(nes_disk); | |
| 91 | 91 | |
| 92 | 92 | MACHINE_START( nes ); |
| 93 | 93 | MACHINE_RESET( nes ); |
| r2174 | r2175 | |
|---|---|---|
| 52 | 52 | READ8_HANDLER( gb_ie_r ); |
| 53 | 53 | WRITE8_HANDLER( gb_ie_w ); |
| 54 | 54 | DEVICE_START(gb_cart); |
| 55 | DEVICE_LOAD(gb_cart); | |
| 55 | DEVICE_IMAGE_LOAD(gb_cart); | |
| 56 | 56 | INTERRUPT_GEN( gb_scanline_interrupt ); |
| 57 | 57 | void gb_timer_callback(int cycles); |
| 58 | 58 | WRITE8_HANDLER( gbc_io2_w ); |
| r2174 | r2175 | |
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 | /* -- Megaduck specific -- */ |
| 90 | extern DEVICE_LOAD(megaduck_cart); | |
| 90 | extern DEVICE_IMAGE_LOAD(megaduck_cart); | |
| 91 | 91 | extern MACHINE_RESET( megaduck ); |
| 92 | 92 | extern READ8_HANDLER( megaduck_video_r ); |
| 93 | 93 | extern WRITE8_HANDLER( megaduck_video_w ); |
| r2174 | r2175 | |
|---|---|---|
| 56 | 56 | extern INTERRUPT_GEN( msx2_interrupt ); |
| 57 | 57 | extern NVRAM_HANDLER( msx2 ); |
| 58 | 58 | |
| 59 | DEVICE_LOAD( msx_cart ); | |
| 60 | DEVICE_UNLOAD( msx_cart ); | |
| 59 | DEVICE_IMAGE_LOAD( msx_cart ); | |
| 60 | DEVICE_IMAGE_UNLOAD( msx_cart ); | |
| 61 | 61 | |
| 62 | 62 | void msx_vdp_interrupt (int); |
| 63 | 63 | |
| r2174 | r2175 | |
| 77 | 77 | WRITE8_HANDLER ( msx_90in1_w ); |
| 78 | 78 | |
| 79 | 79 | /* disk functions */ |
| 80 | DEVICE_LOAD( msx_floppy ); | |
| 80 | DEVICE_IMAGE_LOAD( msx_floppy ); | |
| 81 | 81 | |
| 82 | 82 | /* new memory emulation */ |
| 83 | 83 | WRITE8_HANDLER (msx_superloadrunner_w); |
| r2174 | r2175 | |
|---|---|---|
| 150 | 150 | |
| 151 | 151 | extern MACHINE_RESET( gamecom ); |
| 152 | 152 | extern DEVICE_START( gamecom_cart ); |
| 153 | extern DEVICE_LOAD( gamecom_cart ); | |
| 153 | extern DEVICE_IMAGE_LOAD( gamecom_cart ); | |
| 154 | 154 | |
| 155 | 155 | extern WRITE8_HANDLER( gamecom_internal_w ); |
| 156 | 156 | extern READ8_HANDLER( gamecom_internal_r ); |
| r2174 | r2175 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | /*----------- defined in machine/vectrex.c -----------*/ |
| 12 | 12 | |
| 13 | DEVICE_LOAD( vectrex_cart ); | |
| 13 | DEVICE_IMAGE_LOAD( vectrex_cart ); | |
| 14 | 14 | |
| 15 | 15 | extern int vectrex_imager_status; |
| 16 | 16 | extern UINT32 vectrex_beam_color; |
| r2174 | r2175 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | /*----------- defined in machine/vc1541.c -----------*/ |
| 27 | 27 | |
| 28 | DEVICE_LOAD(vc1541); | |
| 29 | DEVICE_UNLOAD(vc1541); | |
| 28 | DEVICE_IMAGE_LOAD(vc1541); | |
| 29 | DEVICE_IMAGE_UNLOAD(vc1541); | |
| 30 | 30 | |
| 31 | 31 | int vc1541_config(int id, int mode, VC1541_CONFIG*config); |
| 32 | 32 | void vc1541_reset(void); |
| r2174 | r2175 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | extern UINT8 *cgenie_fontram; |
| 22 | 22 | |
| 23 | DEVICE_LOAD( cgenie_cassette ); | |
| 24 | DEVICE_LOAD( cgenie_floppy ); | |
| 23 | DEVICE_IMAGE_LOAD( cgenie_cassette ); | |
| 24 | DEVICE_IMAGE_LOAD( cgenie_floppy ); | |
| 25 | 25 | |
| 26 | 26 | extern int cgenie_tv_mode; |
| 27 | 27 |
| r2174 | r2175 | |
|---|---|---|
| 61 | 61 | extern UINT8 timex_cart_chunks; |
| 62 | 62 | extern UINT8 * timex_cart_data; |
| 63 | 63 | |
| 64 | DEVICE_LOAD( timex_cart ); | |
| 65 | DEVICE_UNLOAD( timex_cart ); | |
| 64 | DEVICE_IMAGE_LOAD( timex_cart ); | |
| 65 | DEVICE_IMAGE_UNLOAD( timex_cart ); | |
| 66 | 66 | |
| 67 | 67 | extern MACHINE_RESET( spectrum ); |
| 68 | 68 |
| r2174 | r2175 | |
|---|---|---|
| 20 | 20 | void tx0_tape_get_open_mode(const struct IODevice *dev, int id, |
| 21 | 21 | unsigned int *readable, unsigned int *writeable, unsigned int *creatable); |
| 22 | 22 | DEVICE_START( tx0_tape ); |
| 23 | DEVICE_LOAD( tx0_tape ); | |
| 24 | DEVICE_UNLOAD( tx0_tape ); | |
| 23 | DEVICE_IMAGE_LOAD( tx0_tape ); | |
| 24 | DEVICE_IMAGE_UNLOAD( tx0_tape ); | |
| 25 | 25 | void tx0_io_r1l(void); |
| 26 | 26 | void tx0_io_r3l(void); |
| 27 | 27 | void tx0_io_p6h(void); |
| 28 | 28 | void tx0_io_p7h(void); |
| 29 | DEVICE_LOAD(tx0_typewriter); | |
| 30 | DEVICE_UNLOAD(tx0_typewriter); | |
| 29 | DEVICE_IMAGE_LOAD(tx0_typewriter); | |
| 30 | DEVICE_IMAGE_UNLOAD(tx0_typewriter); | |
| 31 | 31 | void tx0_io_prt(void); |
| 32 | 32 | void tx0_io_dis(void); |
| 33 | 33 | DEVICE_START( tx0_magtape ); |
| 34 | DEVICE_LOAD( tx0_magtape ); | |
| 35 | DEVICE_UNLOAD( tx0_magtape ); | |
| 34 | DEVICE_IMAGE_LOAD( tx0_magtape ); | |
| 35 | DEVICE_IMAGE_UNLOAD( tx0_magtape ); | |
| 36 | 36 | void tx0_sel(void); |
| 37 | 37 | void tx0_io_cpy(void); |
| 38 | 38 | void tx0_io_reset_callback(void); |
| r2174 | r2175 | |
|---|---|---|
| 165 | 165 | extern MACHINE_RESET( c16 ); |
| 166 | 166 | extern INTERRUPT_GEN( c16_frame_interrupt ); |
| 167 | 167 | |
| 168 | extern DEVICE_LOAD(c16_rom); | |
| 168 | extern DEVICE_IMAGE_LOAD(c16_rom); | |
| 169 | 169 | |
| 170 | 170 | |
| 171 | 171 | /*----------- defined in audio/t6721.c -----------*/ |
| r2174 | r2175 | |
|---|---|---|
| 21 | 21 | WRITE8_HANDLER(oric_psg_porta_write); |
| 22 | 22 | |
| 23 | 23 | DEVICE_START( oric_floppy ); |
| 24 | DEVICE_LOAD( oric_floppy ); | |
| 24 | DEVICE_IMAGE_LOAD( oric_floppy ); | |
| 25 | 25 | |
| 26 | 26 | /* Telestrat specific */ |
| 27 | 27 | MACHINE_START( telestrat ); |
| r2174 | r2175 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | /*----------- defined in machine/enterp.c -----------*/ |
| 12 | 12 | |
| 13 | DEVICE_LOAD( enterprise_floppy ); | |
| 13 | DEVICE_IMAGE_LOAD( enterprise_floppy ); | |
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | /*----------- defined in video/enterp.c -----------*/ |
| r2174 | r2175 | |
|---|---|---|
| 25 | 25 | READ8_HANDLER (atom_8271_r); |
| 26 | 26 | WRITE8_HANDLER (atom_8271_w); |
| 27 | 27 | |
| 28 | DEVICE_LOAD( atom_floppy ); | |
| 28 | DEVICE_IMAGE_LOAD( atom_floppy ); | |
| 29 | 29 | |
| 30 | 30 | READ8_HANDLER(atom_eprom_box_r); |
| 31 | 31 | WRITE8_HANDLER(atom_eprom_box_w); |
| r2174 | r2175 | |
|---|---|---|
| 11 | 11 | /*----------- defined in machine/mekd2.c -----------*/ |
| 12 | 12 | |
| 13 | 13 | DRIVER_INIT( mekd2 ); |
| 14 | DEVICE_LOAD( mekd2_cart ); | |
| 14 | DEVICE_IMAGE_LOAD( mekd2_cart ); | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | /*----------- defined in video/mekd2.c -----------*/ |
| r2174 | r2175 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | /*----------- defined in machine/apf.c -----------*/ |
| 22 | 22 | |
| 23 | DEVICE_LOAD( apfimag_floppy ); | |
| 23 | DEVICE_IMAGE_LOAD( apfimag_floppy ); | |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | #endif /* APF_H_ */ |
| r2174 | r2175 | |
|---|---|---|
| 88 | 88 | int vic6560_dma_read (int offset); |
| 89 | 89 | |
| 90 | 90 | DEVICE_START(vc20_rom); |
| 91 | DEVICE_LOAD(vc20_rom); | |
| 91 | DEVICE_IMAGE_LOAD(vc20_rom); | |
| 92 | 92 | |
| 93 | 93 | DRIVER_INIT( vc20 ); |
| 94 | 94 | DRIVER_INIT( vic20 ); |
| r2174 | r2175 | |
|---|---|---|
| 28 | 28 | unsigned long length, unsigned int functions); |
| 29 | 29 | |
| 30 | 30 | DEVICE_START( a7800_cart ); |
| 31 | DEVICE_LOAD( a7800_cart ); | |
| 31 | DEVICE_IMAGE_LOAD( a7800_cart ); | |
| 32 | 32 | |
| 33 | 33 | READ8_HANDLER ( a7800_TIA_r ); |
| 34 | 34 | WRITE8_HANDLER ( a7800_TIA_w ); |
| r2174 | r2175 | |
|---|---|---|
| 13 | 13 | /*----------- defined in machine/nascom1.c -----------*/ |
| 14 | 14 | |
| 15 | 15 | DRIVER_INIT( nascom1 ); |
| 16 | DEVICE_LOAD( nascom1_cassette ); | |
| 17 | DEVICE_UNLOAD( nascom1_cassette ); | |
| 16 | DEVICE_IMAGE_LOAD( nascom1_cassette ); | |
| 17 | DEVICE_IMAGE_UNLOAD( nascom1_cassette ); | |
| 18 | 18 | SNAPSHOT_LOAD( nascom1 ); |
| 19 | 19 | |
| 20 | 20 | READ8_HANDLER( nascom2_fdc_select_r ); |
| 21 | 21 | WRITE8_HANDLER( nascom2_fdc_select_w ); |
| 22 | 22 | READ8_HANDLER( nascom2_fdc_status_r ); |
| 23 | DEVICE_LOAD( nascom2_floppy ); | |
| 23 | DEVICE_IMAGE_LOAD( nascom2_floppy ); | |
| 24 | 24 | |
| 25 | 25 | READ8_HANDLER( nascom1_port_00_r); |
| 26 | 26 | READ8_HANDLER( nascom1_port_01_r); |
| r2174 | r2175 | |
|---|---|---|
| 19 | 19 | extern DRIVER_INIT( specimx ); |
| 20 | 20 | extern MACHINE_RESET( specimx ); |
| 21 | 21 | extern MACHINE_START ( specimx ); |
| 22 | extern DEVICE_LOAD( specimx_floppy ); | |
| 22 | extern DEVICE_IMAGE_LOAD( specimx_floppy ); | |
| 23 | 23 | |
| 24 | 24 | extern WRITE8_HANDLER( specimx_select_bank ); |
| 25 | 25 |
| r2174 | r2175 | |
|---|---|---|
| 29 | 29 | extern UINT16 intv_ram16[]; |
| 30 | 30 | |
| 31 | 31 | DEVICE_START( intv_cart ); |
| 32 | DEVICE_LOAD( intv_cart ); | |
| 32 | DEVICE_IMAGE_LOAD( intv_cart ); | |
| 33 | 33 | |
| 34 | 34 | extern MACHINE_RESET( intv ); |
| 35 | 35 | extern INTERRUPT_GEN( intv_interrupt ); |
| r2174 | r2175 | |
| 47 | 47 | /* for the console + keyboard component... */ |
| 48 | 48 | extern int intvkbd_text_blanked; |
| 49 | 49 | |
| 50 | DEVICE_LOAD( intvkbd_cart ); | |
| 50 | DEVICE_IMAGE_LOAD( intvkbd_cart ); | |
| 51 | 51 | |
| 52 | 52 | extern UINT16 *intvkbd_dualport_ram; |
| 53 | 53 | WRITE16_HANDLER ( intvkbd_dualport16_w ); |
| r2174 | r2175 | |
|---|---|---|
| 13 | 13 | OPBASE_HANDLER( jupiter_opbaseoverride ); |
| 14 | 14 | MACHINE_START( jupiter ); |
| 15 | 15 | |
| 16 | DEVICE_LOAD( jupiter_ace ); | |
| 17 | DEVICE_LOAD( jupiter_tap ); | |
| 18 | DEVICE_UNLOAD( jupiter_tap ); | |
| 16 | DEVICE_IMAGE_LOAD( jupiter_ace ); | |
| 17 | DEVICE_IMAGE_LOAD( jupiter_tap ); | |
| 18 | DEVICE_IMAGE_UNLOAD( jupiter_tap ); | |
| 19 | 19 | |
| 20 | 20 | READ8_HANDLER( jupiter_port_fefe_r); |
| 21 | 21 | READ8_HANDLER( jupiter_port_fdfe_r); |
| r2174 | r2175 | |
|---|---|---|
| 21 | 21 | |
| 22 | 22 | WRITE8_HANDLER( osborne1_bankswitch_w ); |
| 23 | 23 | |
| 24 | DEVICE_LOAD( osborne1_floppy ); | |
| 24 | DEVICE_IMAGE_LOAD( osborne1_floppy ); | |
| 25 | 25 | |
| 26 | 26 | DRIVER_INIT( osborne1 ); |
| 27 | 27 | MACHINE_RESET( osborne1 ); |
| r2174 | r2175 | |
|---|---|---|
| 25 | 25 | MACHINE_START( laser210 ); |
| 26 | 26 | MACHINE_START( laser310 ); |
| 27 | 27 | |
| 28 | DEVICE_LOAD( vtech1_floppy ); | |
| 28 | DEVICE_IMAGE_LOAD( vtech1_floppy ); | |
| 29 | 29 | SNAPSHOT_LOAD( vtech1 ); |
| 30 | 30 | |
| 31 | 31 | READ8_HANDLER ( vtech1_printer_r ); |
| r2174 | r2175 | |
|---|---|---|
| 42 | 42 | |
| 43 | 43 | void amstrad_handle_snapshot(running_machine *, unsigned char *); |
| 44 | 44 | |
| 45 | DEVICE_LOAD(amstrad_plus_cartridge); | |
| 45 | DEVICE_IMAGE_LOAD(amstrad_plus_cartridge); | |
| 46 | 46 | |
| 47 | 47 | /*----------- defined in video/amstrad.c -----------*/ |
| 48 | 48 |
| r2174 | r2175 | |
|---|---|---|
| 59 | 59 | void sms_check_pause_button( running_machine *machine ); |
| 60 | 60 | |
| 61 | 61 | DEVICE_START( sms_cart ); |
| 62 | DEVICE_LOAD( sms_cart ); | |
| 62 | DEVICE_IMAGE_LOAD( sms_cart ); | |
| 63 | 63 | |
| 64 | 64 | MACHINE_START(sms); |
| 65 | 65 | MACHINE_RESET(sms); |
| r2174 | r2175 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | void coupe_update_memory(void); |
| 49 | 49 | |
| 50 | DEVICE_LOAD( coupe_floppy ); | |
| 50 | DEVICE_IMAGE_LOAD( coupe_floppy ); | |
| 51 | 51 | MACHINE_START( coupe ); |
| 52 | 52 | |
| 53 | 53 |
| r2174 | r2175 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | extern UINT8 trs80_port_ff; |
| 20 | 20 | |
| 21 | DEVICE_LOAD( trs80_cas ); | |
| 22 | DEVICE_UNLOAD( trs80_cas ); | |
| 23 | DEVICE_LOAD( trs80_floppy ); | |
| 21 | DEVICE_IMAGE_LOAD( trs80_cas ); | |
| 22 | DEVICE_IMAGE_UNLOAD( trs80_cas ); | |
| 23 | DEVICE_IMAGE_LOAD( trs80_floppy ); | |
| 24 | 24 | QUICKLOAD_LOAD( trs80_cmd ); |
| 25 | 25 | |
| 26 | 26 | MACHINE_START( trs80 ); |
| r2174 | r2175 | |
|---|---|---|
| 28 | 28 | SNAPSHOT_LOAD( ti8x ); |
| 29 | 29 | |
| 30 | 30 | DEVICE_START( ti85_serial ); |
| 31 | DEVICE_LOAD( ti85_serial ); | |
| 32 | DEVICE_UNLOAD( ti85_serial ); | |
| 31 | DEVICE_IMAGE_LOAD( ti85_serial ); | |
| 32 | DEVICE_IMAGE_UNLOAD( ti85_serial ); | |
| 33 | 33 | |
| 34 | 34 | WRITE8_HANDLER( ti81_port_0007_w); |
| 35 | 35 | READ8_HANDLER( ti85_port_0000_r); |
| r2174 | r2175 | |
|---|---|---|
| 17 | 17 | MACHINE_RESET( svi318 ); |
| 18 | 18 | |
| 19 | 19 | DEVICE_START( svi318_cart ); |
| 20 | DEVICE_LOAD( svi318_cart ); | |
| 21 | DEVICE_UNLOAD( svi318_cart ); | |
| 20 | DEVICE_IMAGE_LOAD( svi318_cart ); | |
| 21 | DEVICE_IMAGE_UNLOAD( svi318_cart ); | |
| 22 | 22 | |
| 23 | 23 | INTERRUPT_GEN( svi318_interrupt ); |
| 24 | 24 | void svi318_vdp_interrupt(int i); |
| r2174 | r2175 | |
| 39 | 39 | |
| 40 | 40 | int svi318_cassette_present(int id); |
| 41 | 41 | |
| 42 | DEVICE_LOAD( svi318_floppy ); | |
| 42 | DEVICE_IMAGE_LOAD( svi318_floppy ); | |
| 43 | 43 | |
| 44 | 44 | MC6845_UPDATE_ROW( svi806_crtc6845_update_row ); |
| 45 | 45 | VIDEO_START( svi328_806 ); |
| r2174 | r2175 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | extern unsigned char *pce_user_ram; /* scratch RAM at F8 */ |
| 34 | 34 | extern UINT8 *pce_cd_ram; |
| 35 | DEVICE_LOAD(pce_cart); | |
| 35 | DEVICE_IMAGE_LOAD(pce_cart); | |
| 36 | 36 | NVRAM_HANDLER( pce ); |
| 37 | 37 | WRITE8_HANDLER ( pce_joystick_w ); |
| 38 | 38 | READ8_HANDLER ( pce_joystick_r ); |
| r2174 | r2175 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | /* disc support */ |
| 65 | 65 | |
| 66 | DEVICE_LOAD ( bbcb_cart ); | |
| 67 | DEVICE_LOAD( bbc_floppy ); | |
| 66 | DEVICE_IMAGE_LOAD ( bbcb_cart ); | |
| 67 | DEVICE_IMAGE_LOAD( bbc_floppy ); | |
| 68 | 68 | |
| 69 | 69 | READ8_HANDLER ( bbc_disc_r ); |
| 70 | 70 | WRITE8_HANDLER ( bbc_disc_w ); |
| r2174 | r2175 | |
|---|---|---|
| 213 | 213 | Macros for declaring device callbacks |
| 214 | 214 | ****************************************************************************/ |
| 215 | 215 | |
| 216 | #define DEVICE_LOAD(name) int device_load_##name(const device_config *image) | |
| 217 | #define DEVICE_CREATE(name) int device_create_##name(const device_config *image, int create_format, option_resolution *create_args) | |
| 218 | #define DEVICE_UNLOAD(name) void device_unload_##name(const device_config *image) | |
| 216 | #define DEVICE_IMAGE_LOAD_NAME(name) device_load_##name | |
| 217 | #define DEVICE_IMAGE_LOAD(name) int DEVICE_IMAGE_LOAD_NAME(name)(const device_config *image) | |
| 219 | 218 | |
| 219 | #define DEVICE_IMAGE_CREATE_NAME(name) device_create_##name | |
| 220 | #define DEVICE_IMAGE_CREATE(name) int DEVICE_IMAGE_CREATE_NAME(name)(const device_config *image, int create_format, option_resolution *create_args) | |
| 221 | ||
| 222 | #define DEVICE_IMAGE_UNLOAD_NAME(name) device_unload_##name | |
| 223 | #define DEVICE_IMAGE_UNLOAD(name) void DEVICE_IMAGE_UNLOAD_NAME(name)(const device_config *image) | |
| 224 | ||
| 220 | 225 | #endif /* IMAGE_H */ |
| r2174 | r2175 | |
|---|---|---|
| 1282 | 1282 | rtc.setting = 0xFF; |
| 1283 | 1283 | } |
| 1284 | 1284 | |
| 1285 | DEVICE_LOAD(wswan_cart) | |
| 1285 | DEVICE_IMAGE_LOAD(wswan_cart) | |
| 1286 | 1286 | { |
| 1287 | 1287 | UINT32 ii; |
| 1288 | 1288 | const char *sram_str; |
| r2174 | r2175 | |
|---|---|---|
| 162 | 162 | INT8 cbm_c64_exrom; |
| 163 | 163 | CBM_ROM cbm_rom[0x20]= { {0} }; |
| 164 | 164 | |
| 165 | static DEVICE_UNLOAD(cbm_rom) | |
| 165 | static DEVICE_IMAGE_UNLOAD(cbm_rom) | |
| 166 | 166 | { |
| 167 | 167 | int id = image_index_in_device(image); |
| 168 | 168 | cbm_rom[id].size = 0; |
| r2174 | r2175 | |
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | static DEVICE_LOAD(cbm_rom) | |
| 187 | static DEVICE_IMAGE_LOAD(cbm_rom) | |
| 188 | 188 | { |
| 189 | 189 | int i; |
| 190 | 190 | int size, j, read_; |
| r2174 | r2175 | |
|---|---|---|
| 383 | 383 | |
| 384 | 384 | unit 0 is reader (read-only), unit 1 is puncher (write-only) |
| 385 | 385 | */ |
| 386 | DEVICE_LOAD( pdp1_tape ) | |
| 386 | DEVICE_IMAGE_LOAD( pdp1_tape ) | |
| 387 | 387 | { |
| 388 | 388 | int id = image_index_in_device(image); |
| 389 | 389 | |
| r2174 | r2175 | |
| 423 | 423 | return INIT_PASS; |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | DEVICE_UNLOAD( pdp1_tape ) | |
| 426 | DEVICE_IMAGE_UNLOAD( pdp1_tape ) | |
| 427 | 427 | { |
| 428 | 428 | int id = image_index_in_device(image); |
| 429 | 429 | |
| r2174 | r2175 | |
| 719 | 719 | /* |
| 720 | 720 | Open a file for typewriter output |
| 721 | 721 | */ |
| 722 | DEVICE_LOAD(pdp1_typewriter) | |
| 722 | DEVICE_IMAGE_LOAD(pdp1_typewriter) | |
| 723 | 723 | { |
| 724 | 724 | /* open file */ |
| 725 | 725 | typewriter.fd = image; |
| r2174 | r2175 | |
| 729 | 729 | return INIT_PASS; |
| 730 | 730 | } |
| 731 | 731 | |
| 732 | DEVICE_UNLOAD(pdp1_typewriter) | |
| 732 | DEVICE_IMAGE_UNLOAD(pdp1_typewriter) | |
| 733 | 733 | { |
| 734 | 734 | typewriter.fd = NULL; |
| 735 | 735 | } |
| r2174 | r2175 | |
| 1051 | 1051 | /* |
| 1052 | 1052 | Open a file for drum |
| 1053 | 1053 | */ |
| 1054 | DEVICE_LOAD(pdp1_drum) | |
| 1054 | DEVICE_IMAGE_LOAD(pdp1_drum) | |
| 1055 | 1055 | { |
| 1056 | 1056 | /* open file */ |
| 1057 | 1057 | parallel_drum.fd = image; |
| r2174 | r2175 | |
| 1059 | 1059 | return INIT_PASS; |
| 1060 | 1060 | } |
| 1061 | 1061 | |
| 1062 | DEVICE_UNLOAD(pdp1_drum) | |
| 1062 | DEVICE_IMAGE_UNLOAD(pdp1_drum) | |
| 1063 | 1063 | { |
| 1064 | 1064 | parallel_drum.fd = NULL; |
| 1065 | 1065 | } |
| r2174 | r2175 | |
|---|---|---|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /* load pcmcia card */ |
| 107 | DEVICE_LOAD( nc_pcmcia_card ) | |
| 107 | DEVICE_IMAGE_LOAD( nc_pcmcia_card ) | |
| 108 | 108 | { |
| 109 | 109 | /* filename specified */ |
| 110 | 110 | |
| r2174 | r2175 | |
| 126 | 126 | return INIT_FAIL; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | DEVICE_UNLOAD( nc_pcmcia_card ) | |
| 129 | DEVICE_IMAGE_UNLOAD( nc_pcmcia_card ) | |
| 130 | 130 | { |
| 131 | 131 | /* save card data if there is any */ |
| 132 | 132 | nc_card_save(image); |
| r2174 | r2175 | |
| 147 | 147 | /*************************************************************************************************/ |
| 148 | 148 | /* Serial */ |
| 149 | 149 | |
| 150 | DEVICE_LOAD( nc_serial ) | |
| 150 | DEVICE_IMAGE_LOAD( nc_serial ) | |
| 151 | 151 | { |
| 152 | 152 | /* filename specified */ |
| 153 | 153 | if (serial_device_load(image)==INIT_PASS) |
| r2174 | r2175 | |
|---|---|---|
| 40 | 40 | return retval; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | DEVICE_LOAD( adam_floppy ) | |
| 43 | DEVICE_IMAGE_LOAD( adam_floppy ) | |
| 44 | 44 | { |
| 45 | 45 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 46 | 46 | { |
| r2174 | r2175 | |
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | |
| 59 | DEVICE_UNLOAD( adam_floppy ) | |
| 59 | DEVICE_IMAGE_UNLOAD( adam_floppy ) | |
| 60 | 60 | { |
| 61 | 61 | device_unload_basicdsk_floppy(image); |
| 62 | 62 | } |
| r2174 | r2175 | |
|---|---|---|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /* attempt to insert a disk into the drive specified with id */ |
| 41 | DEVICE_LOAD(d88image_floppy) | |
| 41 | DEVICE_IMAGE_LOAD(d88image_floppy) | |
| 42 | 42 | { |
| 43 | 43 | UINT8 tmp8; |
| 44 | 44 | UINT16 tmp16; |
| r2174 | r2175 | |
|---|---|---|
| 176 | 176 | z80pio_p_w(0, 1, 0x00); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | DEVICE_LOAD( mbee_cart ) | |
| 179 | DEVICE_IMAGE_LOAD( mbee_cart ) | |
| 180 | 180 | { |
| 181 | 181 | int size = image_length(image); |
| 182 | 182 | UINT8 *mem = malloc(size); |
| r2174 | r2175 | |
|---|---|---|
| 652 | 652 | DEVICE_START( pokemini_cart ) { |
| 653 | 653 | } |
| 654 | 654 | |
| 655 | DEVICE_LOAD( pokemini_cart ) { | |
| 655 | DEVICE_IMAGE_LOAD( pokemini_cart ) { | |
| 656 | 656 | int size = image_length( image ); |
| 657 | 657 | |
| 658 | 658 | /* Verify that the image is big enough */ |
| r2174 | r2175 | |
|---|---|---|
| 685 | 685 | return INIT_PASS; |
| 686 | 686 | } |
| 687 | 687 | |
| 688 | DEVICE_LOAD(coco_rom) | |
| 688 | DEVICE_IMAGE_LOAD(coco_rom) | |
| 689 | 689 | { |
| 690 | 690 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 691 | 691 | return generic_rom_load(image, &ROM[0x4000], 0x4000); |
| 692 | 692 | } |
| 693 | 693 | |
| 694 | DEVICE_UNLOAD(coco_rom) | |
| 694 | DEVICE_IMAGE_UNLOAD(coco_rom) | |
| 695 | 695 | { |
| 696 | 696 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 697 | 697 | memset(&ROM[0x4000], 0, 0x4000); |
| 698 | 698 | } |
| 699 | 699 | |
| 700 | DEVICE_LOAD(coco3_rom) | |
| 700 | DEVICE_IMAGE_LOAD(coco3_rom) | |
| 701 | 701 | { |
| 702 | 702 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 703 | 703 | return generic_rom_load(image, &ROM[0x8000], 0x8000); |
| 704 | 704 | } |
| 705 | 705 | |
| 706 | DEVICE_UNLOAD(coco3_rom) | |
| 706 | DEVICE_IMAGE_UNLOAD(coco3_rom) | |
| 707 | 707 | { |
| 708 | 708 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 709 | 709 | memset(&ROM[0x8000], 0, 0x8000); |
| r2174 | r2175 | |
|---|---|---|
| 130 | 130 | /* |
| 131 | 131 | Open a tape image |
| 132 | 132 | */ |
| 133 | DEVICE_LOAD( ti990_tape ) | |
| 133 | DEVICE_IMAGE_LOAD( ti990_tape ) | |
| 134 | 134 | { |
| 135 | 135 | tape_unit_t *t; |
| 136 | 136 | int id = image_index_in_device(image); |
| r2174 | r2175 | |
| 153 | 153 | /* |
| 154 | 154 | Close a tape image |
| 155 | 155 | */ |
| 156 | DEVICE_UNLOAD( ti990_tape ) | |
| 156 | DEVICE_IMAGE_UNLOAD( ti990_tape ) | |
| 157 | 157 | { |
| 158 | 158 | tape_unit_t *t; |
| 159 | 159 | int id = image_index_in_device(image); |
| r2174 | r2175 | |
|---|---|---|
| 377 | 377 | |
| 378 | 378 | |
| 379 | 379 | |
| 380 | DEVICE_LOAD(nes_cart) | |
| 380 | DEVICE_IMAGE_LOAD(nes_cart) | |
| 381 | 381 | { |
| 382 | 382 | const char *mapinfo; |
| 383 | 383 | int mapint1=0,mapint2=0,mapint3=0,mapint4=0,goodcrcinfo = 0; |
| r2174 | r2175 | |
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | |
| 570 | DEVICE_LOAD(nes_disk) | |
| 570 | DEVICE_IMAGE_LOAD(nes_disk) | |
| 571 | 571 | { |
| 572 | 572 | unsigned char magic[4]; |
| 573 | 573 | |
| r2174 | r2175 | |
| 599 | 599 | return INIT_PASS; |
| 600 | 600 | } |
| 601 | 601 | |
| 602 | DEVICE_UNLOAD(nes_disk) | |
| 602 | DEVICE_IMAGE_UNLOAD(nes_disk) | |
| 603 | 603 | { |
| 604 | 604 | /* TODO: should write out changes here as well */ |
| 605 | 605 | nes_fds.data = NULL; |
| r2174 | r2175 | |
|---|---|---|
| 1407 | 1407 | RAMMask = 0; |
| 1408 | 1408 | } |
| 1409 | 1409 | |
| 1410 | DEVICE_LOAD(gb_cart) | |
| 1410 | DEVICE_IMAGE_LOAD(gb_cart) | |
| 1411 | 1411 | { |
| 1412 | 1412 | static const char *const CartTypes[] = |
| 1413 | 1413 | { |
| r2174 | r2175 | |
| 2034 | 2034 | } |
| 2035 | 2035 | } |
| 2036 | 2036 | |
| 2037 | DEVICE_LOAD(megaduck_cart) | |
| 2037 | DEVICE_IMAGE_LOAD(megaduck_cart) | |
| 2038 | 2038 | { |
| 2039 | 2039 | int I, filesize; |
| 2040 | 2040 |
| r2174 | r2175 | |
|---|---|---|
| 3 | 3 | */ |
| 4 | 4 | |
| 5 | 5 | DEVICE_START( ti990_tape ); |
| 6 | DEVICE_LOAD( ti990_tape ); | |
| 7 | DEVICE_UNLOAD( ti990_tape ); | |
| 6 | DEVICE_IMAGE_LOAD( ti990_tape ); | |
| 7 | DEVICE_IMAGE_UNLOAD( ti990_tape ); | |
| 8 | 8 | |
| 9 | 9 | void ti990_tpc_init(void (*interrupt_callback)(int state)); |
| 10 | 10 | void ti990_tpc_exit(void); |
| r2174 | r2175 | |
|---|---|---|
| 192 | 192 | /* |
| 193 | 193 | Initialize hard disk unit and open a hard disk image |
| 194 | 194 | */ |
| 195 | DEVICE_LOAD( ti990_hd ) | |
| 195 | DEVICE_IMAGE_LOAD( ti990_hd ) | |
| 196 | 196 | { |
| 197 | 197 | int id = image_index_in_device(image); |
| 198 | 198 | hd_unit_t *d; |
| r2174 | r2175 | |
| 283 | 283 | /* |
| 284 | 284 | close a hard disk image |
| 285 | 285 | */ |
| 286 | DEVICE_UNLOAD( ti990_hd ) | |
| 286 | DEVICE_IMAGE_UNLOAD( ti990_hd ) | |
| 287 | 287 | { |
| 288 | 288 | int id = image_index_in_device(image); |
| 289 | 289 | hd_unit_t *d; |
| r2174 | r2175 | |
|---|---|---|
| 633 | 633 | set_chip_clock(1, 255); |
| 634 | 634 | } |
| 635 | 635 | |
| 636 | static DEVICE_LOAD( kim1_cassette ) | |
| 636 | static DEVICE_IMAGE_LOAD( kim1_cassette ) | |
| 637 | 637 | { |
| 638 | 638 | const char magic[] = "KIM1"; |
| 639 | 639 | char buff[4]; |
| r2174 | r2175 | |
|---|---|---|
| 3 | 3 | */ |
| 4 | 4 | |
| 5 | 5 | DEVICE_START( ti990_hd ); |
| 6 | DEVICE_LOAD( ti990_hd ); | |
| 7 | DEVICE_UNLOAD( ti990_hd ); | |
| 6 | DEVICE_IMAGE_LOAD( ti990_hd ); | |
| 7 | DEVICE_IMAGE_UNLOAD( ti990_hd ); | |
| 8 | 8 | |
| 9 | 9 | void ti990_hdc_init(void (*interrupt_callback)(int state)); |
| 10 | 10 |
| r2174 | r2175 | |
|---|---|---|
| 83 | 83 | return (asc8 > asc16) ? 4 : 5; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | DEVICE_LOAD (msx_cart) | |
| 86 | DEVICE_IMAGE_LOAD (msx_cart) | |
| 87 | 87 | { |
| 88 | 88 | int size; |
| 89 | 89 | int size_aligned; |
| r2174 | r2175 | |
| 266 | 266 | return INIT_PASS; |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | DEVICE_UNLOAD (msx_cart) | |
| 269 | DEVICE_IMAGE_UNLOAD (msx_cart) | |
| 270 | 270 | { |
| 271 | 271 | int id; |
| 272 | 272 | |
| r2174 | r2175 | |
| 656 | 656 | } |
| 657 | 657 | |
| 658 | 658 | |
| 659 | DEVICE_LOAD( msx_floppy ) | |
| 659 | DEVICE_IMAGE_LOAD( msx_floppy ) | |
| 660 | 660 | { |
| 661 | 661 | int size, heads = 2; |
| 662 | 662 |
| r2174 | r2175 | |
|---|---|---|
| 594 | 594 | internal_ram = sm8500_internal_ram(); |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | DEVICE_LOAD( gamecom_cart ) | |
| 597 | DEVICE_IMAGE_LOAD( gamecom_cart ) | |
| 598 | 598 | { |
| 599 | 599 | int filesize; |
| 600 | 600 | int load_offset = 0; |
| r2174 | r2175 | |
|---|---|---|
| 125 | 125 | /* |
| 126 | 126 | Load a SmartMedia image |
| 127 | 127 | */ |
| 128 | DEVICE_LOAD( smartmedia ) | |
| 128 | DEVICE_IMAGE_LOAD( smartmedia ) | |
| 129 | 129 | { |
| 130 | 130 | int id = image_index_in_device(image); |
| 131 | 131 | disk_image_header custom_header; |
| r2174 | r2175 | |
| 179 | 179 | /* |
| 180 | 180 | Unload a SmartMedia image |
| 181 | 181 | */ |
| 182 | DEVICE_UNLOAD( smartmedia ) | |
| 182 | DEVICE_IMAGE_UNLOAD( smartmedia ) | |
| 183 | 183 | { |
| 184 | 184 | int id = image_index_in_device(image); |
| 185 | 185 |
| r2174 | r2175 | |
|---|---|---|
| 120 | 120 | |
| 121 | 121 | |
| 122 | 122 | /* open an d64 image */ |
| 123 | static DEVICE_LOAD( cbm_drive ) | |
| 123 | static DEVICE_IMAGE_LOAD( cbm_drive ) | |
| 124 | 124 | { |
| 125 | 125 | int id = image_index_in_device(image); |
| 126 | 126 |
| r2174 | r2175 | |
|---|---|---|
| 66 | 66 | /********************************************************************* |
| 67 | 67 | ROM load and id functions |
| 68 | 68 | *********************************************************************/ |
| 69 | DEVICE_LOAD( vectrex_cart ) | |
| 69 | DEVICE_IMAGE_LOAD( vectrex_cart ) | |
| 70 | 70 | { |
| 71 | 71 | image_fread(image, memory_region(REGION_CPU1), 0x8000); |
| 72 | 72 |
| r2174 | r2175 | |
|---|---|---|
| 3 | 3 | */ |
| 4 | 4 | |
| 5 | 5 | DEVICE_START( smartmedia ); |
| 6 | DEVICE_LOAD( smartmedia ); | |
| 7 | DEVICE_UNLOAD( smartmedia ); | |
| 6 | DEVICE_IMAGE_LOAD( smartmedia ); | |
| 7 | DEVICE_IMAGE_UNLOAD( smartmedia ); | |
| 8 | 8 | |
| 9 | 9 | int smartmedia_machine_init(int id); |
| 10 | 10 |
| r2174 | r2175 | |
|---|---|---|
| 615 | 615 | vc1541_via1_irq |
| 616 | 616 | }; |
| 617 | 617 | |
| 618 | DEVICE_LOAD(vc1541) | |
| 618 | DEVICE_IMAGE_LOAD(vc1541) | |
| 619 | 619 | { |
| 620 | 620 | vc1541->d64.data = image_ptr(image); |
| 621 | 621 | if (!vc1541->d64.data) |
| r2174 | r2175 | |
| 627 | 627 | return INIT_PASS; |
| 628 | 628 | } |
| 629 | 629 | |
| 630 | DEVICE_UNLOAD(vc1541) | |
| 630 | DEVICE_IMAGE_UNLOAD(vc1541) | |
| 631 | 631 | { |
| 632 | 632 | /* writeback of image data */ |
| 633 | 633 | vc1541->d64.data = NULL; |
| r2174 | r2175 | |
|---|---|---|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | |
| 339 | DEVICE_LOAD( cgenie_cassette ) | |
| 339 | DEVICE_IMAGE_LOAD( cgenie_cassette ) | |
| 340 | 340 | { |
| 341 | 341 | return INIT_PASS; |
| 342 | 342 | } |
| r2174 | r2175 | |
| 346 | 346 | * of tracks, number of sides, number of sectors etc, so we need to |
| 347 | 347 | * set that up here |
| 348 | 348 | */ |
| 349 | DEVICE_LOAD( cgenie_floppy ) | |
| 349 | DEVICE_IMAGE_LOAD( cgenie_floppy ) | |
| 350 | 350 | { |
| 351 | 351 | int i, j, dir_offset; |
| 352 | 352 | UINT8 buff[16]; |
| r2174 | r2175 | |
|---|---|---|
| 1078 | 1078 | return INIT_PASS; |
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | DEVICE_LOAD( timex_cart ) | |
| 1081 | DEVICE_IMAGE_LOAD( timex_cart ) | |
| 1082 | 1082 | { |
| 1083 | 1083 | int file_size; |
| 1084 | 1084 | UINT8 * file_data; |
| r2174 | r2175 | |
| 1159 | 1159 | return INIT_PASS; |
| 1160 | 1160 | } |
| 1161 | 1161 | |
| 1162 | DEVICE_UNLOAD( timex_cart ) | |
| 1162 | DEVICE_IMAGE_UNLOAD( timex_cart ) | |
| 1163 | 1163 | { |
| 1164 | 1164 | if (timex_cart_data) |
| 1165 | 1165 | { |
| r2174 | r2175 | |
|---|---|---|
| 209 | 209 | |
| 210 | 210 | unit 0 is reader (read-only), unit 1 is puncher (write-only) |
| 211 | 211 | */ |
| 212 | DEVICE_LOAD( tx0_tape ) | |
| 212 | DEVICE_IMAGE_LOAD( tx0_tape ) | |
| 213 | 213 | { |
| 214 | 214 | int id = image_index_in_device(image); |
| 215 | 215 | |
| r2174 | r2175 | |
| 249 | 249 | return INIT_PASS; |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | DEVICE_UNLOAD( tx0_tape ) | |
| 252 | DEVICE_IMAGE_UNLOAD( tx0_tape ) | |
| 253 | 253 | { |
| 254 | 254 | int id = image_index_in_device(image); |
| 255 | 255 | |
| r2174 | r2175 | |
| 426 | 426 | /* |
| 427 | 427 | Open a file for typewriter output |
| 428 | 428 | */ |
| 429 | DEVICE_LOAD(tx0_typewriter) | |
| 429 | DEVICE_IMAGE_LOAD(tx0_typewriter) | |
| 430 | 430 | { |
| 431 | 431 | /* open file */ |
| 432 | 432 | typewriter.fd = image; |
| r2174 | r2175 | |
| 434 | 434 | return INIT_PASS; |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | DEVICE_UNLOAD(tx0_typewriter) | |
| 437 | DEVICE_IMAGE_UNLOAD(tx0_typewriter) | |
| 438 | 438 | { |
| 439 | 439 | typewriter.fd = NULL; |
| 440 | 440 | } |
| r2174 | r2175 | |
| 563 | 563 | /* |
| 564 | 564 | Open a magnetic tape image |
| 565 | 565 | */ |
| 566 | DEVICE_LOAD( tx0_magtape ) | |
| 566 | DEVICE_IMAGE_LOAD( tx0_magtape ) | |
| 567 | 567 | { |
| 568 | 568 | magtape.img = image; |
| 569 | 569 | |
| r2174 | r2175 | |
| 582 | 582 | return INIT_PASS; |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | DEVICE_UNLOAD( tx0_magtape ) | |
| 585 | DEVICE_IMAGE_UNLOAD( tx0_magtape ) | |
| 586 | 586 | { |
| 587 | 587 | magtape.img = NULL; |
| 588 | 588 |
| r2174 | r2175 | |
|---|---|---|
| 595 | 595 | return retval; |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | DEVICE_LOAD(c16_rom) | |
| 598 | DEVICE_IMAGE_LOAD(c16_rom) | |
| 599 | 599 | { |
| 600 | 600 | return (!c16_rom_id(image)) ? INIT_FAIL : INIT_PASS; |
| 601 | 601 | } |
| r2174 | r2175 | |
|---|---|---|
| 1083 | 1083 | |
| 1084 | 1084 | |
| 1085 | 1085 | |
| 1086 | DEVICE_LOAD( oric_floppy ) | |
| 1086 | DEVICE_IMAGE_LOAD( oric_floppy ) | |
| 1087 | 1087 | { |
| 1088 | 1088 | /* attempt to open mfm disk */ |
| 1089 | 1089 | if (device_load_mfm_disk(image) == INIT_PASS) |
| r2174 | r2175 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | void Enterprise_SetupPalette(void); |
| 20 | 20 | |
| 21 | DEVICE_LOAD( enterprise_floppy ) | |
| 21 | DEVICE_IMAGE_LOAD( enterprise_floppy ) | |
| 22 | 22 | { |
| 23 | 23 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 24 | 24 | { |
| r2174 | r2175 | |
|---|---|---|
| 334 | 334 | |
| 335 | 335 | |
| 336 | 336 | /* load floppy */ |
| 337 | DEVICE_LOAD( atom_floppy ) | |
| 337 | DEVICE_IMAGE_LOAD( atom_floppy ) | |
| 338 | 338 | { |
| 339 | 339 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 340 | 340 | { |
| r2174 | r2175 | |
|---|---|---|
| 559 | 559 | } |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | DEVICE_LOAD( mekd2_cart ) | |
| 562 | DEVICE_IMAGE_LOAD( mekd2_cart ) | |
| 563 | 563 | { |
| 564 | 564 | const char magic[] = "MEK6800D2"; |
| 565 | 565 | char buff[9]; |
| r2174 | r2175 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | /* 256 bytes per sector, single sided, single density, 40 track */ |
| 17 | DEVICE_LOAD( apfimag_floppy ) | |
| 17 | DEVICE_IMAGE_LOAD( apfimag_floppy ) | |
| 18 | 18 | { |
| 19 | 19 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 20 | 20 | { |
| r2174 | r2175 | |
|---|---|---|
| 625 | 625 | vc20_rom_a000 = NULL; |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | DEVICE_LOAD(vc20_rom) | |
| 628 | DEVICE_IMAGE_LOAD(vc20_rom) | |
| 629 | 629 | { |
| 630 | 630 | int size, read_; |
| 631 | 631 | const char *cp; |
| r2174 | r2175 | |
|---|---|---|
| 1 | 1 | /*DEVICE_START( ti99_sm ); |
| 2 | DEVICE_LOAD( ti99_sm ); | |
| 3 | DEVICE_UNLOAD( ti99_sm );*/ | |
| 2 | DEVICE_IMAGE_LOAD( ti99_sm ); | |
| 3 | DEVICE_IMAGE_UNLOAD( ti99_sm );*/ | |
| 4 | 4 | |
| 5 | 5 | void ti99_usbsm_init(void); |
| 6 | 6 | int ti99_usbsm_reset(running_machine *machine, int in_tms9995_mode); |
| r2174 | r2175 | |
|---|---|---|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | static DEVICE_LOAD(amiga_fdc) | |
| 143 | static DEVICE_IMAGE_LOAD(amiga_fdc) | |
| 144 | 144 | { |
| 145 | 145 | int id = image_index_in_device(image); |
| 146 | 146 | |
| r2174 | r2175 | |
| 159 | 159 | return INIT_PASS; |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | static DEVICE_UNLOAD(amiga_fdc) | |
| 162 | static DEVICE_IMAGE_UNLOAD(amiga_fdc) | |
| 163 | 163 | { |
| 164 | 164 | int id = image_index_in_device(image); |
| 165 | 165 |
| r2174 | r2175 | |
|---|---|---|
| 47 | 47 | abcbus_strobe = ASSERT_LINE; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | DEVICE_LOAD( abc_floppy ) | |
| 50 | DEVICE_IMAGE_LOAD( abc_floppy ) | |
| 51 | 51 | { |
| 52 | 52 | int size, tracks, heads, sectors; |
| 53 | 53 |
| r2174 | r2175 | |
|---|---|---|
| 228 | 228 | a7800_stick_type = 1; |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | DEVICE_LOAD( a7800_cart ) | |
| 231 | DEVICE_IMAGE_LOAD( a7800_cart ) | |
| 232 | 232 | { |
| 233 | 233 | long len,start; |
| 234 | 234 | unsigned char header[128]; |
| r2174 | r2175 | |
|---|---|---|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | |
| 103 | DEVICE_LOAD( nascom2_floppy ) | |
| 103 | DEVICE_IMAGE_LOAD( nascom2_floppy ) | |
| 104 | 104 | { |
| 105 | 105 | int sides, sectors; |
| 106 | 106 | |
| r2174 | r2175 | |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | |
| 212 | DEVICE_LOAD( nascom1_cassette ) | |
| 212 | DEVICE_IMAGE_LOAD( nascom1_cassette ) | |
| 213 | 213 | { |
| 214 | 214 | nascom1_tape_size = image_length(image); |
| 215 | 215 | nascom1_tape_image = image_ptr(image); |
| r2174 | r2175 | |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | |
| 224 | DEVICE_UNLOAD( nascom1_cassette ) | |
| 224 | DEVICE_IMAGE_UNLOAD( nascom1_cassette ) | |
| 225 | 225 | { |
| 226 | 226 | nascom1_tape_image = NULL; |
| 227 | 227 | nascom1_tape_size = nascom1_tape_index = 0; |
| r2174 | r2175 | |
|---|---|---|
| 72 | 72 | READ8_HANDLER( abcbus_reset_r ); |
| 73 | 73 | READ8_HANDLER( abcbus_strobe_r ); |
| 74 | 74 | WRITE8_HANDLER( abcbus_strobe_w ); |
| 75 | DEVICE_LOAD( abc_floppy ); | |
| 75 | DEVICE_IMAGE_LOAD( abc_floppy ); |
| r2174 | r2175 | |
|---|---|---|
| 390 | 390 | memory[(0x7000<<1)+1] = 0xff; |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | DEVICE_LOAD( intv_cart ) | |
| 393 | DEVICE_IMAGE_LOAD( intv_cart ) | |
| 394 | 394 | { |
| 395 | 395 | /* First, initialize these as empty so that the intellivision |
| 396 | 396 | * will think that the playcable and keyboard are not attached */ |
| r2174 | r2175 | |
| 485 | 485 | |
| 486 | 486 | /* Intellivision console + keyboard component */ |
| 487 | 487 | |
| 488 | DEVICE_LOAD( intvkbd_cart ) | |
| 488 | DEVICE_IMAGE_LOAD( intvkbd_cart ) | |
| 489 | 489 | { |
| 490 | 490 | int id = image_index_in_device(image); |
| 491 | 491 | if (id == 0) /* Legacy cartridge slot */ |
| r2174 | r2175 | |
|---|---|---|
| 275 | 275 | return o; |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | DEVICE_LOAD( specimx_floppy ) | |
| 278 | DEVICE_IMAGE_LOAD( specimx_floppy ) | |
| 279 | 279 | { |
| 280 | 280 | int size; |
| 281 | 281 |
| r2174 | r2175 | |
|---|---|---|
| 145 | 145 | <byt> : <byt> |
| 146 | 146 | */ |
| 147 | 147 | |
| 148 | DEVICE_LOAD( jupiter_ace ) | |
| 148 | DEVICE_IMAGE_LOAD( jupiter_ace ) | |
| 149 | 149 | { |
| 150 | 150 | unsigned char jupiter_repeat, jupiter_byte, loop; |
| 151 | 151 | int done, jupiter_index; |
| r2174 | r2175 | |
| 202 | 202 | return (0); |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | DEVICE_LOAD( jupiter_tap ) | |
| 205 | DEVICE_IMAGE_LOAD( jupiter_tap ) | |
| 206 | 206 | { |
| 207 | 207 | UINT8 inpbyt; |
| 208 | 208 | int loop; |
| r2174 | r2175 | |
| 261 | 261 | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | DEVICE_UNLOAD( jupiter_tap ) | |
| 264 | DEVICE_IMAGE_UNLOAD( jupiter_tap ) | |
| 265 | 265 | { |
| 266 | 266 | logerror("jupiter_tap_unload\n"); |
| 267 | 267 | if (jupiter_data) |
| r2174 | r2175 | |
|---|---|---|
| 369 | 369 | * - DEC 1820 double density: 40 tracks, 9 sectors per track, 512-byte sectors (180 KByte) |
| 370 | 370 | * |
| 371 | 371 | */ |
| 372 | DEVICE_LOAD( osborne1_floppy ) { | |
| 372 | DEVICE_IMAGE_LOAD( osborne1_floppy ) { | |
| 373 | 373 | int size, sectors, sectorsize; |
| 374 | 374 | |
| 375 | 375 | if ( ! image_has_been_created( image ) ) { |
| r2174 | r2175 | |
|---|---|---|
| 253 | 253 | } |
| 254 | 254 | */ |
| 255 | 255 | |
| 256 | DEVICE_LOAD(vtech1_floppy) | |
| 256 | DEVICE_IMAGE_LOAD(vtech1_floppy) | |
| 257 | 257 | { |
| 258 | 258 | int id = image_index_in_device(image); |
| 259 | 259 |
| r2174 | r2175 | |
|---|---|---|
| 111 | 111 | RAM[BIOS_EXEC + 2] = 0xc9; /* RET */ |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | DEVICE_LOAD( cpm_floppy ) | |
| 114 | DEVICE_IMAGE_LOAD( cpm_floppy ) | |
| 115 | 115 | { |
| 116 | 116 | int id = image_index_in_device(image); |
| 117 | 117 | |
| r2174 | r2175 | |
| 124 | 124 | return INIT_PASS; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | /*TODO: implement DEVICE_UNLOAD that clears ff[id]*/ | |
| 127 | /*TODO: implement DEVICE_IMAGE_UNLOAD that clears ff[id]*/ | |
| 128 | 128 | |
| 129 | 129 | /***************************************************************************** |
| 130 | 130 | * cpm_init |
| r2174 | r2175 | |
|---|---|---|
| 198 | 198 | return INIT_PASS; |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | DEVICE_LOAD(amstrad_plus_cartridge) | |
| 201 | DEVICE_IMAGE_LOAD(amstrad_plus_cartridge) | |
| 202 | 202 | { |
| 203 | 203 | // load CPC Plus / GX4000 cartridge image |
| 204 | 204 | // Format is RIFF: RIFF header chunk contains "AMS!" |
| r2174 | r2175 | |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | |
| 317 | /*static DEVICE_LOAD( aleste ) | |
| 317 | /*static DEVICE_IMAGE_LOAD( aleste ) | |
| 318 | 318 | { |
| 319 | 319 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 320 | 320 | { |
| r2174 | r2175 | |
|---|---|---|
| 147 | 147 | } dsk_fmt; |
| 148 | 148 | |
| 149 | 149 | /* these are in cpm_bios.c */ |
| 150 | DEVICE_LOAD( cpm_floppy ); | |
| 150 | DEVICE_IMAGE_LOAD( cpm_floppy ); | |
| 151 | 151 | extern int cpm_init(running_machine *machine, int n, const char *const ids[]); |
| 152 | 152 | |
| 153 | 153 | extern READ8_HANDLER ( cpm_bios_command_r ); |
| r2174 | r2175 | |
|---|---|---|
| 762 | 762 | sms_set_ggsmsmode( 0 ); |
| 763 | 763 | } |
| 764 | 764 | |
| 765 | DEVICE_LOAD( sms_cart ) | |
| 765 | DEVICE_IMAGE_LOAD( sms_cart ) | |
| 766 | 766 | { |
| 767 | 767 | running_machine *machine = Machine; |
| 768 | 768 | int size = image_length(image); |
| r2174 | r2175 | |
|---|---|---|
| 24 | 24 | |
| 25 | 25 | extern UINT8 *sam_screen; |
| 26 | 26 | |
| 27 | DEVICE_LOAD( coupe_floppy ) | |
| 27 | DEVICE_IMAGE_LOAD( coupe_floppy ) | |
| 28 | 28 | { |
| 29 | 29 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 30 | 30 | { |
| r2174 | r2175 | |
|---|---|---|
| 121 | 121 | activecpu_set_reg(Z80_PC, entry); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | DEVICE_LOAD( trs80_cas ) | |
| 124 | DEVICE_IMAGE_LOAD( trs80_cas ) | |
| 125 | 125 | { |
| 126 | 126 | cas_size = image_length(image); |
| 127 | 127 | cas_buff = image_ptr(image); |
| r2174 | r2175 | |
| 142 | 142 | return 0; |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | DEVICE_UNLOAD( trs80_cas ) | |
| 145 | DEVICE_IMAGE_UNLOAD( trs80_cas ) | |
| 146 | 146 | { |
| 147 | 147 | cas_buff = NULL; |
| 148 | 148 | cas_size = 0; |
| r2174 | r2175 | |
| 213 | 213 | return INIT_PASS; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | DEVICE_LOAD( trs80_floppy ) | |
| 216 | DEVICE_IMAGE_LOAD( trs80_floppy ) | |
| 217 | 217 | { |
| 218 | 218 | static UINT8 pdrive[4*16]; |
| 219 | 219 | int i; |
| r2174 | r2175 | |
|---|---|---|
| 654 | 654 | ti85_receive_serial (NULL,0); |
| 655 | 655 | } |
| 656 | 656 | |
| 657 | DEVICE_LOAD( ti85_serial ) | |
| 657 | DEVICE_IMAGE_LOAD( ti85_serial ) | |
| 658 | 658 | { |
| 659 | 659 | UINT8* file_data; |
| 660 | 660 | UINT16 file_size; |
| r2174 | r2175 | |
| 683 | 683 | return INIT_PASS; |
| 684 | 684 | } |
| 685 | 685 | |
| 686 | DEVICE_UNLOAD( ti85_serial ) | |
| 686 | DEVICE_IMAGE_UNLOAD( ti85_serial ) | |
| 687 | 687 | { |
| 688 | 688 | ti85_free_serial_data_memory(image->machine); |
| 689 | 689 | ti85_serial_status = TI85_SEND_STOP; |
| r2174 | r2175 | |
|---|---|---|
| 117 | 117 | pcart_rom_size = 0; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | DEVICE_LOAD( svi318_cart ) | |
| 120 | DEVICE_IMAGE_LOAD( svi318_cart ) | |
| 121 | 121 | { |
| 122 | 122 | UINT8 *p; |
| 123 | 123 | UINT32 size; |
| r2174 | r2175 | |
| 145 | 145 | return INIT_PASS; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | DEVICE_UNLOAD( svi318_cart ) | |
| 148 | DEVICE_IMAGE_UNLOAD( svi318_cart ) | |
| 149 | 149 | { |
| 150 | 150 | pcart = NULL; |
| 151 | 151 | pcart_rom_size = 0; |
| r2174 | r2175 | |
| 413 | 413 | return o; |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | DEVICE_LOAD( svi318_floppy ) | |
| 416 | DEVICE_IMAGE_LOAD( svi318_floppy ) | |
| 417 | 417 | { |
| 418 | 418 | int size; |
| 419 | 419 | int dsktype; |
| r2174 | r2175 | |
|---|---|---|
| 1 | /*DEVICE_LOAD(ti99_hsgpl); | |
| 2 | DEVICE_UNLOAD(ti99_hsgpl);*/ | |
| 1 | /*DEVICE_IMAGE_LOAD(ti99_hsgpl); | |
| 2 | DEVICE_IMAGE_UNLOAD(ti99_hsgpl);*/ | |
| 3 | 3 | int ti99_hsgpl_load_memcard(void); |
| 4 | 4 | int ti99_hsgpl_save_memcard(void); |
| 5 | 5 |
| r2174 | r2175 | |
|---|---|---|
| 113 | 113 | cartridge_ram[ offset ] = data; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | DEVICE_LOAD(pce_cart) | |
| 116 | DEVICE_IMAGE_LOAD(pce_cart) | |
| 117 | 117 | { |
| 118 | 118 | int size; |
| 119 | 119 | int split_rom = 0; |
| 120 | 120 | const char *extrainfo; |
| 121 | 121 | unsigned char *ROM; |
| 122 | logerror("*** DEVICE_LOAD(pce_cart) : %s\n", image_filename(image)); | |
| 122 | logerror("*** DEVICE_IMAGE_LOAD(pce_cart) : %s\n", image_filename(image)); | |
| 123 | 123 | |
| 124 | 124 | /* open file to get size */ |
| 125 | 125 | ROM = memory_region(REGION_USER1); |
| r2174 | r2175 | |
| 129 | 129 | /* handle header accordingly */ |
| 130 | 130 | if((size/512)&1) |
| 131 | 131 | { |
| 132 | logerror("*** DEVICE_LOAD(pce_cart) : Header present\n"); | |
| 132 | logerror("*** DEVICE_IMAGE_LOAD(pce_cart) : Header present\n"); | |
| 133 | 133 | size -= 512; |
| 134 | 134 | image_fseek(image, 512, SEEK_SET); |
| 135 | 135 | } |
| r2174 | r2175 | |
| 151 | 151 | int i; |
| 152 | 152 | UINT8 decrypted[256]; |
| 153 | 153 | |
| 154 | logerror( "*** DEVICE_LOAD(pce_cart) : ROM image seems encrypted, decrypting...\n" ); | |
| 154 | logerror( "*** DEVICE_IMAGE_LOAD(pce_cart) : ROM image seems encrypted, decrypting...\n" ); | |
| 155 | 155 | |
| 156 | 156 | /* Initialize decryption table */ |
| 157 | 157 | for( i = 0; i < 256; i++ ) |
| r2174 | r2175 | |
|---|---|---|
| 480 | 480 | |
| 481 | 481 | We don't need to support 99/4p, as it has no cartridge port. |
| 482 | 482 | */ |
| 483 | DEVICE_LOAD( ti99_cart ) | |
| 483 | DEVICE_IMAGE_LOAD( ti99_cart ) | |
| 484 | 484 | { |
| 485 | 485 | /* Trick - we identify file types according to their extension */ |
| 486 | 486 | /* Note that if we do not recognize the extension, we revert to the slot location <-> type |
| r2174 | r2175 | |
| 586 | 586 | return INIT_PASS; |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | DEVICE_UNLOAD( ti99_cart ) | |
| 589 | DEVICE_IMAGE_UNLOAD( ti99_cart ) | |
| 590 | 590 | { |
| 591 | 591 | int id = image_index_in_device(image); |
| 592 | 592 | |
| r2174 | r2175 | |
| 643 | 643 | slot_type[id] = SLOT_EMPTY; |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | DEVICE_LOAD( ti99_hd ) | |
| 646 | DEVICE_IMAGE_LOAD( ti99_hd ) | |
| 647 | 647 | { |
| 648 | 648 | int id = image_index_in_device(image); |
| 649 | 649 | return smc92x4_hd_load(image, id); |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | DEVICE_UNLOAD( ti99_hd ) | |
| 652 | DEVICE_IMAGE_UNLOAD( ti99_hd ) | |
| 653 | 653 | { |
| 654 | 654 | int id = image_index_in_device(image); |
| 655 | 655 | smc92x4_hd_unload(image, id); |
| r2174 | r2175 | |
|---|---|---|
| 121 | 121 | *****************************************************************************/ |
| 122 | 122 | |
| 123 | 123 | #define MAXSIZE 5760 * 256 + 80 |
| 124 | DEVICE_LOAD( a800_floppy ) | |
| 124 | DEVICE_IMAGE_LOAD( a800_floppy ) | |
| 125 | 125 | { |
| 126 | 126 | int size, i; |
| 127 | 127 | const char *ext; |
| r2174 | r2175 | |
|---|---|---|
| 161 | 161 | MACHINE_RESET( ti99 ); |
| 162 | 162 | |
| 163 | 163 | DEVICE_START( ti99_cart ); |
| 164 | DEVICE_LOAD( ti99_cart ); | |
| 165 | DEVICE_UNLOAD( ti99_cart ); | |
| 164 | DEVICE_IMAGE_LOAD( ti99_cart ); | |
| 165 | DEVICE_IMAGE_UNLOAD( ti99_cart ); | |
| 166 | 166 | |
| 167 | DEVICE_LOAD( ti99_hd ); | |
| 168 | DEVICE_UNLOAD( ti99_hd ); | |
| 167 | DEVICE_IMAGE_LOAD( ti99_hd ); | |
| 168 | DEVICE_IMAGE_UNLOAD( ti99_hd ); | |
| 169 | 169 | |
| 170 | 170 | VIDEO_START( ti99_4ev ); |
| 171 | 171 | INTERRUPT_GEN( ti99_vblank_interrupt ); |
| r2174 | r2175 | |
|---|---|---|
| 912 | 912 | prg.c16 = 1; |
| 913 | 913 | } |
| 914 | 914 | |
| 915 | static DEVICE_LOAD( vc20_tape ) | |
| 915 | static DEVICE_IMAGE_LOAD( vc20_tape ) | |
| 916 | 916 | { |
| 917 | 917 | const char *cp; |
| 918 | 918 | |
| r2174 | r2175 | |
| 937 | 937 | return INIT_PASS; |
| 938 | 938 | } |
| 939 | 939 | |
| 940 | static DEVICE_UNLOAD( vc20_tape ) | |
| 940 | static DEVICE_IMAGE_UNLOAD( vc20_tape ) | |
| 941 | 941 | { |
| 942 | 942 | vc20_tape_close(); |
| 943 | 943 | } |
| r2174 | r2175 | |
|---|---|---|
| 80 | 80 | /* |
| 81 | 81 | Initialize pio unit and open image |
| 82 | 82 | */ |
| 83 | DEVICE_LOAD( ti99_4_pio ) | |
| 83 | DEVICE_IMAGE_LOAD( ti99_4_pio ) | |
| 84 | 84 | { |
| 85 | 85 | int id = image_index_in_device(image); |
| 86 | 86 | if ((id < 0) || (id >= MAX_RS232_CARDS)) |
| r2174 | r2175 | |
| 102 | 102 | /* |
| 103 | 103 | close a pio image |
| 104 | 104 | */ |
| 105 | DEVICE_UNLOAD( ti99_4_pio ) | |
| 105 | DEVICE_IMAGE_UNLOAD( ti99_4_pio ) | |
| 106 | 106 | { |
| 107 | 107 | int id = image_index_in_device(image); |
| 108 | 108 | if ((id < 0) || (id >= MAX_RS232_CARDS)) |
| r2174 | r2175 | |
| 117 | 117 | /* |
| 118 | 118 | Initialize rs232 unit and open image |
| 119 | 119 | */ |
| 120 | DEVICE_LOAD( ti99_4_rs232 ) | |
| 120 | DEVICE_IMAGE_LOAD( ti99_4_rs232 ) | |
| 121 | 121 | { |
| 122 | 122 | int id = image_index_in_device(image); |
| 123 | 123 | |
| r2174 | r2175 | |
| 145 | 145 | /* |
| 146 | 146 | close a rs232 image |
| 147 | 147 | */ |
| 148 | DEVICE_UNLOAD( ti99_4_rs232 ) | |
| 148 | DEVICE_IMAGE_UNLOAD( ti99_4_rs232 ) | |
| 149 | 149 | { |
| 150 | 150 | /*int id = image_index_in_device(image);*/ |
| 151 | 151 |
| r2174 | r2175 | |
|---|---|---|
| 1479 | 1479 | load floppy disc |
| 1480 | 1480 | ***************************************/ |
| 1481 | 1481 | |
| 1482 | DEVICE_LOAD( bbc_floppy ) | |
| 1482 | DEVICE_IMAGE_LOAD( bbc_floppy ) | |
| 1483 | 1483 | { |
| 1484 | 1484 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 1485 | 1485 | { |
| r2174 | r2175 | |
| 2047 | 2047 | /************************************** |
| 2048 | 2048 | BBC B Rom loading functions |
| 2049 | 2049 | ***************************************/ |
| 2050 | DEVICE_LOAD( bbcb_cart ) | |
| 2050 | DEVICE_IMAGE_LOAD( bbcb_cart ) | |
| 2051 | 2051 | { |
| 2052 | 2052 | UINT8 *mem = memory_region (REGION_USER1); |
| 2053 | 2053 | int size, read_; |
| r2174 | r2175 | |
|---|---|---|
| 1 | DEVICE_LOAD( ti99_4_pio ); | |
| 2 | DEVICE_UNLOAD( ti99_4_pio ); | |
| 1 | DEVICE_IMAGE_LOAD( ti99_4_pio ); | |
| 2 | DEVICE_IMAGE_UNLOAD( ti99_4_pio ); | |
| 3 | 3 | |
| 4 | DEVICE_LOAD( ti99_4_rs232 ); | |
| 5 | DEVICE_UNLOAD( ti99_4_rs232 ); | |
| 4 | DEVICE_IMAGE_LOAD( ti99_4_rs232 ); | |
| 5 | DEVICE_IMAGE_UNLOAD( ti99_4_rs232 ); | |
| 6 | 6 | |
| 7 | 7 | void ti99_rs232_init(void); |
| 8 | 8 | void ti99_rs232_reset(void); |
| r2174 | r2175 | |
|---|---|---|
| 336 | 336 | } |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | DEVICE_LOAD( laser_cart ) | |
| 339 | DEVICE_IMAGE_LOAD( laser_cart ) | |
| 340 | 340 | { |
| 341 | 341 | int size = 0; |
| 342 | 342 | |
| r2174 | r2175 | |
| 354 | 354 | return size > 0 ? INIT_PASS : INIT_FAIL; |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | DEVICE_UNLOAD( laser_cart ) | |
| 357 | DEVICE_IMAGE_UNLOAD( laser_cart ) | |
| 358 | 358 | { |
| 359 | 359 | laser_bank_mask &= ~0xf000; |
| 360 | 360 | /* wipe out the memory contents to be 100% sure */ |
| 361 | 361 | memset(&mem[0x30000], 0xff, 0x10000); |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | DEVICE_LOAD( laser_floppy ) | |
| 364 | DEVICE_IMAGE_LOAD( laser_floppy ) | |
| 365 | 365 | { |
| 366 | 366 | UINT8 buff[32]; |
| 367 | 367 |
| r2174 | r2175 | |
|---|---|---|
| 137 | 137 | /* bit 4: Index pulse from disc */ |
| 138 | 138 | static unsigned char kc85_disc_hw_input_gate; |
| 139 | 139 | |
| 140 | DEVICE_LOAD( kc85_floppy ) | |
| 140 | DEVICE_IMAGE_LOAD( kc85_floppy ) | |
| 141 | 141 | { |
| 142 | 142 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 143 | 143 | { |
| r2174 | r2175 | |
|---|---|---|
| 371 | 371 | ROM_REGION(0x100,REGION_GFX1, ROMREGION_ERASEFF) |
| 372 | 372 | ROM_END |
| 373 | 373 | |
| 374 | static DEVICE_LOAD( arcadia_cart ) | |
| 374 | static DEVICE_IMAGE_LOAD( arcadia_cart ) | |
| 375 | 375 | { |
| 376 | 376 | UINT8 *rom = memory_region(REGION_CPU1); |
| 377 | 377 | int size; |
| r2174 | r2175 | |
|---|---|---|
| 483 | 483 | /* |
| 484 | 484 | Initialize rs232 unit and open image |
| 485 | 485 | */ |
| 486 | static DEVICE_LOAD( tm990_189_rs232 ) | |
| 486 | static DEVICE_IMAGE_LOAD( tm990_189_rs232 ) | |
| 487 | 487 | { |
| 488 | 488 | int id = image_index_in_device(image); |
| 489 | 489 | |
| r2174 | r2175 | |
| 502 | 502 | /* |
| 503 | 503 | close a rs232 image |
| 504 | 504 | */ |
| 505 | static DEVICE_UNLOAD( tm990_189_rs232 ) | |
| 505 | static DEVICE_IMAGE_UNLOAD( tm990_189_rs232 ) | |
| 506 | 506 | { |
| 507 | 507 | int id = image_index_in_device(image); |
| 508 | 508 |
| r2174 | r2175 | |
|---|---|---|
| 479 | 479 | } |
| 480 | 480 | |
| 481 | 481 | |
| 482 | static DEVICE_LOAD( pasogo_cart ) | |
| 482 | static DEVICE_IMAGE_LOAD( pasogo_cart ) | |
| 483 | 483 | { |
| 484 | 484 | UINT8 *user = memory_region(REGION_USER1); |
| 485 | 485 | int size; |
| r2174 | r2175 | |
|---|---|---|
| 322 | 322 | } |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | static DEVICE_LOAD( lynx_cart ) | |
| 325 | static DEVICE_IMAGE_LOAD( lynx_cart ) | |
| 326 | 326 | { |
| 327 | 327 | UINT8 *rom = memory_region(REGION_USER1); |
| 328 | 328 | int size; |
| r2174 | r2175 | |
|---|---|---|
| 42 | 42 | /* |
| 43 | 43 | Open cylinder image and read RAM |
| 44 | 44 | */ |
| 45 | static DEVICE_LOAD( apexc_cylinder ) | |
| 45 | static DEVICE_IMAGE_LOAD( apexc_cylinder ) | |
| 46 | 46 | { |
| 47 | 47 | /* open file */ |
| 48 | 48 | apexc_cylinder.fd = image; |
| r2174 | r2175 | |
| 72 | 72 | /* |
| 73 | 73 | Save RAM to cylinder image and close it |
| 74 | 74 | */ |
| 75 | static DEVICE_UNLOAD( apexc_cylinder ) | |
| 75 | static DEVICE_IMAGE_UNLOAD( apexc_cylinder ) | |
| 76 | 76 | { |
| 77 | 77 | if (apexc_cylinder.fd && apexc_cylinder.writable) |
| 78 | 78 | { /* save RAM contents */ |
| r2174 | r2175 | |
| 178 | 178 | /* |
| 179 | 179 | Open a tape image |
| 180 | 180 | */ |
| 181 | static DEVICE_LOAD( apexc_tape ) | |
| 181 | static DEVICE_IMAGE_LOAD( apexc_tape ) | |
| 182 | 182 | { |
| 183 | 183 | int id = image_index_in_device(image); |
| 184 | 184 | tape *t = &apexc_tapes[id]; |
| r2174 | r2175 | |
|---|---|---|
| 1812 | 1812 | basicdsk_set_geometry(image, tracks+1, heads, sectors, sectorlen, firstsector, 0x100, FALSE); |
| 1813 | 1813 | } |
| 1814 | 1814 | |
| 1815 | static DEVICE_LOAD( x68k_floppy ) | |
| 1815 | static DEVICE_IMAGE_LOAD( x68k_floppy ) | |
| 1816 | 1816 | { |
| 1817 | 1817 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 1818 | 1818 | { |
| r2174 | r2175 | |
| 1837 | 1837 | return INIT_FAIL; |
| 1838 | 1838 | } |
| 1839 | 1839 | |
| 1840 | static DEVICE_UNLOAD( x68k_floppy ) | |
| 1840 | static DEVICE_IMAGE_UNLOAD( x68k_floppy ) | |
| 1841 | 1841 | { |
| 1842 | 1842 | if(sys.ioc.irqstatus & 0x02) |
| 1843 | 1843 | { |
| r2174 | r2175 | |
|---|---|---|
| 1015 | 1015 | } |
| 1016 | 1016 | } |
| 1017 | 1017 | |
| 1018 | static DEVICE_LOAD( super80_cart ) | |
| 1018 | static DEVICE_IMAGE_LOAD( super80_cart ) | |
| 1019 | 1019 | { |
| 1020 | 1020 | /* int size = mame_fsize(fp); |
| 1021 | 1021 | UINT8 *mem = malloc(size); |
| r2174 | r2175 | |
|---|---|---|
| 126 | 126 | ROM_REGION32_BE( 0x4000000, REGION_USER2, ROMREGION_ERASEFF) |
| 127 | 127 | ROM_END |
| 128 | 128 | |
| 129 | static DEVICE_LOAD(n64_cart) | |
| 129 | static DEVICE_IMAGE_LOAD(n64_cart) | |
| 130 | 130 | { |
| 131 | 131 | int i, length; |
| 132 | 132 | UINT8 *cart = memory_region(REGION_USER2); |
| r2174 | r2175 | |
|---|---|---|
| 2032 | 2032 | |
| 2033 | 2033 | /* System Configuration */ |
| 2034 | 2034 | |
| 2035 | static DEVICE_LOAD( atarist_floppy ) | |
| 2035 | static DEVICE_IMAGE_LOAD( atarist_floppy ) | |
| 2036 | 2036 | { |
| 2037 | 2037 | if (image_has_been_created(image)) |
| 2038 | 2038 | return INIT_FAIL; |
| r2174 | r2175 | |
| 2088 | 2088 | } |
| 2089 | 2089 | } |
| 2090 | 2090 | |
| 2091 | static DEVICE_LOAD( atarist_serial ) | |
| 2091 | static DEVICE_IMAGE_LOAD( atarist_serial ) | |
| 2092 | 2092 | { |
| 2093 | 2093 | /* filename specified */ |
| 2094 | 2094 | if (serial_device_load(image)==INIT_PASS) |
| r2174 | r2175 | |
| 2145 | 2145 | } |
| 2146 | 2146 | } |
| 2147 | 2147 | |
| 2148 | static DEVICE_LOAD( atarist_cart ) | |
| 2148 | static DEVICE_IMAGE_LOAD( atarist_cart ) | |
| 2149 | 2149 | { |
| 2150 | 2150 | UINT8 *ptr = ((UINT8 *)memory_region(REGION_CPU1)) + 0xfa0000; |
| 2151 | 2151 | int filesize = image_length(image); |
| r2174 | r2175 | |
|---|---|---|
| 671 | 671 | } |
| 672 | 672 | } |
| 673 | 673 | |
| 674 | static DEVICE_LOAD( sg1000_cart ) | |
| 674 | static DEVICE_IMAGE_LOAD( sg1000_cart ) | |
| 675 | 675 | { |
| 676 | 676 | int size = image_length(image); |
| 677 | 677 | UINT8 *ptr = memory_region(REGION_CPU1); |
| r2174 | r2175 | |
| 733 | 733 | } |
| 734 | 734 | } |
| 735 | 735 | |
| 736 | static DEVICE_LOAD( sc3000_cart ) | |
| 736 | static DEVICE_IMAGE_LOAD( sc3000_cart ) | |
| 737 | 737 | { |
| 738 | 738 | int size = image_length(image); |
| 739 | 739 | UINT8 *ptr = memory_region(REGION_CPU1); |
| r2174 | r2175 | |
| 792 | 792 | } |
| 793 | 793 | } |
| 794 | 794 | |
| 795 | static DEVICE_LOAD( sf7000_floppy ) | |
| 795 | static DEVICE_IMAGE_LOAD( sf7000_floppy ) | |
| 796 | 796 | { |
| 797 | 797 | if (image_has_been_created(image)) |
| 798 | 798 | return INIT_FAIL; |
| r2174 | r2175 | |
| 823 | 823 | } |
| 824 | 824 | } |
| 825 | 825 | |
| 826 | static DEVICE_LOAD( sf7000_serial ) | |
| 826 | static DEVICE_IMAGE_LOAD( sf7000_serial ) | |
| 827 | 827 | { |
| 828 | 828 | /* filename specified */ |
| 829 | 829 | if (serial_device_load(image)==INIT_PASS) |
| r2174 | r2175 | |
|---|---|---|
| 96 | 96 | #include "sound/speaker.h" |
| 97 | 97 | |
| 98 | 98 | |
| 99 | static DEVICE_LOAD( exidy_floppy ) | |
| 99 | static DEVICE_IMAGE_LOAD( exidy_floppy ) | |
| 100 | 100 | { |
| 101 | 101 | if (device_load_basicdsk_floppy(image)==INIT_PASS) |
| 102 | 102 | { |
| r2174 | r2175 | |
|---|---|---|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | |
| 532 | static DEVICE_LOAD( a2600_cart ) | |
| 532 | static DEVICE_IMAGE_LOAD( a2600_cart ) | |
| 533 | 533 | { |
| 534 | 534 | const struct _extrainfo_banking_def *eibd; |
| 535 | 535 | const char *extrainfo; |
| r2174 | r2175 | |
|---|---|---|
| 333 | 333 | |
| 334 | 334 | #define ST2_HEADER_SIZE 256 |
| 335 | 335 | |
| 336 | static DEVICE_LOAD( studio2_cart ) | |
| 336 | static DEVICE_IMAGE_LOAD( studio2_cart ) | |
| 337 | 337 | { |
| 338 | 338 | UINT8 *ptr = NULL; |
| 339 | 339 | UINT8 header[ST2_HEADER_SIZE]; |
| r2174 | r2175 | |
|---|---|---|
| 446 | 446 | static int sb2m600_tape_size; |
| 447 | 447 | static int sb2m600_tape_index; |
| 448 | 448 | |
| 449 | static DEVICE_LOAD( sb2m600_cassette ) | |
| 449 | static DEVICE_IMAGE_LOAD( sb2m600_cassette ) | |
| 450 | 450 | { |
| 451 | 451 | sb2m600_tape_image = (UINT8 *)image_malloc(image, sb2m600_tape_size); |
| 452 | 452 | sb2m600_tape_size = image_length(image); |
| r2174 | r2175 | |
| 461 | 461 | return INIT_PASS; |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | static DEVICE_UNLOAD( sb2m600_cassette ) | |
| 464 | static DEVICE_IMAGE_UNLOAD( sb2m600_cassette ) | |
| 465 | 465 | { |
| 466 | 466 | sb2m600_tape_image = NULL; |
| 467 | 467 | sb2m600_tape_size = 0; |
| r2174 | r2175 | |
|---|---|---|
| 234 | 234 | MACHINE_START_CALL(snes); |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | static DEVICE_LOAD( snes_cart ) | |
| 237 | static DEVICE_IMAGE_LOAD( snes_cart ) | |
| 238 | 238 | { |
| 239 | 239 | int i; |
| 240 | 240 | running_machine *machine = image->machine; |
| r2174 | r2175 | |
|---|---|---|
| 1064 | 1064 | |
| 1065 | 1065 | /* System Configuration */ |
| 1066 | 1066 | |
| 1067 | static DEVICE_LOAD( ql_microdrive ) | |
| 1067 | static DEVICE_IMAGE_LOAD( ql_microdrive ) | |
| 1068 | 1068 | { |
| 1069 | 1069 | int filesize = image_length(image); |
| 1070 | 1070 | |
| r2174 | r2175 | |
| 1099 | 1099 | } |
| 1100 | 1100 | } |
| 1101 | 1101 | |
| 1102 | static DEVICE_LOAD( ql_serial ) | |
| 1102 | static DEVICE_IMAGE_LOAD( ql_serial ) | |
| 1103 | 1103 | { |
| 1104 | 1104 | /* filename specified */ |
| 1105 | 1105 | if (serial_device_load(image)==INIT_PASS) |
| r2174 | r2175 | |
| 1137 | 1137 | } |
| 1138 | 1138 | } |
| 1139 | 1139 | |
| 1140 | static DEVICE_LOAD( ql_cart ) | |
| 1140 | static DEVICE_IMAGE_LOAD( ql_cart ) | |
| 1141 | 1141 | { |
| 1142 | 1142 | UINT8 *ptr = memory_region(REGION_CPU1) + 0x00c000; |
| 1143 | 1143 | int filesize = image_length(image); |
| r2174 | r2175 | |
|---|---|---|
| 1039 | 1039 | } |
| 1040 | 1040 | } |
| 1041 | 1041 | |
| 1042 | static DEVICE_LOAD( abc800_serial ) | |
| 1042 | static DEVICE_IMAGE_LOAD( abc800_serial ) | |
| 1043 | 1043 | { |
| 1044 | 1044 | /* filename specified */ |
| 1045 | 1045 | if (serial_device_load(image)==INIT_PASS) |
| r2174 | r2175 | |
|---|---|---|
| 448 | 448 | |
| 449 | 449 | /* System Configuration */ |
| 450 | 450 | |
| 451 | static DEVICE_LOAD( crvision_cart ) | |
| 451 | static DEVICE_IMAGE_LOAD( crvision_cart ) | |
| 452 | 452 | { |
| 453 | 453 | int size = image_length(image); |
| 454 | 454 |
| r2174 | r2175 | |
|---|---|---|
| 77 | 77 | tms3556_interrupt( machine ); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | /*static DEVICE_LOAD(exelv_cart) | |
| 80 | /*static DEVICE_IMAGE_LOAD(exelv_cart) | |
| 81 | 81 | { |
| 82 | 82 | return INIT_PASS; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | static DEVICE_UNLOAD( exelv_cart ) | |
| 85 | static DEVICE_IMAGE_UNLOAD( exelv_cart ) | |
| 86 | 86 | { |
| 87 | 87 | }*/ |
| 88 | 88 |
| r2174 | r2175 | |
|---|---|---|
| 163 | 163 | return readinputport(offset); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | static DEVICE_LOAD( tutor_cart ) | |
| 166 | static DEVICE_IMAGE_LOAD( tutor_cart ) | |
| 167 | 167 | { |
| 168 | 168 | image_fread(image, memory_region(REGION_CPU1) + cartridge_base, 0x6000); |
| 169 | 169 | return INIT_PASS; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | static DEVICE_UNLOAD( tutor_cart ) | |
| 172 | static DEVICE_IMAGE_UNLOAD( tutor_cart ) | |
| 173 | 173 | { |
| 174 | 174 | memset(memory_region(REGION_CPU1) + cartridge_base, 0, 0x6000); |
| 175 | 175 | } |
| r2174 | r2175 | |
|---|---|---|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | |
| 174 | static DEVICE_LOAD( genesis_cart ) | |
| 174 | static DEVICE_IMAGE_LOAD( genesis_cart ) | |
| 175 | 175 | { |
| 176 | 176 | unsigned char *tmpROMnew, *tmpROM; |
| 177 | 177 | unsigned char *secondhalf; |
| r2174 | r2175 | |
| 336 | 336 | ROM_REGION( 0x10000, REGION_CPU2, ROMREGION_ERASEFF) |
| 337 | 337 | ROM_END |
| 338 | 338 | |
| 339 | static DEVICE_UNLOAD( genesis_cart ) | |
| 339 | static DEVICE_IMAGE_UNLOAD( genesis_cart ) | |
| 340 | 340 | { |
| 341 | 341 | /* Write out the battery file if necessary */ |
| 342 | 342 | if ((genesis_sram != NULL) && (genesis_sram_len > 0)) |
| r2174 | r2175 | |
|---|---|---|
| 218 | 218 | |
| 219 | 219 | ROM_END |
| 220 | 220 | |
| 221 | static DEVICE_LOAD( vc4000_cart ) | |
| 221 | static DEVICE_IMAGE_LOAD( vc4000_cart ) | |
| 222 | 222 | { |
| 223 | 223 | int size = image_length(image); |
| 224 | 224 |
| r2174 | r2175 | |
|---|---|---|
| 66 | 66 | memory_set_bankptr( 1, memory_region( REGION_USER1 ) ); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | static DEVICE_LOAD(gamepock_cart) { | |
| 69 | static DEVICE_IMAGE_LOAD(gamepock_cart) { | |
| 70 | 70 | UINT8 *cart = memory_region( REGION_USER1 ); |
| 71 | 71 | int size = image_length( image ); |
| 72 | 72 |
| Previous | 15994 Revisions | Next |