From ce288627532e46a987ac3436f6d0fc8026356f6b Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Mon, 3 Nov 2014 12:35:14 +0100 Subject: enabled a few C64 cart types from fullpath (.crt format), sync castool with the supported tape formats + fixed misc typos and c'n'p mistakes reported by Riley110. nw. --- src/lib/formats/cbm_crt.c | 146 +++++++++++++++++++++++++----------------- src/lib/formats/esq16_dsk.c | 2 +- src/lib/formats/esq8_dsk.c | 2 +- src/lib/formats/p6001_cas.c | 2 +- src/lib/formats/p6001_cas.h | 2 +- src/lib/formats/pc98fdi_dsk.c | 2 +- src/mess/drivers/lviv.c | 2 +- src/mess/drivers/sh4robot.c | 2 +- src/mess/drivers/svi318.c | 2 +- src/mess/tools/castool/main.c | 73 +++++++++++++-------- 10 files changed, 141 insertions(+), 94 deletions(-) diff --git a/src/lib/formats/cbm_crt.c b/src/lib/formats/cbm_crt.c index fd44e061376..6ce4cc992d8 100644 --- a/src/lib/formats/cbm_crt.c +++ b/src/lib/formats/cbm_crt.c @@ -4,14 +4,44 @@ cbm_crt.c - Commodore C64 cartridge images + Commodore C64 cartridge images in .CRT format + + This format was introduced in the CCS64 emulator by Per Hakan + Sundell. + + Header info based on the VICE manual chapter 15.11, which in turn + is based on CRT.txt rev 1.14 compiled by Peter Schepers, with + additional contributions by Per Hakan Sundell, Markus Brenner, + and Marco Van Den Heuvel. + Relevant links: + http://vice-emu.sourceforge.net/vice_15.html#SEC300 + http://ist.uwaterloo.ca/~schepers/formats/CRT.TXT (version 1.13, outdated) + + Header Contents (bytes $0000-003F): + Bytes $0000-000F - 16-byte cartridge signature "C64 CARTRIDGE" (padded with spaces) + $0010-0013 - File header length + $0014-0015 - Cartridge version (high/low, presently 01.00) + $0016-0017 - Cartridge hardware type ($0000, high/low), see below + $0018 - Cartridge port EXROM line status (0 = inactive, 1 = active) + $0019 - Cartridge port GAME line status (0 = inactive, 1 = active) + $001A-001F - Reserved for future use + $0020-003F - 32-byte cartridge name (uppercase, padded with null characters) + + CHIP Packet Contents (starting from $0040; there can be multiple CHIP packets + in a single CRT file): + Bytes $0040-0043 - Contained ROM signature "CHIP" + $0044-0047 - Total packet length (ROM image size and header combined) (high/low format) + $0048-0049 - Chip type (0 = ROM, 1 = RAM (no ROM data), 2 = Flash ROM) + $004A-004B - Bank number + $004C-004D - Starting load address (high/low format) + $004E-004F - ROM image size in bytes (high/low format, typically $2000 or $4000) + $0050-xxxx - ROM data *********************************************************************/ #include "cbm_crt.h" - //************************************************************************** // MACROS/CONSTANTS //************************************************************************** @@ -22,62 +52,62 @@ // slot names for the C64 cartridge types static const char * CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] = { - "standard", - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - "simons_basic", - "ocean", - UNSUPPORTED, - "fun_play", - "super_games", - UNSUPPORTED, - "epyxfastload", - "westermann", - "rex", - UNSUPPORTED, - "magic_formel", - "system3", - "warp_speed", - "dinamic", - "zaxxon", - "magic_desk", - UNSUPPORTED, - "comal80", - "struct_basic", - "ross", - "ep64", - "ep7x8", - "dela_ep256", - "rex_ep256", - "mikroasm", - UNSUPPORTED, - UNSUPPORTED, - "stardos", - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - "ieee488", - UNSUPPORTED, - UNSUPPORTED, - "exos", - UNSUPPORTED, - UNSUPPORTED, - UNSUPPORTED, - "super_explode", - UNSUPPORTED, - UNSUPPORTED, - "mach5", - UNSUPPORTED, - "pagefox", - UNSUPPORTED, - "silverrock" + "standard", // 0 - Normal cartridge + UNSUPPORTED, // 1 - Action Replay + UNSUPPORTED, // 2 - KCS Power Cartridge + "final3", // 3 - Final Cartridge III + "simons_basic", // 4 - Simons' BASIC + "ocean", // 5 - Ocean type 1 + UNSUPPORTED, // 6 - Expert Cartridge + "fun_play", // 7 - Fun Play, Power Play + "super_games", // 8 - Super Games + UNSUPPORTED, // 9 - Atomic Power + "epyxfastload", // 10 - Epyx Fastload + "westermann", // 11 - Westermann Learning + "rex", // 12 - Rex Utility + "final", // 13 - Final Cartridge I + "magic_formel", // 14 - Magic Formel + "system3", // 15 - C64 Game System, System 3 + "warp_speed", // 16 - Warp Speed + "dinamic", // 17 - Dinamic + "zaxxon", // 18 - Zaxxon, Super Zaxxon (SEGA) + "magic_desk", // 19 - Magic Desk, Domark, HES Australia + UNSUPPORTED, // 20 - Super Snapshot V5 + "comal80", // 21 - Comal-80 + "struct_basic", // 22 - Structured BASIC + "ross", // 23 - Ross + "ep64", // 24 - Dela EP64 + "ep7x8", // 25 - Dela EP7x8 + "dela_ep256", // 26 - Dela EP256 + "rex_ep256", // 27 - Rex EP256 + "mikroasm", // 28 - Mikro Assembler + UNSUPPORTED, // 29 - Final Cartridge Plus + UNSUPPORTED, // 30 - Action Replay 4 + "stardos", // 31 - Stardos + "easyflash", // 32 - EasyFlash + UNSUPPORTED, // 33 - EasyFlash Xbank + UNSUPPORTED, // 34 - Capture + UNSUPPORTED, // 35 - Action Replay 3 + UNSUPPORTED, // 36 - Retro Replay + UNSUPPORTED, // 37 - MMC64 + UNSUPPORTED, // 38 - MMC Replay + "ide64", // 39 - IDE64 + UNSUPPORTED, // 40 - Super Snapshot V4 + "ieee488", // 41 - IEEE-488 + UNSUPPORTED, // 42 - Game Killer + "prophet64", // 43 - Prophet64 + "exos", // 44 - EXOS + UNSUPPORTED, // 45 - Freeze Frame + UNSUPPORTED, // 46 - Freeze Machine + UNSUPPORTED, // 47 - Snapshot64 + "super_explode", // 48 - Super Explode V5.0 + "magic_voice", // 49 - Magic Voice + UNSUPPORTED, // 50 - Action Replay 2 + "mach5", // 51 - MACH 5 + UNSUPPORTED, // 52 - Diashow-Maker + "pagefox", // 53 - Pagefox + UNSUPPORTED, // 54 - ? + "silverrock" // 55 - Silverrock }; diff --git a/src/lib/formats/esq16_dsk.c b/src/lib/formats/esq16_dsk.c index e5d5c0f65cd..4b370cfe0bd 100644 --- a/src/lib/formats/esq16_dsk.c +++ b/src/lib/formats/esq16_dsk.c @@ -50,7 +50,7 @@ esqimg_format::esqimg_format() const char *esqimg_format::name() const { - return "img"; + return "esq16"; } const char *esqimg_format::description() const diff --git a/src/lib/formats/esq8_dsk.c b/src/lib/formats/esq8_dsk.c index 08fcb5bd7d1..8af0bc46a84 100644 --- a/src/lib/formats/esq8_dsk.c +++ b/src/lib/formats/esq8_dsk.c @@ -52,7 +52,7 @@ esq8img_format::esq8img_format() const char *esq8img_format::name() const { - return "img"; + return "esq8"; } const char *esq8img_format::description() const diff --git a/src/lib/formats/p6001_cas.c b/src/lib/formats/p6001_cas.c index baf223d060f..78e5e929963 100644 --- a/src/lib/formats/p6001_cas.c +++ b/src/lib/formats/p6001_cas.c @@ -1,5 +1,5 @@ /* - * Nec PC-6001 cassette format handling + * NEC PC-6001 cassette format handling */ #include "p6001_cas.h" diff --git a/src/lib/formats/p6001_cas.h b/src/lib/formats/p6001_cas.h index a79a3a149b1..2006bbb9794 100644 --- a/src/lib/formats/p6001_cas.h +++ b/src/lib/formats/p6001_cas.h @@ -1,5 +1,5 @@ /* - * Nec PC-6001 cassette format handling + * NEC PC-6001 cassette format handling */ #ifndef PC6001_CAS_H_ diff --git a/src/lib/formats/pc98fdi_dsk.c b/src/lib/formats/pc98fdi_dsk.c index d1859981305..81aeaf7a42b 100644 --- a/src/lib/formats/pc98fdi_dsk.c +++ b/src/lib/formats/pc98fdi_dsk.c @@ -17,7 +17,7 @@ pc98fdi_format::pc98fdi_format() const char *pc98fdi_format::name() const { - return "pc98-fdi"; + return "pc98_fdi"; } const char *pc98fdi_format::description() const diff --git a/src/mess/drivers/lviv.c b/src/mess/drivers/lviv.c index 1d46246facc..6f907c01be1 100644 --- a/src/mess/drivers/lviv.c +++ b/src/mess/drivers/lviv.c @@ -486,4 +486,4 @@ ROM_START(lviv) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1989, lviv, 0, 0, lviv, lviv, driver_device, 0, "V. I. Lenin", "Lviv" , 0 ) +COMP( 1989, lviv, 0, 0, lviv, lviv, driver_device, 0, "V. I. Lenin", "PK-01 Lviv" , 0 ) diff --git a/src/mess/drivers/sh4robot.c b/src/mess/drivers/sh4robot.c index 9e8870144c5..bfbfa9c2d9b 100644 --- a/src/mess/drivers/sh4robot.c +++ b/src/mess/drivers/sh4robot.c @@ -88,4 +88,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ -COMP( ????, sh4robot, 0, 0, sh4robot, sh4robot, driver_device, 0, "", "Robot", GAME_NOT_WORKING | GAME_NO_SOUND) +COMP( 20??, sh4robot, 0, 0, sh4robot, sh4robot, driver_device, 0, "", "Robot", GAME_NOT_WORKING | GAME_NO_SOUND) diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c index 22760446e70..cf3d933b7d5 100644 --- a/src/mess/drivers/svi318.c +++ b/src/mess/drivers/svi318.c @@ -165,7 +165,7 @@ static INPUT_PORTS_START( svi318 ) PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_BIT (0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left Grph") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(PGUP)) - PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rright Grph") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(PGDN)) + PORT_BIT (0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Grph") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(PGDN)) PORT_BIT (0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_BIT (0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Stop") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_BIT (0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) diff --git a/src/mess/tools/castool/main.c b/src/mess/tools/castool/main.c index 3223a69328f..4038588b6b7 100644 --- a/src/mess/tools/castool/main.c +++ b/src/mess/tools/castool/main.c @@ -20,27 +20,33 @@ #include "corestr.h" #include "formats/a26_cas.h" +#include "formats/ace_tap.h" +#include "formats/adam_cas.h" #include "formats/apf_apt.h" #include "formats/cbm_tap.h" #include "formats/cgen_cas.h" #include "formats/coco_cas.h" #include "formats/csw_cas.h" +#include "formats/fm7_cas.h" #include "formats/fmsx_cas.h" #include "formats/gtp_cas.h" #include "formats/hect_tap.h" -#include "formats/ace_tap.h" -#include "formats/adam_cas.h" #include "formats/kc_cas.h" #include "formats/kim1_cas.h" #include "formats/lviv_lvt.h" #include "formats/mz_cas.h" #include "formats/orao_cas.h" #include "formats/oric_tap.h" +#include "formats/p6001_cas.h" +#include "formats/phc25_cas.h" #include "formats/pmd_cas.h" #include "formats/primoptp.h" #include "formats/rk_cas.h" #include "formats/sc3000_bit.h" +#include "formats/sol_cas.h" +#include "formats/sorc_cas.h" #include "formats/sord_cas.h" +#include "formats/spc1000_cas.h" #include "formats/svi_cas.h" #include "formats/thom_cas.h" #include "formats/trs_cas.h" @@ -50,6 +56,7 @@ #include "formats/vg5k_cas.h" #include "formats/vt_cas.h" #include "formats/x07_cas.h" +#include "formats/x1_tap.h" #include "formats/zx81_p.h" struct SupportedCassetteFormats @@ -60,50 +67,60 @@ struct SupportedCassetteFormats }; const struct SupportedCassetteFormats formats[] = { - {"a26", a26_cassette_formats ,"Atari 2600"}, - {"ddp", coleco_adam_cassette_formats ,"Coleco Adam"}, + {"a26", a26_cassette_formats ,"Atari 2600 SuperCharger"}, {"apf", apf_cassette_formats ,"APF Imagination Machine"}, - {"cbm", cbm_cassette_formats ,"Commodore"}, - {"cgenie", cgenie_cassette_formats ,"Colour Genie"}, - {"coco", coco_cassette_formats ,"TRS-80 Radio Shack Color Computer Family"}, + {"bbc", bbc_cassette_formats ,"Acorn BBC & Electron"}, + {"cbm", cbm_cassette_formats ,"Commodore 8-bit series"}, + {"cdt", cdt_cassette_formats ,"Amstrad CPC"}, + {"cgenie", cgenie_cassette_formats ,"EACA Colour Genie"}, + {"coco", coco_cassette_formats ,"Tandy Radio Shack Color Computer"}, {"csw", csw_cassette_formats ,"Compressed Square Wave"}, - {"bbc", bbc_cassette_formats ,"BBC"}, - {"fmxs", fmsx_cassette_formats ,"MSX"}, - {"gtp", gtp_cassette_formats ,"Galaksija"}, - {"hector", hector_cassette_formats ,"Hector - k7 : classical, FOR : forth cassette "}, - {"jupiter", ace_cassette_formats ,"Jupiter"}, + {"ddp", coleco_adam_cassette_formats ,"Coleco ADAM"}, + {"fm7", fm7_cassette_formats ,"Fujitsu FM-7"}, + {"fmsx", fmsx_cassette_formats ,"MSX"}, + {"gtp", gtp_cassette_formats ,"Elektronika inzenjering Galaksija"}, + {"hector", hector_cassette_formats ,"Micronique Hector & Interact Family Computer"}, + {"jupiter", ace_cassette_formats ,"Jupiter Cantab Jupiter Ace"}, {"kc85", kc_cassette_formats ,"VEB Mikroelektronik KC 85"}, - {"kim1", kim1_cassette_formats ,"KIM-1"}, - {"lviv", lviv_lvt_format ,"Lviv"}, - {"mz", mz700_cassette_formats ,"Sharp MZ"}, - {"orao", orao_cassette_formats ,"Orao"}, - {"oric", oric_cassette_formats ,"Oric"}, - {"pmd85", pmd85_cassette_formats ,"PMD-85"}, - {"primo", primo_ptp_format ,"Primo"}, + {"kim1", kim1_cassette_formats ,"MOS KIM-1"}, + {"lviv", lviv_lvt_format ,"PK-01 Lviv"}, + {"mo5", mo5_cassette_formats ,"Thomson MO-series"}, + {"mz", mz700_cassette_formats ,"Sharp MZ-700"}, + {"orao", orao_cassette_formats ,"PEL Varazdin Orao"}, + {"oric", oric_cassette_formats ,"Tangerine Oric"}, + {"pc6001", pc6001_cassette_formats ,"NEC PC-6001"}, + {"phc25", phc25_cassette_formats ,"Sanyo PHC-25"}, + {"pmd85", pmd85_cassette_formats ,"Tesla PMD-85"}, + {"primo", primo_ptp_format ,"Microkey Primo"}, {"rku", rku_cassette_formats ,"UT-88"}, {"rk8", rk8_cassette_formats ,"Mikro-80"}, {"rks", rks_cassette_formats ,"Specialist"}, {"rko", rko_cassette_formats ,"Orion"}, {"rkr", rkr_cassette_formats ,"Radio-86RK"}, - {"rka", rka_cassette_formats ,"Apogee"}, + {"rka", rka_cassette_formats ,"Zavod BRA Apogee BK-01"}, {"rkm", rkm_cassette_formats ,"Mikrosha"}, - {"rkp", rkp_cassette_formats ,"Partner"}, + {"rkp", rkp_cassette_formats ,"SAM SKB VM Partner-01.01"}, {"sc3000", sc3000_cassette_formats ,"Sega SC-3000"}, + {"sol20", sol20_cassette_formats ,"PTC SOL-20"}, + {"sorcerer", sorcerer_cassette_formats ,"Exidy Sorcerer"}, {"sordm5", sordm5_cassette_formats ,"Sord M5"}, - {"svi", svi_cassette_formats ,"SVI"}, - {"to7", to7_cassette_formats ,"Thomson TO"}, - {"mo5", mo5_cassette_formats ,"Thomson MO"}, + {"spc1000", spc1000_cassette_formats ,"Samsung SPC-1000"}, + {"svi", svi_cassette_formats ,"Spectravideo SVI-318 & SVI-328"}, + {"to7", to7_cassette_formats ,"Thomson TO-series"}, {"trs80l2", trs80l2_cassette_formats ,"TRS-80 Level 2"}, {"tvc64", tvc64_cassette_formats ,"Videoton TVC 64"}, - {"tzx", tzx_cassette_formats ,"ZX Spectrum"}, - {"cdt", cdt_cassette_formats ,"Amstrad CPC"}, + {"tzx", tzx_cassette_formats ,"Sinclair ZX Spectrum"}, {"uef", uef_cassette_formats ,"Acorn Electron"}, - {"vg5k", vg5k_cassette_formats ,"VG 5000 k7"}, + {"vg5k", vg5k_cassette_formats ,"Philips VG 5000"}, {"vtech1", vtech1_cassette_formats ,"Video Technology Laser 110-310"}, {"vtech2", vtech2_cassette_formats ,"Video Technology Laser 350-700"}, {"x07", x07_cassette_formats ,"Canon X-07"}, - {"zx81_p", zx81_p_format ,"Sinclair ZX81"}, + {"x1", x1_cassette_formats ,"Sharp X1"}, {"zx80_o", zx80_o_format ,"Sinclair ZX80"}, + {"zx81_p", zx81_p_format ,"Sinclair ZX81"}, + + + {NULL,NULL,NULL} }; -- cgit v1.2.3