trunk/src/lib/formats/cbm_crt.c
| r241675 | r241676 | |
| 4 | 4 | |
| 5 | 5 | cbm_crt.c |
| 6 | 6 | |
| 7 | | Commodore C64 cartridge images |
| 7 | Commodore C64 cartridge images in .CRT format |
| 8 | 8 | |
| 9 | This format was introduced in the CCS64 emulator by Per Hakan |
| 10 | Sundell. |
| 11 | |
| 12 | Header info based on the VICE manual chapter 15.11, which in turn |
| 13 | is based on CRT.txt rev 1.14 compiled by Peter Schepers, with |
| 14 | additional contributions by Per Hakan Sundell, Markus Brenner, |
| 15 | and Marco Van Den Heuvel. |
| 16 | Relevant links: |
| 17 | http://vice-emu.sourceforge.net/vice_15.html#SEC300 |
| 18 | http://ist.uwaterloo.ca/~schepers/formats/CRT.TXT (version 1.13, outdated) |
| 19 | |
| 20 | Header Contents (bytes $0000-003F): |
| 21 | Bytes $0000-000F - 16-byte cartridge signature "C64 CARTRIDGE" (padded with spaces) |
| 22 | $0010-0013 - File header length |
| 23 | $0014-0015 - Cartridge version (high/low, presently 01.00) |
| 24 | $0016-0017 - Cartridge hardware type ($0000, high/low), see below |
| 25 | $0018 - Cartridge port EXROM line status (0 = inactive, 1 = active) |
| 26 | $0019 - Cartridge port GAME line status (0 = inactive, 1 = active) |
| 27 | $001A-001F - Reserved for future use |
| 28 | $0020-003F - 32-byte cartridge name (uppercase, padded with null characters) |
| 29 | |
| 30 | CHIP Packet Contents (starting from $0040; there can be multiple CHIP packets |
| 31 | in a single CRT file): |
| 32 | Bytes $0040-0043 - Contained ROM signature "CHIP" |
| 33 | $0044-0047 - Total packet length (ROM image size and header combined) (high/low format) |
| 34 | $0048-0049 - Chip type (0 = ROM, 1 = RAM (no ROM data), 2 = Flash ROM) |
| 35 | $004A-004B - Bank number |
| 36 | $004C-004D - Starting load address (high/low format) |
| 37 | $004E-004F - ROM image size in bytes (high/low format, typically $2000 or $4000) |
| 38 | $0050-xxxx - ROM data |
| 39 | |
| 9 | 40 | *********************************************************************/ |
| 10 | 41 | |
| 11 | 42 | #include "cbm_crt.h" |
| 12 | 43 | |
| 13 | 44 | |
| 14 | | |
| 15 | 45 | //************************************************************************** |
| 16 | 46 | // MACROS/CONSTANTS |
| 17 | 47 | //************************************************************************** |
| r241675 | r241676 | |
| 22 | 52 | // slot names for the C64 cartridge types |
| 23 | 53 | static const char * CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] = |
| 24 | 54 | { |
| 25 | | "standard", |
| 26 | | UNSUPPORTED, |
| 27 | | UNSUPPORTED, |
| 28 | | UNSUPPORTED, |
| 29 | | "simons_basic", |
| 30 | | "ocean", |
| 31 | | UNSUPPORTED, |
| 32 | | "fun_play", |
| 33 | | "super_games", |
| 34 | | UNSUPPORTED, |
| 35 | | "epyxfastload", |
| 36 | | "westermann", |
| 37 | | "rex", |
| 38 | | UNSUPPORTED, |
| 39 | | "magic_formel", |
| 40 | | "system3", |
| 41 | | "warp_speed", |
| 42 | | "dinamic", |
| 43 | | "zaxxon", |
| 44 | | "magic_desk", |
| 45 | | UNSUPPORTED, |
| 46 | | "comal80", |
| 47 | | "struct_basic", |
| 48 | | "ross", |
| 49 | | "ep64", |
| 50 | | "ep7x8", |
| 51 | | "dela_ep256", |
| 52 | | "rex_ep256", |
| 53 | | "mikroasm", |
| 54 | | UNSUPPORTED, |
| 55 | | UNSUPPORTED, |
| 56 | | "stardos", |
| 57 | | UNSUPPORTED, |
| 58 | | UNSUPPORTED, |
| 59 | | UNSUPPORTED, |
| 60 | | UNSUPPORTED, |
| 61 | | UNSUPPORTED, |
| 62 | | UNSUPPORTED, |
| 63 | | UNSUPPORTED, |
| 64 | | UNSUPPORTED, |
| 65 | | UNSUPPORTED, |
| 66 | | "ieee488", |
| 67 | | UNSUPPORTED, |
| 68 | | UNSUPPORTED, |
| 69 | | "exos", |
| 70 | | UNSUPPORTED, |
| 71 | | UNSUPPORTED, |
| 72 | | UNSUPPORTED, |
| 73 | | "super_explode", |
| 74 | | UNSUPPORTED, |
| 75 | | UNSUPPORTED, |
| 76 | | "mach5", |
| 77 | | UNSUPPORTED, |
| 78 | | "pagefox", |
| 79 | | UNSUPPORTED, |
| 80 | | "silverrock" |
| 55 | "standard", // 0 - Normal cartridge |
| 56 | UNSUPPORTED, // 1 - Action Replay |
| 57 | UNSUPPORTED, // 2 - KCS Power Cartridge |
| 58 | "final3", // 3 - Final Cartridge III |
| 59 | "simons_basic", // 4 - Simons' BASIC |
| 60 | "ocean", // 5 - Ocean type 1 |
| 61 | UNSUPPORTED, // 6 - Expert Cartridge |
| 62 | "fun_play", // 7 - Fun Play, Power Play |
| 63 | "super_games", // 8 - Super Games |
| 64 | UNSUPPORTED, // 9 - Atomic Power |
| 65 | "epyxfastload", // 10 - Epyx Fastload |
| 66 | "westermann", // 11 - Westermann Learning |
| 67 | "rex", // 12 - Rex Utility |
| 68 | "final", // 13 - Final Cartridge I |
| 69 | "magic_formel", // 14 - Magic Formel |
| 70 | "system3", // 15 - C64 Game System, System 3 |
| 71 | "warp_speed", // 16 - Warp Speed |
| 72 | "dinamic", // 17 - Dinamic |
| 73 | "zaxxon", // 18 - Zaxxon, Super Zaxxon (SEGA) |
| 74 | "magic_desk", // 19 - Magic Desk, Domark, HES Australia |
| 75 | UNSUPPORTED, // 20 - Super Snapshot V5 |
| 76 | "comal80", // 21 - Comal-80 |
| 77 | "struct_basic", // 22 - Structured BASIC |
| 78 | "ross", // 23 - Ross |
| 79 | "ep64", // 24 - Dela EP64 |
| 80 | "ep7x8", // 25 - Dela EP7x8 |
| 81 | "dela_ep256", // 26 - Dela EP256 |
| 82 | "rex_ep256", // 27 - Rex EP256 |
| 83 | "mikroasm", // 28 - Mikro Assembler |
| 84 | UNSUPPORTED, // 29 - Final Cartridge Plus |
| 85 | UNSUPPORTED, // 30 - Action Replay 4 |
| 86 | "stardos", // 31 - Stardos |
| 87 | "easyflash", // 32 - EasyFlash |
| 88 | UNSUPPORTED, // 33 - EasyFlash Xbank |
| 89 | UNSUPPORTED, // 34 - Capture |
| 90 | UNSUPPORTED, // 35 - Action Replay 3 |
| 91 | UNSUPPORTED, // 36 - Retro Replay |
| 92 | UNSUPPORTED, // 37 - MMC64 |
| 93 | UNSUPPORTED, // 38 - MMC Replay |
| 94 | "ide64", // 39 - IDE64 |
| 95 | UNSUPPORTED, // 40 - Super Snapshot V4 |
| 96 | "ieee488", // 41 - IEEE-488 |
| 97 | UNSUPPORTED, // 42 - Game Killer |
| 98 | "prophet64", // 43 - Prophet64 |
| 99 | "exos", // 44 - EXOS |
| 100 | UNSUPPORTED, // 45 - Freeze Frame |
| 101 | UNSUPPORTED, // 46 - Freeze Machine |
| 102 | UNSUPPORTED, // 47 - Snapshot64 |
| 103 | "super_explode", // 48 - Super Explode V5.0 |
| 104 | "magic_voice", // 49 - Magic Voice |
| 105 | UNSUPPORTED, // 50 - Action Replay 2 |
| 106 | "mach5", // 51 - MACH 5 |
| 107 | UNSUPPORTED, // 52 - Diashow-Maker |
| 108 | "pagefox", // 53 - Pagefox |
| 109 | UNSUPPORTED, // 54 - ? |
| 110 | "silverrock" // 55 - Silverrock |
| 81 | 111 | }; |
| 82 | 112 | |
| 83 | 113 | |
trunk/src/mess/tools/castool/main.c
| r241675 | r241676 | |
| 20 | 20 | #include "corestr.h" |
| 21 | 21 | |
| 22 | 22 | #include "formats/a26_cas.h" |
| 23 | #include "formats/ace_tap.h" |
| 24 | #include "formats/adam_cas.h" |
| 23 | 25 | #include "formats/apf_apt.h" |
| 24 | 26 | #include "formats/cbm_tap.h" |
| 25 | 27 | #include "formats/cgen_cas.h" |
| 26 | 28 | #include "formats/coco_cas.h" |
| 27 | 29 | #include "formats/csw_cas.h" |
| 30 | #include "formats/fm7_cas.h" |
| 28 | 31 | #include "formats/fmsx_cas.h" |
| 29 | 32 | #include "formats/gtp_cas.h" |
| 30 | 33 | #include "formats/hect_tap.h" |
| 31 | | #include "formats/ace_tap.h" |
| 32 | | #include "formats/adam_cas.h" |
| 33 | 34 | #include "formats/kc_cas.h" |
| 34 | 35 | #include "formats/kim1_cas.h" |
| 35 | 36 | #include "formats/lviv_lvt.h" |
| 36 | 37 | #include "formats/mz_cas.h" |
| 37 | 38 | #include "formats/orao_cas.h" |
| 38 | 39 | #include "formats/oric_tap.h" |
| 40 | #include "formats/p6001_cas.h" |
| 41 | #include "formats/phc25_cas.h" |
| 39 | 42 | #include "formats/pmd_cas.h" |
| 40 | 43 | #include "formats/primoptp.h" |
| 41 | 44 | #include "formats/rk_cas.h" |
| 42 | 45 | #include "formats/sc3000_bit.h" |
| 46 | #include "formats/sol_cas.h" |
| 47 | #include "formats/sorc_cas.h" |
| 43 | 48 | #include "formats/sord_cas.h" |
| 49 | #include "formats/spc1000_cas.h" |
| 44 | 50 | #include "formats/svi_cas.h" |
| 45 | 51 | #include "formats/thom_cas.h" |
| 46 | 52 | #include "formats/trs_cas.h" |
| r241675 | r241676 | |
| 50 | 56 | #include "formats/vg5k_cas.h" |
| 51 | 57 | #include "formats/vt_cas.h" |
| 52 | 58 | #include "formats/x07_cas.h" |
| 59 | #include "formats/x1_tap.h" |
| 53 | 60 | #include "formats/zx81_p.h" |
| 54 | 61 | |
| 55 | 62 | struct SupportedCassetteFormats |
| r241675 | r241676 | |
| 60 | 67 | }; |
| 61 | 68 | |
| 62 | 69 | const struct SupportedCassetteFormats formats[] = { |
| 63 | | {"a26", a26_cassette_formats ,"Atari 2600"}, |
| 64 | | {"ddp", coleco_adam_cassette_formats ,"Coleco Adam"}, |
| 70 | {"a26", a26_cassette_formats ,"Atari 2600 SuperCharger"}, |
| 65 | 71 | {"apf", apf_cassette_formats ,"APF Imagination Machine"}, |
| 66 | | {"cbm", cbm_cassette_formats ,"Commodore"}, |
| 67 | | {"cgenie", cgenie_cassette_formats ,"Colour Genie"}, |
| 68 | | {"coco", coco_cassette_formats ,"TRS-80 Radio Shack Color Computer Family"}, |
| 72 | {"bbc", bbc_cassette_formats ,"Acorn BBC & Electron"}, |
| 73 | {"cbm", cbm_cassette_formats ,"Commodore 8-bit series"}, |
| 74 | {"cdt", cdt_cassette_formats ,"Amstrad CPC"}, |
| 75 | {"cgenie", cgenie_cassette_formats ,"EACA Colour Genie"}, |
| 76 | {"coco", coco_cassette_formats ,"Tandy Radio Shack Color Computer"}, |
| 69 | 77 | {"csw", csw_cassette_formats ,"Compressed Square Wave"}, |
| 70 | | {"bbc", bbc_cassette_formats ,"BBC"}, |
| 71 | | {"fmxs", fmsx_cassette_formats ,"MSX"}, |
| 72 | | {"gtp", gtp_cassette_formats ,"Galaksija"}, |
| 73 | | {"hector", hector_cassette_formats ,"Hector - k7 : classical, FOR : forth cassette "}, |
| 74 | | {"jupiter", ace_cassette_formats ,"Jupiter"}, |
| 78 | {"ddp", coleco_adam_cassette_formats ,"Coleco ADAM"}, |
| 79 | {"fm7", fm7_cassette_formats ,"Fujitsu FM-7"}, |
| 80 | {"fmsx", fmsx_cassette_formats ,"MSX"}, |
| 81 | {"gtp", gtp_cassette_formats ,"Elektronika inzenjering Galaksija"}, |
| 82 | {"hector", hector_cassette_formats ,"Micronique Hector & Interact Family Computer"}, |
| 83 | {"jupiter", ace_cassette_formats ,"Jupiter Cantab Jupiter Ace"}, |
| 75 | 84 | {"kc85", kc_cassette_formats ,"VEB Mikroelektronik KC 85"}, |
| 76 | | {"kim1", kim1_cassette_formats ,"KIM-1"}, |
| 77 | | {"lviv", lviv_lvt_format ,"Lviv"}, |
| 78 | | {"mz", mz700_cassette_formats ,"Sharp MZ"}, |
| 79 | | {"orao", orao_cassette_formats ,"Orao"}, |
| 80 | | {"oric", oric_cassette_formats ,"Oric"}, |
| 81 | | {"pmd85", pmd85_cassette_formats ,"PMD-85"}, |
| 82 | | {"primo", primo_ptp_format ,"Primo"}, |
| 85 | {"kim1", kim1_cassette_formats ,"MOS KIM-1"}, |
| 86 | {"lviv", lviv_lvt_format ,"PK-01 Lviv"}, |
| 87 | {"mo5", mo5_cassette_formats ,"Thomson MO-series"}, |
| 88 | {"mz", mz700_cassette_formats ,"Sharp MZ-700"}, |
| 89 | {"orao", orao_cassette_formats ,"PEL Varazdin Orao"}, |
| 90 | {"oric", oric_cassette_formats ,"Tangerine Oric"}, |
| 91 | {"pc6001", pc6001_cassette_formats ,"NEC PC-6001"}, |
| 92 | {"phc25", phc25_cassette_formats ,"Sanyo PHC-25"}, |
| 93 | {"pmd85", pmd85_cassette_formats ,"Tesla PMD-85"}, |
| 94 | {"primo", primo_ptp_format ,"Microkey Primo"}, |
| 83 | 95 | {"rku", rku_cassette_formats ,"UT-88"}, |
| 84 | 96 | {"rk8", rk8_cassette_formats ,"Mikro-80"}, |
| 85 | 97 | {"rks", rks_cassette_formats ,"Specialist"}, |
| 86 | 98 | {"rko", rko_cassette_formats ,"Orion"}, |
| 87 | 99 | {"rkr", rkr_cassette_formats ,"Radio-86RK"}, |
| 88 | | {"rka", rka_cassette_formats ,"Apogee"}, |
| 100 | {"rka", rka_cassette_formats ,"Zavod BRA Apogee BK-01"}, |
| 89 | 101 | {"rkm", rkm_cassette_formats ,"Mikrosha"}, |
| 90 | | {"rkp", rkp_cassette_formats ,"Partner"}, |
| 102 | {"rkp", rkp_cassette_formats ,"SAM SKB VM Partner-01.01"}, |
| 91 | 103 | {"sc3000", sc3000_cassette_formats ,"Sega SC-3000"}, |
| 104 | {"sol20", sol20_cassette_formats ,"PTC SOL-20"}, |
| 105 | {"sorcerer", sorcerer_cassette_formats ,"Exidy Sorcerer"}, |
| 92 | 106 | {"sordm5", sordm5_cassette_formats ,"Sord M5"}, |
| 93 | | {"svi", svi_cassette_formats ,"SVI"}, |
| 94 | | {"to7", to7_cassette_formats ,"Thomson TO"}, |
| 95 | | {"mo5", mo5_cassette_formats ,"Thomson MO"}, |
| 107 | {"spc1000", spc1000_cassette_formats ,"Samsung SPC-1000"}, |
| 108 | {"svi", svi_cassette_formats ,"Spectravideo SVI-318 & SVI-328"}, |
| 109 | {"to7", to7_cassette_formats ,"Thomson TO-series"}, |
| 96 | 110 | {"trs80l2", trs80l2_cassette_formats ,"TRS-80 Level 2"}, |
| 97 | 111 | {"tvc64", tvc64_cassette_formats ,"Videoton TVC 64"}, |
| 98 | | {"tzx", tzx_cassette_formats ,"ZX Spectrum"}, |
| 99 | | {"cdt", cdt_cassette_formats ,"Amstrad CPC"}, |
| 112 | {"tzx", tzx_cassette_formats ,"Sinclair ZX Spectrum"}, |
| 100 | 113 | {"uef", uef_cassette_formats ,"Acorn Electron"}, |
| 101 | | {"vg5k", vg5k_cassette_formats ,"VG 5000 k7"}, |
| 114 | {"vg5k", vg5k_cassette_formats ,"Philips VG 5000"}, |
| 102 | 115 | {"vtech1", vtech1_cassette_formats ,"Video Technology Laser 110-310"}, |
| 103 | 116 | {"vtech2", vtech2_cassette_formats ,"Video Technology Laser 350-700"}, |
| 104 | 117 | {"x07", x07_cassette_formats ,"Canon X-07"}, |
| 118 | {"x1", x1_cassette_formats ,"Sharp X1"}, |
| 119 | {"zx80_o", zx80_o_format ,"Sinclair ZX80"}, |
| 105 | 120 | {"zx81_p", zx81_p_format ,"Sinclair ZX81"}, |
| 106 | | {"zx80_o", zx80_o_format ,"Sinclair ZX80"}, |
| 121 | |
| 122 | |
| 123 | |
| 107 | 124 | {NULL,NULL,NULL} |
| 108 | 125 | }; |
| 109 | 126 | |