diff --git a/.gitattributes b/.gitattributes index ef8e0e58664..58f1edc0099 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6327,16 +6327,6 @@ src/mess/drivers/zexall.c svneol=native#text/plain src/mess/drivers/zrt80.c svneol=native#text/plain src/mess/drivers/zsbc3.c svneol=native#text/plain src/mess/drivers/zx.c svneol=native#text/plain -src/mess/formats/cbm_crt.c svneol=native#text/plain -src/mess/formats/cbm_crt.h svneol=native#text/plain -src/mess/formats/cbm_snqk.c svneol=native#text/plain -src/mess/formats/cbm_snqk.h svneol=native#text/plain -src/mess/formats/spec_snqk.c svneol=native#text/plain -src/mess/formats/spec_snqk.h svneol=native#text/plain -src/mess/formats/timex_dck.c svneol=native#text/plain -src/mess/formats/timex_dck.h svneol=native#text/plain -src/mess/formats/z80bin.c svneol=native#text/plain -src/mess/formats/z80bin.h svneol=native#text/plain src/mess/includes/a7800.h svneol=native#text/plain src/mess/includes/abc1600.h svneol=native#text/plain src/mess/includes/abc80.h svneol=native#text/plain @@ -7012,6 +7002,10 @@ src/mess/machine/cbm2exp.c svneol=native#text/plain src/mess/machine/cbm2exp.h svneol=native#text/plain src/mess/machine/cbm2user.c svneol=native#text/plain src/mess/machine/cbm2user.h svneol=native#text/plain +src/mess/machine/cbm_crt.c svneol=native#text/plain +src/mess/machine/cbm_crt.h svneol=native#text/plain +src/mess/machine/cbm_snqk.c svneol=native#text/plain +src/mess/machine/cbm_snqk.h svneol=native#text/plain src/mess/machine/cbmiec.c svneol=native#text/plain src/mess/machine/cbmiec.h svneol=native#text/plain src/mess/machine/cbmipt.c svneol=native#text/plain @@ -7477,6 +7471,8 @@ src/mess/machine/sonydriv.h svneol=native#text/plain src/mess/machine/sorcerer.c svneol=native#text/plain src/mess/machine/southbridge.c svneol=native#text/plain src/mess/machine/southbridge.h svneol=native#text/plain +src/mess/machine/spec_snqk.c svneol=native#text/plain +src/mess/machine/spec_snqk.h svneol=native#text/plain src/mess/machine/special.c svneol=native#text/plain src/mess/machine/strata.c svneol=native#text/plain src/mess/machine/strata.h svneol=native#text/plain @@ -7679,6 +7675,8 @@ src/mess/machine/x68k_scsiext.c svneol=native#text/plain src/mess/machine/x68k_scsiext.h svneol=native#text/plain src/mess/machine/x68kexp.c svneol=native#text/plain src/mess/machine/x68kexp.h svneol=native#text/plain +src/mess/machine/z80bin.c svneol=native#text/plain +src/mess/machine/z80bin.h svneol=native#text/plain src/mess/machine/z80ne.c svneol=native#text/plain src/mess/machine/z88_flash.c svneol=native#text/plain src/mess/machine/z88_flash.h svneol=native#text/plain diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c index 84392ecd22f..1a149164bab 100644 --- a/src/mess/drivers/c128.c +++ b/src/mess/drivers/c128.c @@ -28,6 +28,11 @@ +static QUICKLOAD_LOAD( cbm_c64 ) +{ + return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_quick_sethiaddress); +} + //************************************************************************** // INTERRUPTS //************************************************************************** diff --git a/src/mess/drivers/c64.c b/src/mess/drivers/c64.c index 35d69d15e02..f3bb031b730 100644 --- a/src/mess/drivers/c64.c +++ b/src/mess/drivers/c64.c @@ -28,6 +28,10 @@ #define VA13 BIT(va, 13) #define VA12 BIT(va, 12) +static QUICKLOAD_LOAD( cbm_c64 ) +{ + return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_quick_sethiaddress); +} //************************************************************************** diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c index beea2fa8c3d..de81ca93b53 100644 --- a/src/mess/drivers/c65.c +++ b/src/mess/drivers/c65.c @@ -57,12 +57,25 @@ bus serial (available in all modes), a Fast and a Burst serial bus #include "machine/cbmipt.h" #include "video/vic4567.h" #include "includes/cbm.h" -#include "formats/cbm_snqk.h" +#include "machine/cbm_snqk.h" #include "includes/c64_legacy.h" #include "includes/c65.h" #include "machine/cbmiec.h" #include "machine/ram.h" +static void cbm_c65_quick_sethiaddress( running_machine &machine, UINT16 hiaddress ) +{ + address_space &space = machine.firstcpu->space(AS_PROGRAM); + + space.write_byte(0x82, hiaddress & 0xff); + space.write_byte(0x83, hiaddress >> 8); +} + +static QUICKLOAD_LOAD( cbm_c65 ) +{ + return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_c65_quick_sethiaddress); +} + /************************************* * * Main CPU memory handlers diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c index fb58d595ff4..360d3bcdada 100644 --- a/src/mess/drivers/cbm2.c +++ b/src/mess/drivers/cbm2.c @@ -29,7 +29,23 @@ #define A0 BIT(offset, 0) #define VA12 BIT(va, 12) +static void cbmb_quick_sethiaddress(running_machine &machine, UINT16 hiaddress) +{ + address_space &space = machine.firstcpu->space(AS_PROGRAM); + space.write_byte(0xf0046, hiaddress & 0xff); + space.write_byte(0xf0047, hiaddress >> 8); +} + +static QUICKLOAD_LOAD( cbmb ) +{ + return general_cbm_loadsnap(image, file_type, quickload_size, 0x10000, cbmb_quick_sethiaddress); +} + +static QUICKLOAD_LOAD( p500 ) +{ + return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbmb_quick_sethiaddress); +} //************************************************************************** // ADDRESS DECODING diff --git a/src/mess/drivers/mbee.c b/src/mess/drivers/mbee.c index 8a8f987e28f..ff6a1b54bcc 100644 --- a/src/mess/drivers/mbee.c +++ b/src/mess/drivers/mbee.c @@ -91,7 +91,6 @@ #include "emu.h" #include "includes/mbee.h" -#include "formats/z80bin.h" #define XTAL_13_5MHz 13500000 diff --git a/src/mess/drivers/pet2001.c b/src/mess/drivers/pet2001.c index 568cb6c4888..596ccbe4b52 100644 --- a/src/mess/drivers/pet2001.c +++ b/src/mess/drivers/pet2001.c @@ -152,7 +152,22 @@ ROM sockets: UA3 2K or 4K character #include "includes/pet2001.h" +static void cbm_pet_quick_sethiaddress( running_machine &machine, UINT16 hiaddress ) +{ + address_space &space = machine.firstcpu->space(AS_PROGRAM); + space.write_byte(0x2e, hiaddress & 0xff); + space.write_byte(0x2c, hiaddress & 0xff); + space.write_byte(0x2a, hiaddress & 0xff); + space.write_byte(0x2f, hiaddress >> 8); + space.write_byte(0x2d, hiaddress >> 8); + space.write_byte(0x2b, hiaddress >> 8); +} + +static QUICKLOAD_LOAD( cbm_pet ) +{ + return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_pet_quick_sethiaddress); +} //************************************************************************** // INTERRUPTS diff --git a/src/mess/drivers/plus4.c b/src/mess/drivers/plus4.c index d9d5c9b98d4..ec397d13a25 100644 --- a/src/mess/drivers/plus4.c +++ b/src/mess/drivers/plus4.c @@ -33,6 +33,11 @@ +static QUICKLOAD_LOAD( cbm_c16 ) +{ + return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_quick_sethiaddress); +} + //************************************************************************** // INTERRUPTS //************************************************************************** diff --git a/src/mess/drivers/sorcerer.c b/src/mess/drivers/sorcerer.c index edec35f8ef6..eb9a05cd952 100644 --- a/src/mess/drivers/sorcerer.c +++ b/src/mess/drivers/sorcerer.c @@ -156,7 +156,6 @@ NOTES (2011-08-08) ********************************************************************************/ #include "includes/sorcerer.h" -#include "formats/z80bin.h" static ADDRESS_MAP_START( sorcerer_mem, AS_PROGRAM, 8, sorcerer_state) ADDRESS_MAP_UNMAP_HIGH diff --git a/src/mess/drivers/spectrum.c b/src/mess/drivers/spectrum.c index 6418ba6f752..5495b988265 100644 --- a/src/mess/drivers/spectrum.c +++ b/src/mess/drivers/spectrum.c @@ -278,7 +278,7 @@ SamRam #include "sound/wave.h" #include "includes/spectrum.h" #include "formats/tzx_cas.h" -#include "formats/spec_snqk.h" +#include "machine/spec_snqk.h" /****************************************************************************************************/ diff --git a/src/mess/drivers/super80.c b/src/mess/drivers/super80.c index edac90a20d6..13e2cbd4a39 100644 --- a/src/mess/drivers/super80.c +++ b/src/mess/drivers/super80.c @@ -183,7 +183,6 @@ hardware. #include "super80.lh" #include "includes/super80.h" -#include "formats/z80bin.h" #define MASTER_CLOCK (XTAL_12MHz) #define PIXEL_CLOCK (MASTER_CLOCK/2) diff --git a/src/mess/drivers/timex.c b/src/mess/drivers/timex.c index 28dbeb183ff..33ca14c35ca 100644 --- a/src/mess/drivers/timex.c +++ b/src/mess/drivers/timex.c @@ -153,11 +153,124 @@ http://www.z88forever.org.uk/zxplus3e/ #include "sound/speaker.h" #include "sound/ay8910.h" #include "formats/tzx_cas.h" -#include "formats/spec_snqk.h" -#include "formats/timex_dck.h" +#include "machine/spec_snqk.h" #include "machine/beta.h" #include "machine/ram.h" +enum +{ + TIMEX_CART_NONE, + TIMEX_CART_DOCK, + TIMEX_CART_EXROM, + TIMEX_CART_HOME +}; + +struct timex_cart_t +{ + int type; + UINT8 chunks; + UINT8 *data; +}; + +static timex_cart_t timex_cart; + + +DEVICE_IMAGE_LOAD_LEGACY( timex_cart ) +{ + int file_size; + UINT8 * file_data; + + int chunks_in_file = 0; + + int i; + + logerror ("Trying to load cart\n"); + + file_size = image.length(); + + if (file_size < 0x09) + { + logerror ("Bad file size\n"); + return IMAGE_INIT_FAIL; + } + + file_data = (UINT8 *)malloc(file_size); + if (file_data == NULL) + { + logerror ("Memory allocating error\n"); + return IMAGE_INIT_FAIL; + } + + image.fread(file_data, file_size); + + for (i=0; i<8; i++) + if(file_data[i+1]&0x02) chunks_in_file++; + + if (chunks_in_file*0x2000+0x09 != file_size) + { + free (file_data); + logerror ("File corrupted\n"); + return IMAGE_INIT_FAIL; + } + + switch (file_data[0x00]) + { + case 0x00: logerror ("DOCK cart\n"); + timex_cart.type = TIMEX_CART_DOCK; + timex_cart.data = (UINT8*) malloc (0x10000); + if (!timex_cart.data) + { + free (file_data); + logerror ("Memory allocate error\n"); + return IMAGE_INIT_FAIL; + } + chunks_in_file = 0; + for (i=0; i<8; i++) + { + timex_cart.chunks = timex_cart.chunks | ((file_data[i+1]&0x01)<space(AS_PROGRAM); - - if (!file_type) - goto error; - - if (!mame_stricmp(file_type, "prg")) - { - /* prg files */ - } - else if (!mame_stricmp(file_type, "p00")) - { - /* p00 files */ - if (image.fread( buffer, sizeof(buffer)) != sizeof(buffer)) - goto error; - if (memcmp(buffer, "C64File", sizeof(buffer))) - goto error; - image.fseek(26, SEEK_SET); - snapshot_size -= 26; - } - else if (!mame_stricmp(file_type, "t64")) - { - /* t64 files - for GB64 Single T64s loading to x0801 - header is always the same size */ - if (image.fread( buffer, sizeof(buffer)) != sizeof(buffer)) - goto error; - if (memcmp(buffer, "C64 tape image file", sizeof(buffer))) - goto error; - image.fseek(94, SEEK_SET); - snapshot_size -= 94; - } - else - { - goto error; - } - - image.fread( &address, 2); - address = LITTLE_ENDIANIZE_INT16(address); - if (!mame_stricmp(file_type, "t64")) - address = 2049; - snapshot_size -= 2; - - data = (UINT8*)malloc(snapshot_size); - if (!data) - goto error; - - bytesread = image.fread( data, snapshot_size); - if (bytesread != snapshot_size) - goto error; - - for (i = 0; i < snapshot_size; i++) - space.write_byte(address + i + offset, data[i]); - - cbm_sethiaddress(image.device().machine(), address + snapshot_size); - free(data); - return IMAGE_INIT_PASS; - -error: - if (data) - free(data); - return IMAGE_INIT_FAIL; -} - -static void cbm_quick_sethiaddress( running_machine &machine, UINT16 hiaddress ) -{ - address_space &space = machine.firstcpu->space(AS_PROGRAM); - - space.write_byte(0x31, hiaddress & 0xff); - space.write_byte(0x2f, hiaddress & 0xff); - space.write_byte(0x2d, hiaddress & 0xff); - space.write_byte(0x32, hiaddress >> 8); - space.write_byte(0x30, hiaddress >> 8); - space.write_byte(0x2e, hiaddress >> 8); -} - -QUICKLOAD_LOAD( cbm_c16 ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_quick_sethiaddress); -} - -QUICKLOAD_LOAD( cbm_c64 ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_quick_sethiaddress); -} - -QUICKLOAD_LOAD( cbm_vc20 ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_quick_sethiaddress); -} - -static void cbm_pet_quick_sethiaddress( running_machine &machine, UINT16 hiaddress ) -{ - address_space &space = machine.firstcpu->space(AS_PROGRAM); - - space.write_byte(0x2e, hiaddress & 0xff); - space.write_byte(0x2c, hiaddress & 0xff); - space.write_byte(0x2a, hiaddress & 0xff); - space.write_byte(0x2f, hiaddress >> 8); - space.write_byte(0x2d, hiaddress >> 8); - space.write_byte(0x2b, hiaddress >> 8); -} - -QUICKLOAD_LOAD( cbm_pet ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_pet_quick_sethiaddress); -} - -static void cbm_pet1_quick_sethiaddress(running_machine &machine, UINT16 hiaddress) -{ - address_space &space = machine.firstcpu->space(AS_PROGRAM); - - space.write_byte(0x80, hiaddress & 0xff); - space.write_byte(0x7e, hiaddress & 0xff); - space.write_byte(0x7c, hiaddress & 0xff); - space.write_byte(0x81, hiaddress >> 8); - space.write_byte(0x7f, hiaddress >> 8); - space.write_byte(0x7d, hiaddress >> 8); -} - -QUICKLOAD_LOAD( cbm_pet1 ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_pet1_quick_sethiaddress); -} - -static void cbmb_quick_sethiaddress(running_machine &machine, UINT16 hiaddress) -{ - address_space &space = machine.firstcpu->space(AS_PROGRAM); - - space.write_byte(0xf0046, hiaddress & 0xff); - space.write_byte(0xf0047, hiaddress >> 8); -} - -QUICKLOAD_LOAD( cbmb ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0x10000, cbmb_quick_sethiaddress); -} - -QUICKLOAD_LOAD( p500 ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbmb_quick_sethiaddress); -} - -static void cbm_c65_quick_sethiaddress( running_machine &machine, UINT16 hiaddress ) -{ - address_space &space = machine.firstcpu->space(AS_PROGRAM); - - space.write_byte(0x82, hiaddress & 0xff); - space.write_byte(0x83, hiaddress >> 8); -} - -QUICKLOAD_LOAD( cbm_c65 ) -{ - return general_cbm_loadsnap(image, file_type, quickload_size, 0, cbm_c65_quick_sethiaddress); -} diff --git a/src/mess/formats/timex_dck.c b/src/mess/formats/timex_dck.c deleted file mode 100644 index 9aa5d60aa5d..00000000000 --- a/src/mess/formats/timex_dck.c +++ /dev/null @@ -1,128 +0,0 @@ -/*************************************************************************** - - mess/formats/timex_dsk.c - - Functions to emulate general aspects of the machine (RAM, ROM, interrupts, - I/O ports) - - Changes: - - KT 31/1/00 - Added support for .Z80. At the moment only 48k files are supported! - DJR 8/2/00 - Added checks to avoid trying to load 128K .Z80 files into 48K machine! - DJR 20/2/00 - Added support for .TAP files. - -----------------27/02/00 10:54------------------- - KT 27/2/00 - Added my changes for the WAV support - -------------------------------------------------- - DJR 14/3/00 - Fixed +3 tape loading and added option to 'rewind' tapes when end reached. - DJR 21/4/00 - Added support for 128K .SNA and .Z80 files. - DJR 21/4/00 - Ensure 48K Basic ROM is used when running 48K snapshots on 128K machine. - DJR 03/5/00 - Fixed bug of not decoding last byte of .Z80 blocks. - DJR 08/5/00 - Fixed TS2068 .TAP loading. - DJR 19/5/00 - .TAP files are now classified as cassette files. - DJR 02/6/00 - Added support for .SCR files (screendumps). - -***************************************************************************/ - -#include "emu.h" -#include "formats/timex_dck.h" -#include "sound/ay8910.h" - - -static timex_cart_t timex_cart; - - -DEVICE_IMAGE_LOAD_LEGACY( timex_cart ) -{ - int file_size; - UINT8 * file_data; - - int chunks_in_file = 0; - - int i; - - logerror ("Trying to load cart\n"); - - file_size = image.length(); - - if (file_size < 0x09) - { - logerror ("Bad file size\n"); - return IMAGE_INIT_FAIL; - } - - file_data = (UINT8 *)malloc(file_size); - if (file_data == NULL) - { - logerror ("Memory allocating error\n"); - return IMAGE_INIT_FAIL; - } - - image.fread(file_data, file_size); - - for (i=0; i<8; i++) - if(file_data[i+1]&0x02) chunks_in_file++; - - if (chunks_in_file*0x2000+0x09 != file_size) - { - free (file_data); - logerror ("File corrupted\n"); - return IMAGE_INIT_FAIL; - } - - switch (file_data[0x00]) - { - case 0x00: logerror ("DOCK cart\n"); - timex_cart.type = TIMEX_CART_DOCK; - timex_cart.data = (UINT8*) malloc (0x10000); - if (!timex_cart.data) - { - free (file_data); - logerror ("Memory allocate error\n"); - return IMAGE_INIT_FAIL; - } - chunks_in_file = 0; - for (i=0; i<8; i++) - { - timex_cart.chunks = timex_cart.chunks | ((file_data[i+1]&0x01)<fseek(7, SEEK_SET); - - while((ch = image->fgetc()) != 0x1A) - { - if (ch == EOF) - { - image->seterror(IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file name"); - image->message(" Unexpected EOF while getting file name"); - return IMAGE_INIT_FAIL; - } - - if (ch != '\0') - { - if (i >= (ARRAY_LENGTH(pgmname) - 1)) - { - image->seterror(IMAGE_ERROR_INVALIDIMAGE, "File name too long"); - image->message(" File name too long"); - return IMAGE_INIT_FAIL; - } - - pgmname[i] = ch; /* build program name */ - i++; - } - } - - pgmname[i] = '\0'; /* terminate string with a null */ - - if (image->fread(args, sizeof(args)) != sizeof(args)) - { - image->seterror(IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file size"); - image->message(" Unexpected EOF while getting file size"); - return IMAGE_INIT_FAIL; - } - - exec_addr[0] = LITTLE_ENDIANIZE_INT16(args[0]); - start_addr[0] = LITTLE_ENDIANIZE_INT16(args[1]); - end_addr[0] = LITTLE_ENDIANIZE_INT16(args[2]); - - size = (end_addr[0] - start_addr[0] + 1) & 0xffff; - - /* display a message about the loaded quickload */ - image->message(" %s\nsize=%04X : start=%04X : end=%04X : exec=%04X",pgmname,size,start_addr[0],end_addr[0],exec_addr[0]); - - for (i = 0; i < size; i++) - { - j = (start_addr[0] + i) & 0xffff; - if (image->fread(&data, 1) != 1) - { - snprintf(message, ARRAY_LENGTH(message), "%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j); - image->seterror(IMAGE_ERROR_INVALIDIMAGE, message); - image->message("%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j); - return IMAGE_INIT_FAIL; - } - image->device().machine().device("maincpu")->memory().space(AS_PROGRAM).write_byte(j, data); - } - - return IMAGE_INIT_PASS; -} - - - -/*------------------------------------------------- - QUICKLOAD_LOAD( super80 ) --------------------------------------------------*/ - -QUICKLOAD_LOAD( super80 ) -{ - UINT16 exec_addr, start_addr, end_addr; - int autorun; - - /* load the binary into memory */ - if (z80bin_load_file(&image, file_type, &exec_addr, &start_addr, &end_addr) == IMAGE_INIT_FAIL) - return IMAGE_INIT_FAIL; - - /* is this file executable? */ - if (exec_addr != 0xffff) - { - /* check to see if autorun is on (I hate how this works) */ - autorun = image.device().machine().root_device().ioport("CONFIG")->read_safe(0xFF) & 1; - - if (autorun) - image.device().machine().device("maincpu")->state().set_pc(exec_addr); - } - - return IMAGE_INIT_PASS; -} - -/*------------------------------------------------- - QUICKLOAD_LOAD( mbee_z80bin ) --------------------------------------------------*/ - -QUICKLOAD_LOAD( mbee_z80bin ) -{ - UINT16 execute_address, start_addr, end_addr; - int autorun; - - /* load the binary into memory */ - if (z80bin_load_file(&image, file_type, &execute_address, &start_addr, &end_addr) == IMAGE_INIT_FAIL) - return IMAGE_INIT_FAIL; - - /* is this file executable? */ - if (execute_address != 0xffff) - { - /* check to see if autorun is on (I hate how this works) */ - autorun = image.device().machine().root_device().ioport("CONFIG")->read_safe(0xFF) & 1; - - device_t *cpu = image.device().machine().device("maincpu"); - address_space &space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM); - - space.write_word(0xa6, execute_address); /* fix the EXEC command */ - - if (autorun) - { - space.write_word(0xa2, execute_address); /* fix warm-start vector to get around some copy-protections */ - cpu->state().set_pc(execute_address); - } - else - { - space.write_word(0xa2, 0x8517); - } - } - - return IMAGE_INIT_PASS; -} - -/*------------------------------------------------- - QUICKLOAD_LOAD( sorcerer ) --------------------------------------------------*/ - -QUICKLOAD_LOAD( sorcerer ) -{ - UINT16 execute_address, start_address, end_address; - int autorun; - /* load the binary into memory */ - if (z80bin_load_file(&image, file_type, &execute_address, &start_address, &end_address) == IMAGE_INIT_FAIL) - return IMAGE_INIT_FAIL; - - /* is this file executable? */ - if (execute_address != 0xffff) - { - /* check to see if autorun is on (I hate how this works) */ - autorun = image.device().machine().root_device().ioport("CONFIG")->read_safe(0xFF) & 1; - - address_space &space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM); - - if ((execute_address >= 0xc000) && (execute_address <= 0xdfff) && (space.read_byte(0xdffa) != 0xc3)) - return IMAGE_INIT_FAIL; /* can't run a program if the cartridge isn't in */ - - /* Since Exidy Basic is by Microsoft, it needs some preprocessing before it can be run. - 1. A start address of 01D5 indicates a basic program which needs its pointers fixed up. - 2. If autorunning, jump to C689 (command processor), else jump to C3DD (READY prompt). - Important addresses: - 01D5 = start (load) address of a conventional basic program - C858 = an autorun basic program will have this exec address on the tape - C3DD = part of basic that displays READY and lets user enter input */ - - if ((start_address == 0x1d5) || (execute_address == 0xc858)) - { - UINT8 i; - static const UINT8 data[]={ - 0xcd, 0x26, 0xc4, // CALL C426 ;set up other pointers - 0x21, 0xd4, 1, // LD HL,01D4 ;start of program address (used by C689) - 0x36, 0, // LD (HL),00 ;make sure dummy end-of-line is there - 0xc3, 0x89, 0xc6 // JP C689 ;run program - }; - - for (i = 0; i < ARRAY_LENGTH(data); i++) - space.write_byte(0xf01f + i, data[i]); - - if (!autorun) - space.write_word(0xf028,0xc3dd); - - /* tell BASIC where program ends */ - space.write_byte(0x1b7, end_address & 0xff); - space.write_byte(0x1b8, (end_address >> 8) & 0xff); - - if ((execute_address != 0xc858) && autorun) - space.write_word(0xf028, execute_address); - - image.device().machine().device("maincpu")->state().set_pc(0xf01f); - } - else - { - if (autorun) - image.device().machine().device("maincpu")->state().set_pc(execute_address); - } - - } - - return IMAGE_INIT_PASS; -} diff --git a/src/mess/includes/c128.h b/src/mess/includes/c128.h index c24981580bd..d4d84e1d494 100644 --- a/src/mess/includes/c128.h +++ b/src/mess/includes/c128.h @@ -4,7 +4,7 @@ #define __C128__ #include "emu.h" -#include "formats/cbm_snqk.h" +#include "machine/cbm_snqk.h" #include "cpu/m6502/m8502.h" #include "machine/6526cia.h" #include "machine/c64exp.h" diff --git a/src/mess/includes/c64.h b/src/mess/includes/c64.h index 78cffe70dc9..4faaedada50 100644 --- a/src/mess/includes/c64.h +++ b/src/mess/includes/c64.h @@ -5,7 +5,7 @@ #include "emu.h" #include "cpu/m6502/m6510.h" -#include "formats/cbm_snqk.h" +#include "machine/cbm_snqk.h" #include "machine/c64exp.h" #include "machine/c64user.h" #include "machine/cbmiec.h" diff --git a/src/mess/includes/cbm2.h b/src/mess/includes/cbm2.h index 954ab8decc1..30526acbcd8 100644 --- a/src/mess/includes/cbm2.h +++ b/src/mess/includes/cbm2.h @@ -6,7 +6,7 @@ #include "emu.h" #include "cpu/m6502/m6509.h" #include "cpu/i86/i86.h" -#include "formats/cbm_snqk.h" +#include "machine/cbm_snqk.h" #include "includes/cbm.h" #include "machine/6525tpi.h" #include "machine/cbm2exp.h" diff --git a/src/mess/includes/mbee.h b/src/mess/includes/mbee.h index 8e87a3507be..b4538d6b521 100644 --- a/src/mess/includes/mbee.h +++ b/src/mess/includes/mbee.h @@ -216,7 +216,7 @@ extern const wd17xx_interface mbee_wd17xx_interface; extern const z80pio_interface mbee_z80pio_intf; QUICKLOAD_LOAD( mbee ); - +QUICKLOAD_LOAD( mbee_z80bin ); /*----------- defined in video/mbee.c -----------*/ diff --git a/src/mess/includes/pet2001.h b/src/mess/includes/pet2001.h index d92b7cb7a23..475f2140895 100644 --- a/src/mess/includes/pet2001.h +++ b/src/mess/includes/pet2001.h @@ -5,7 +5,7 @@ #include "emu.h" #include "cpu/m6502/m6502.h" -#include "formats/cbm_snqk.h" +#include "machine/cbm_snqk.h" #include "machine/6522via.h" #include "machine/6821pia.h" #include "machine/cbmipt.h" diff --git a/src/mess/includes/plus4.h b/src/mess/includes/plus4.h index f43ba4506d7..7486d0fd21d 100644 --- a/src/mess/includes/plus4.h +++ b/src/mess/includes/plus4.h @@ -5,7 +5,7 @@ #include "emu.h" #include "cpu/m6502/m7501.h" -#include "formats/cbm_snqk.h" +#include "machine/cbm_snqk.h" #include "machine/cbmiec.h" #include "machine/cbmipt.h" #include "machine/mos6529.h" diff --git a/src/mess/includes/sorcerer.h b/src/mess/includes/sorcerer.h index 2e157406f50..d81bbecb0f0 100644 --- a/src/mess/includes/sorcerer.h +++ b/src/mess/includes/sorcerer.h @@ -94,5 +94,6 @@ public: /*----------- defined in machine/sorcerer.c -----------*/ SNAPSHOT_LOAD( sorcerer ); +QUICKLOAD_LOAD(sorcerer); #endif /* SORCERER_H_ */ diff --git a/src/mess/includes/super80.h b/src/mess/includes/super80.h index e7a42dc62c3..33d6ac23851 100644 --- a/src/mess/includes/super80.h +++ b/src/mess/includes/super80.h @@ -120,3 +120,4 @@ MC6845_UPDATE_ROW( super80v_update_row ); /*----------- defined in machine/super80.c -----------*/ extern const z80pio_interface super80_pio_intf; +QUICKLOAD_LOAD( super80 ); \ No newline at end of file diff --git a/src/mess/includes/vic20.h b/src/mess/includes/vic20.h index 39edaf30122..3773825e908 100644 --- a/src/mess/includes/vic20.h +++ b/src/mess/includes/vic20.h @@ -6,7 +6,7 @@ #include "emu.h" #include "includes/cbm.h" -#include "formats/cbm_snqk.h" +#include "machine/cbm_snqk.h" #include "cpu/m6502/m6510.h" #include "imagedev/cartslot.h" #include "machine/6522via.h" diff --git a/src/mess/machine/c64exp.h b/src/mess/machine/c64exp.h index fbf3a41cf18..a0ae13715e1 100644 --- a/src/mess/machine/c64exp.h +++ b/src/mess/machine/c64exp.h @@ -38,7 +38,7 @@ #define __C64_EXPANSION_SLOT__ #include "emu.h" -#include "formats/cbm_crt.h" +#include "machine/cbm_crt.h" diff --git a/src/mess/formats/cbm_crt.c b/src/mess/machine/cbm_crt.c similarity index 98% rename from src/mess/formats/cbm_crt.c rename to src/mess/machine/cbm_crt.c index 4ecbe4dc076..954d5bc382f 100644 --- a/src/mess/formats/cbm_crt.c +++ b/src/mess/machine/cbm_crt.c @@ -1,12 +1,12 @@ /********************************************************************* - formats/cbm_crt.c + machine/cbm_crt.c Commodore VIC-20/C64 cartridge images *********************************************************************/ -#include "formats/cbm_crt.h" +#include "machine/cbm_crt.h" diff --git a/src/mess/formats/cbm_crt.h b/src/mess/machine/cbm_crt.h similarity index 99% rename from src/mess/formats/cbm_crt.h rename to src/mess/machine/cbm_crt.h index 8cc5e28af84..b73d98b46ca 100644 --- a/src/mess/formats/cbm_crt.h +++ b/src/mess/machine/cbm_crt.h @@ -1,6 +1,6 @@ /********************************************************************* - formats/cbm_crt.h + machine/cbm_crt.h Commodore VIC-20/C64 cartridge images diff --git a/src/mess/machine/cbm_snqk.c b/src/mess/machine/cbm_snqk.c new file mode 100644 index 00000000000..d2e35ed58e4 --- /dev/null +++ b/src/mess/machine/cbm_snqk.c @@ -0,0 +1,104 @@ +/*********************************************** + + CBM Quickloads + + ***********************************************/ + +#include "emu.h" +#include "machine/cbm_snqk.h" + +/* prg file format + * sfx file format + * sda file format + * 0 lsb 16bit address + * 2 chip data */ + +/* p00 file format (p00 .. p63, s00 .. s63, ..) + * 0x0000 C64File + * 0x0007 0 + * 0x0008 Name in commodore encoding? + * 0x0018 0 0 + * 0x001a lsb 16bit address + * 0x001c data */ + + +int general_cbm_loadsnap( device_image_interface &image, const char *file_type, int snapshot_size, + offs_t offset, void (*cbm_sethiaddress)(running_machine &machine, UINT16 hiaddress) ) +{ + char buffer[7]; + UINT8 *data = NULL; + UINT32 bytesread; + UINT16 address = 0; + int i; + address_space &space = image.device().machine().firstcpu->space(AS_PROGRAM); + + if (!file_type) + goto error; + + if (!mame_stricmp(file_type, "prg")) + { + /* prg files */ + } + else if (!mame_stricmp(file_type, "p00")) + { + /* p00 files */ + if (image.fread( buffer, sizeof(buffer)) != sizeof(buffer)) + goto error; + if (memcmp(buffer, "C64File", sizeof(buffer))) + goto error; + image.fseek(26, SEEK_SET); + snapshot_size -= 26; + } + else if (!mame_stricmp(file_type, "t64")) + { + /* t64 files - for GB64 Single T64s loading to x0801 - header is always the same size */ + if (image.fread( buffer, sizeof(buffer)) != sizeof(buffer)) + goto error; + if (memcmp(buffer, "C64 tape image file", sizeof(buffer))) + goto error; + image.fseek(94, SEEK_SET); + snapshot_size -= 94; + } + else + { + goto error; + } + + image.fread( &address, 2); + address = LITTLE_ENDIANIZE_INT16(address); + if (!mame_stricmp(file_type, "t64")) + address = 2049; + snapshot_size -= 2; + + data = (UINT8*)malloc(snapshot_size); + if (!data) + goto error; + + bytesread = image.fread( data, snapshot_size); + if (bytesread != snapshot_size) + goto error; + + for (i = 0; i < snapshot_size; i++) + space.write_byte(address + i + offset, data[i]); + + cbm_sethiaddress(image.device().machine(), address + snapshot_size); + free(data); + return IMAGE_INIT_PASS; + +error: + if (data) + free(data); + return IMAGE_INIT_FAIL; +} + +void cbm_quick_sethiaddress( running_machine &machine, UINT16 hiaddress ) +{ + address_space &space = machine.firstcpu->space(AS_PROGRAM); + + space.write_byte(0x31, hiaddress & 0xff); + space.write_byte(0x2f, hiaddress & 0xff); + space.write_byte(0x2d, hiaddress & 0xff); + space.write_byte(0x32, hiaddress >> 8); + space.write_byte(0x30, hiaddress >> 8); + space.write_byte(0x2e, hiaddress >> 8); +} diff --git a/src/mess/formats/cbm_snqk.h b/src/mess/machine/cbm_snqk.h similarity index 50% rename from src/mess/formats/cbm_snqk.h rename to src/mess/machine/cbm_snqk.h index 56390f18f0f..1040f48bf14 100644 --- a/src/mess/formats/cbm_snqk.h +++ b/src/mess/machine/cbm_snqk.h @@ -11,13 +11,8 @@ #define CBM_QUICKLOAD_DELAY_SECONDS 3 -QUICKLOAD_LOAD( cbm_pet1 ); -QUICKLOAD_LOAD( cbm_pet ); -QUICKLOAD_LOAD( cbm_c16 ); -QUICKLOAD_LOAD( cbm_c64 ); -QUICKLOAD_LOAD( cbm_vc20 ); -QUICKLOAD_LOAD( cbmb ); -QUICKLOAD_LOAD( p500 ); -QUICKLOAD_LOAD( cbm_c65 ); +int general_cbm_loadsnap( device_image_interface &image, const char *file_type, int snapshot_size, + offs_t offset, void (*cbm_sethiaddress)(running_machine &machine, UINT16 hiaddress) ); +void cbm_quick_sethiaddress( running_machine &machine, UINT16 hiaddress ); #endif /* __CBM_SNQK_H__ */ diff --git a/src/mess/machine/mbee.c b/src/mess/machine/mbee.c index 039745fe7dd..0618f542cd9 100644 --- a/src/mess/machine/mbee.c +++ b/src/mess/machine/mbee.c @@ -10,7 +10,7 @@ #include "emu.h" #include "includes/mbee.h" - +#include "machine/z80bin.h" /*********************************************************** @@ -815,3 +815,42 @@ QUICKLOAD_LOAD( mbee ) return IMAGE_INIT_PASS; } + + +/*------------------------------------------------- + QUICKLOAD_LOAD( mbee_z80bin ) +-------------------------------------------------*/ + +QUICKLOAD_LOAD( mbee_z80bin ) +{ + UINT16 execute_address, start_addr, end_addr; + int autorun; + + /* load the binary into memory */ + if (z80bin_load_file(&image, file_type, &execute_address, &start_addr, &end_addr) == IMAGE_INIT_FAIL) + return IMAGE_INIT_FAIL; + + /* is this file executable? */ + if (execute_address != 0xffff) + { + /* check to see if autorun is on (I hate how this works) */ + autorun = image.device().machine().root_device().ioport("CONFIG")->read_safe(0xFF) & 1; + + device_t *cpu = image.device().machine().device("maincpu"); + address_space &space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM); + + space.write_word(0xa6, execute_address); /* fix the EXEC command */ + + if (autorun) + { + space.write_word(0xa2, execute_address); /* fix warm-start vector to get around some copy-protections */ + cpu->state().set_pc(execute_address); + } + else + { + space.write_word(0xa2, 0x8517); + } + } + + return IMAGE_INIT_PASS; +} \ No newline at end of file diff --git a/src/mess/machine/sorcerer.c b/src/mess/machine/sorcerer.c index d57b4086e78..e87bf287975 100644 --- a/src/mess/machine/sorcerer.c +++ b/src/mess/machine/sorcerer.c @@ -5,6 +5,7 @@ *******************************************************************************/ #include "includes/sorcerer.h" +#include "machine/z80bin.h" #if SORCERER_USING_RS232 @@ -418,3 +419,71 @@ void sorcerer_state::machine_reset() membank("boot")->set_entry(1); machine().scheduler().timer_set(attotime::from_usec(10), timer_expired_delegate(FUNC(sorcerer_state::sorcerer_reset),this)); } + + +/*------------------------------------------------- + QUICKLOAD_LOAD( sorcerer ) +-------------------------------------------------*/ + +QUICKLOAD_LOAD( sorcerer ) +{ + UINT16 execute_address, start_address, end_address; + int autorun; + /* load the binary into memory */ + if (z80bin_load_file(&image, file_type, &execute_address, &start_address, &end_address) == IMAGE_INIT_FAIL) + return IMAGE_INIT_FAIL; + + /* is this file executable? */ + if (execute_address != 0xffff) + { + /* check to see if autorun is on (I hate how this works) */ + autorun = image.device().machine().root_device().ioport("CONFIG")->read_safe(0xFF) & 1; + + address_space &space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM); + + if ((execute_address >= 0xc000) && (execute_address <= 0xdfff) && (space.read_byte(0xdffa) != 0xc3)) + return IMAGE_INIT_FAIL; /* can't run a program if the cartridge isn't in */ + + /* Since Exidy Basic is by Microsoft, it needs some preprocessing before it can be run. + 1. A start address of 01D5 indicates a basic program which needs its pointers fixed up. + 2. If autorunning, jump to C689 (command processor), else jump to C3DD (READY prompt). + Important addresses: + 01D5 = start (load) address of a conventional basic program + C858 = an autorun basic program will have this exec address on the tape + C3DD = part of basic that displays READY and lets user enter input */ + + if ((start_address == 0x1d5) || (execute_address == 0xc858)) + { + UINT8 i; + static const UINT8 data[]={ + 0xcd, 0x26, 0xc4, // CALL C426 ;set up other pointers + 0x21, 0xd4, 1, // LD HL,01D4 ;start of program address (used by C689) + 0x36, 0, // LD (HL),00 ;make sure dummy end-of-line is there + 0xc3, 0x89, 0xc6 // JP C689 ;run program + }; + + for (i = 0; i < ARRAY_LENGTH(data); i++) + space.write_byte(0xf01f + i, data[i]); + + if (!autorun) + space.write_word(0xf028,0xc3dd); + + /* tell BASIC where program ends */ + space.write_byte(0x1b7, end_address & 0xff); + space.write_byte(0x1b8, (end_address >> 8) & 0xff); + + if ((execute_address != 0xc858) && autorun) + space.write_word(0xf028, execute_address); + + image.device().machine().device("maincpu")->state().set_pc(0xf01f); + } + else + { + if (autorun) + image.device().machine().device("maincpu")->state().set_pc(execute_address); + } + + } + + return IMAGE_INIT_PASS; +} diff --git a/src/mess/formats/spec_snqk.c b/src/mess/machine/spec_snqk.c similarity index 99% rename from src/mess/formats/spec_snqk.c rename to src/mess/machine/spec_snqk.c index 6bc9b3377fa..88f514d0b65 100644 --- a/src/mess/formats/spec_snqk.c +++ b/src/mess/machine/spec_snqk.c @@ -1,6 +1,6 @@ /*************************************************************************** - mess/formats/spec_snqk.c + mess/machine/spec_snqk.c TODO: @@ -30,7 +30,7 @@ #include "cpu/z80/z80.h" #include "includes/spectrum.h" #include "sound/ay8910.h" -#include "formats/spec_snqk.h" +#include "machine/spec_snqk.h" #define LOAD_REG(_cpu, _reg, _data) \ do { \ diff --git a/src/mess/formats/spec_snqk.h b/src/mess/machine/spec_snqk.h similarity index 99% rename from src/mess/formats/spec_snqk.h rename to src/mess/machine/spec_snqk.h index 69e1987a8a1..7a0c156c788 100644 --- a/src/mess/formats/spec_snqk.h +++ b/src/mess/machine/spec_snqk.h @@ -1,6 +1,6 @@ /***************************************************************************** * - * formats/spec_snqk.h + * machine/spec_snqk.h * ****************************************************************************/ diff --git a/src/mess/machine/super80.c b/src/mess/machine/super80.c index 2fa5d5dd5ce..a694b932ee9 100644 --- a/src/mess/machine/super80.c +++ b/src/mess/machine/super80.c @@ -1,7 +1,7 @@ /* Super80.c written by Robbbert, 2005-2009. See driver source for documentation. */ #include "includes/super80.h" - +#include "machine/z80bin.h" /**************************** PIO ******************************************************************************/ @@ -228,3 +228,29 @@ DRIVER_INIT_MEMBER(super80_state,super80v) { driver_init_common(machine()); } + +/*------------------------------------------------- + QUICKLOAD_LOAD( super80 ) +-------------------------------------------------*/ + +QUICKLOAD_LOAD( super80 ) +{ + UINT16 exec_addr, start_addr, end_addr; + int autorun; + + /* load the binary into memory */ + if (z80bin_load_file(&image, file_type, &exec_addr, &start_addr, &end_addr) == IMAGE_INIT_FAIL) + return IMAGE_INIT_FAIL; + + /* is this file executable? */ + if (exec_addr != 0xffff) + { + /* check to see if autorun is on (I hate how this works) */ + autorun = image.device().machine().root_device().ioport("CONFIG")->read_safe(0xFF) & 1; + + if (autorun) + image.device().machine().device("maincpu")->state().set_pc(exec_addr); + } + + return IMAGE_INIT_PASS; +} \ No newline at end of file diff --git a/src/mess/machine/vic10exp.c b/src/mess/machine/vic10exp.c index 47e40af9d73..355a4b50fdc 100644 --- a/src/mess/machine/vic10exp.c +++ b/src/mess/machine/vic10exp.c @@ -9,7 +9,7 @@ #include "emu.h" #include "emuopts.h" -#include "formats/cbm_crt.h" +#include "machine/cbm_crt.h" #include "formats/imageutl.h" #include "machine/vic10exp.h" diff --git a/src/mess/machine/vic10exp.h b/src/mess/machine/vic10exp.h index e0f50cf197f..56b23e9155d 100644 --- a/src/mess/machine/vic10exp.h +++ b/src/mess/machine/vic10exp.h @@ -38,7 +38,7 @@ #define __VIC10_EXPANSION_SLOT__ #include "emu.h" -#include "formats/cbm_crt.h" +#include "machine/cbm_crt.h" diff --git a/src/mess/machine/vic20exp.c b/src/mess/machine/vic20exp.c index 3a8a49d62a9..3b594085852 100644 --- a/src/mess/machine/vic20exp.c +++ b/src/mess/machine/vic20exp.c @@ -9,7 +9,7 @@ #include "emu.h" #include "emuopts.h" -#include "formats/cbm_crt.h" +#include "machine/cbm_crt.h" #include "machine/vic20exp.h" #include "formats/imageutl.h" diff --git a/src/mess/machine/z80bin.c b/src/mess/machine/z80bin.c new file mode 100644 index 00000000000..86325850999 --- /dev/null +++ b/src/mess/machine/z80bin.c @@ -0,0 +1,75 @@ +#include "emu.h" +#include "machine/z80bin.h" + +/*------------------------------------------------- + z80bin_load_file - load a z80bin file into + memory +-------------------------------------------------*/ + +int z80bin_load_file(device_image_interface *image, const char *file_type, UINT16 *exec_addr, UINT16 *start_addr, UINT16 *end_addr ) +{ + int ch; + UINT16 args[3]; + UINT16 i=0, j, size; + UINT8 data; + char pgmname[256]; + char message[256]; + + image->fseek(7, SEEK_SET); + + while((ch = image->fgetc()) != 0x1A) + { + if (ch == EOF) + { + image->seterror(IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file name"); + image->message(" Unexpected EOF while getting file name"); + return IMAGE_INIT_FAIL; + } + + if (ch != '\0') + { + if (i >= (ARRAY_LENGTH(pgmname) - 1)) + { + image->seterror(IMAGE_ERROR_INVALIDIMAGE, "File name too long"); + image->message(" File name too long"); + return IMAGE_INIT_FAIL; + } + + pgmname[i] = ch; /* build program name */ + i++; + } + } + + pgmname[i] = '\0'; /* terminate string with a null */ + + if (image->fread(args, sizeof(args)) != sizeof(args)) + { + image->seterror(IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file size"); + image->message(" Unexpected EOF while getting file size"); + return IMAGE_INIT_FAIL; + } + + exec_addr[0] = LITTLE_ENDIANIZE_INT16(args[0]); + start_addr[0] = LITTLE_ENDIANIZE_INT16(args[1]); + end_addr[0] = LITTLE_ENDIANIZE_INT16(args[2]); + + size = (end_addr[0] - start_addr[0] + 1) & 0xffff; + + /* display a message about the loaded quickload */ + image->message(" %s\nsize=%04X : start=%04X : end=%04X : exec=%04X",pgmname,size,start_addr[0],end_addr[0],exec_addr[0]); + + for (i = 0; i < size; i++) + { + j = (start_addr[0] + i) & 0xffff; + if (image->fread(&data, 1) != 1) + { + snprintf(message, ARRAY_LENGTH(message), "%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j); + image->seterror(IMAGE_ERROR_INVALIDIMAGE, message); + image->message("%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j); + return IMAGE_INIT_FAIL; + } + image->device().machine().device("maincpu")->memory().space(AS_PROGRAM).write_byte(j, data); + } + + return IMAGE_INIT_PASS; +} diff --git a/src/mess/formats/z80bin.h b/src/mess/machine/z80bin.h similarity index 61% rename from src/mess/formats/z80bin.h rename to src/mess/machine/z80bin.h index be3c4220655..9547f2c1427 100644 --- a/src/mess/formats/z80bin.h +++ b/src/mess/machine/z80bin.h @@ -1,6 +1,6 @@ /********************************************************************* - formats/z80bin.h + machine/z80bin.h Quickload code for Z80 bin format @@ -11,10 +11,6 @@ #ifndef __Z80_BIN__ #define __Z80_BIN__ -#include "imagedev/snapquik.h" - -QUICKLOAD_LOAD( sorcerer ); -QUICKLOAD_LOAD( super80 ); -QUICKLOAD_LOAD( mbee_z80bin ); +int z80bin_load_file(device_image_interface *image, const char *file_type, UINT16 *exec_addr, UINT16 *start_addr, UINT16 *end_addr ); #endif diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 52f23a15988..8a02a883cf0 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -555,7 +555,7 @@ $(MESSOBJ)/shared.a: \ $(MESS_MACHINE)/ne1000.o \ $(MESS_MACHINE)/ne2000.o \ $(MESS_MACHINE)/3c503.o \ - $(MESS_FORMATS)/z80bin.o \ + $(MESS_MACHINE)/z80bin.o \ $(MESS_MACHINE)/mb8795.o \ $(MESS_MACHINE)/midiinport.o \ $(MESS_MACHINE)/midioutport.o \ @@ -958,8 +958,8 @@ $(MESSOBJ)/cbm.a: \ $(MESS_VIDEO)/vic4567.o \ $(MESS_VIDEO)/mos6566.o \ $(MESS_DRIVERS)/c900.o \ - $(MESS_FORMATS)/cbm_snqk.o \ - $(MESS_FORMATS)/cbm_crt.o \ + $(MESS_MACHINE)/cbm_snqk.o \ + $(MESS_MACHINE)/cbm_crt.o \ $(MESSOBJ)/cccp.a: \ $(MESS_DRIVERS)/argo.o \ @@ -1705,8 +1705,7 @@ $(MESSOBJ)/sinclair.a: \ $(MESS_DRIVERS)/atm.o \ $(MESS_DRIVERS)/pentagon.o \ $(MESS_MACHINE)/beta.o \ - $(MESS_FORMATS)/spec_snqk.o \ - $(MESS_FORMATS)/timex_dck.o \ + $(MESS_MACHINE)/spec_snqk.o \ $(MESS_DRIVERS)/ql.o \ $(MESS_VIDEO)/zx8301.o \ $(MESS_MACHINE)/zx8302.o \ diff --git a/src/mess/messcore.mak b/src/mess/messcore.mak index 6f71588a762..ca3f4702103 100644 --- a/src/mess/messcore.mak +++ b/src/mess/messcore.mak @@ -39,7 +39,6 @@ MAME_LAYOUT = $(MAMEOBJ)/layout # MESS directories MESS_AUDIO = $(MESSOBJ)/audio MESS_DRIVERS = $(MESSOBJ)/drivers -MESS_FORMATS = $(MESSOBJ)/formats MESS_LAYOUT = $(MESSOBJ)/layout MESS_MACHINE = $(MESSOBJ)/machine MESS_VIDEO = $(MESSOBJ)/video @@ -54,7 +53,6 @@ OBJDIRS += \ $(MAME_VIDEO) \ $(MESS_AUDIO) \ $(MESS_DRIVERS) \ - $(MESS_FORMATS) \ $(MESS_LAYOUT) \ $(MESS_MACHINE) \ $(MESS_VIDEO) \