From: Toni Wilen Date: Wed, 21 Jan 2015 16:03:46 +0000 (+0200) Subject: Nordic Power 3.2 and Pro Access 2.17. X-Git-Tag: 3100~116 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=6e0d47e2e897007079704b8aab296909e7d15ee2;p=francis%2Fwinuae.git Nordic Power 3.2 and Pro Access 2.17. --- diff --git a/ar.cpp b/ar.cpp index 73ed24ad..02fbb432 100644 --- a/ar.cpp +++ b/ar.cpp @@ -1551,7 +1551,7 @@ static int superiv_init (struct romdata *rd, struct zfile *f) hrtmem_rom = 1; memname1 = _T("nordic_f0"); memname2 = _T("nordic_f4"); - if (subtype == 70) { + if (rd->ver >= 3) { hrtmem_start += 0x60000; hrtmem_end += 0x60000; memname1 = _T("nordic_f6"); @@ -1667,7 +1667,7 @@ int action_replay_load (void) } rd = getromdatabyzfile(f); if (!rd) { - write_log (_T("Unknown cartridge ROM\n")); + write_log (_T("Unknown cartridge ROM '%s'\n"), currprefs.cartfile); } else { int type = rd->type & ROMTYPE_MASK; if (type == ROMTYPE_SUPERIV || rd->type == ROMTYPE_NORDIC || rd->type == ROMTYPE_XPOWER) { @@ -1693,6 +1693,7 @@ int action_replay_load (void) zfile_fread (armemory_rom, 1, ar_rom_file_size, f); zfile_fclose (f); if (ar_rom_file_size == 65536) { + // AR1 and Pro Access armodel = 1; arrom_start = 0xf00000; arrom_size = 0x10000; diff --git a/include/rommgr.h b/include/rommgr.h index 284a7f4c..31aaa9af 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -18,10 +18,11 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size); #define ROMTYPE_FREEZER 0x00080000 #define ROMTYPE_AR 0x00080001 -#define ROMTYPE_HRTMON 0x00080002 -#define ROMTYPE_NORDIC 0x00080003 -#define ROMTYPE_XPOWER 0x00080004 -#define ROMTYPE_SUPERIV 0x00080005 +#define ROMTYPE_AR2 0x00080002 +#define ROMTYPE_HRTMON 0x00080003 +#define ROMTYPE_NORDIC 0x00080004 +#define ROMTYPE_XPOWER 0x00080005 +#define ROMTYPE_SUPERIV 0x00080006 #define ROMTYPE_SCSI 0x00100000 #define ROMTYPE_A2091 0x00100001 diff --git a/rommgr.cpp b/rommgr.cpp index 39305333..d3795e4f 100644 --- a/rommgr.cpp +++ b/rommgr.cpp @@ -16,9 +16,10 @@ #include "zfile.h" #include "crc32.h" #include "fsdb.h" - #include "autoconf.h" +#define SAVE_ROM 0 + static struct romlist *rl; static int romlist_cnt; @@ -93,7 +94,7 @@ struct romdata *getromdatabypath (const TCHAR *path) return NULL; } -#define NEXT_ROM_ID 115 +#define NEXT_ROM_ID 117 static struct romheader romheaders[] = { { _T("Freezer Cartridges"), 1 }, @@ -232,20 +233,20 @@ static struct romdata roms[] = { ALTROM(52, 1, 1, 32768, ROMTYPE_EVEN | ROMTYPE_8BIT, 0x82d6eb87, 0x7c9bac11,0x28666017,0xeee6f019,0x63fb3890,0x7fbea355) ALTROM(52, 1, 2, 32768, ROMTYPE_ODD | ROMTYPE_8BIT, 0x40ae490c, 0x81d8e432,0x01b73fd9,0x2e204ebd,0x68af8602,0xb62ce397) { _T("Freezer: Action Replay Mk I v1.50"), 1, 50, 1, 50, _T("AR\0"), 65536, 25, 0, 0, ROMTYPE_AR, 0, 1, NULL, - 0xd4ce0675, 0x843B433B,0x2C56640E,0x045D5FDC,0x854DC6B1,0xA4964E7C }, + 0xf82c4258, 0x843B433B,0x2C56640E,0x045D5FDC,0x854DC6B1,0xA4964E7C }, ALTROM(25, 1, 1, 32768, ROMTYPE_EVEN | ROMTYPE_8BIT, 0x7fbd6de2, 0xb5f71a5c,0x09d65ecc,0xa8a3bc93,0x93558461,0xca190228) ALTROM(25, 1, 2, 32768, ROMTYPE_ODD | ROMTYPE_8BIT, 0x43018069, 0xad8ff242,0xb2cbf125,0x1fc53a73,0x581cf57a,0xb69cee00) - { _T("Freezer: Action Replay Mk II v2.05"), 2, 5, 2, 5, _T("AR\0"), 131072, 26, 0, 0, ROMTYPE_AR, 0, 1, NULL, + { _T("Freezer: Action Replay Mk II v2.05"), 2, 5, 2, 5, _T("AR\0"), 131072, 26, 0, 0, ROMTYPE_AR2, 0, 1, NULL, 0x1287301f, 0xF6601DE8,0x888F0050,0x72BF562B,0x9F533BBC,0xAF1B0074 }, - { _T("Freezer: Action Replay Mk II v2.12"), 2, 12, 2, 12, _T("AR\0"), 131072, 27, 0, 0, ROMTYPE_AR, 0, 1, NULL, + { _T("Freezer: Action Replay Mk II v2.12"), 2, 12, 2, 12, _T("AR\0"), 131072, 27, 0, 0, ROMTYPE_AR2, 0, 1, NULL, 0x804d0361, 0x3194A07A,0x0A82D8B5,0xF2B6AEFA,0x3CA581D6,0x8BA8762B }, - { _T("Freezer: Action Replay Mk II v2.14"), 2, 14, 2, 14, _T("AR\0"), 131072, 28, 0, 0, ROMTYPE_AR, 0, 1, NULL, + { _T("Freezer: Action Replay Mk II v2.14"), 2, 14, 2, 14, _T("AR\0"), 131072, 28, 0, 0, ROMTYPE_AR2, 0, 1, NULL, 0x49650e4f, 0x255D6DF6,0x3A4EAB0A,0x838EB1A1,0x6A267B09,0x59DFF634 }, - { _T("Freezer: Action Replay Mk III v3.09"), 3, 9, 3, 9, _T("AR\0"), 262144, 29, 0, 0, ROMTYPE_AR, 0, 1, NULL, + { _T("Freezer: Action Replay Mk III v3.09"), 3, 9, 3, 9, _T("AR\0"), 262144, 29, 0, 0, ROMTYPE_AR2, 0, 1, NULL, 0x0ed9b5aa, 0x0FF3170A,0xBBF0CA64,0xC9DD93D6,0xEC0C7A01,0xB5436824 }, ALTROM(29, 1, 1, 131072, ROMTYPE_EVEN | ROMTYPE_8BIT, 0x2b84519f, 0x7841873b,0xf009d834,0x1dfa2794,0xb3751bac,0xf86adcc8) ALTROM(29, 1, 2, 131072, ROMTYPE_ODD | ROMTYPE_8BIT, 0x1d35bd56, 0x6464be16,0x26b51949,0x9e76e4e3,0x409e8016,0x515d48b6) - { _T("Freezer: Action Replay Mk III v3.17"), 3, 17, 3, 17, _T("AR\0"), 262144, 30, 0, 0, ROMTYPE_AR, 0, 1, NULL, + { _T("Freezer: Action Replay Mk III v3.17"), 3, 17, 3, 17, _T("AR\0"), 262144, 30, 0, 0, ROMTYPE_AR2, 0, 1, NULL, 0xc8a16406, 0x5D4987C2,0xE3FFEA8B,0x1B02E314,0x30EF190F,0x2DB76542 }, { _T("Freezer: Action Replay 1200"), 0, 0, 0, 0, _T("AR\0"), 262144, 47, 0, 0, ROMTYPE_AR, 0, 1, NULL, 0x8d760101, 0x0F6AB834,0x2810094A,0xC0642F62,0xBA42F78B,0xC0B07E6A }, @@ -274,6 +275,16 @@ static struct romdata roms[] = { 0x72850aef, 0x59c91d1f,0xa8f118f9,0x0bdba05a,0x9ae788d7,0x7a6cc7c9 }, ALTROM(70, 1, 1, 32768, ROMTYPE_EVEN|ROMTYPE_SCRAMBLED|ROMTYPE_8BIT, 0xf3330e1f,0x3a597db2,0xb7d11b6c,0xb8e13496,0xc215f223,0x88c4ca3c) ALTROM(70, 1, 2, 32768, ROMTYPE_ODD |ROMTYPE_SCRAMBLED|ROMTYPE_8BIT, 0xee58e0f9,0x4148f4cb,0xb42cec33,0x8ca144de,0xd4f54118,0xe0f185dd) + { _T("Freezer: Nordic Power v3.2"), 3, 2, 3, 2, _T("NPOWER\0"), 65536, 115, 0, 0, ROMTYPE_NORDIC, 0, 1, NULL, + 0x46158b6e, 0xd8c3f5af,0x5f109c61,0x5f6acb38,0x68fe6c06,0x580041b5 }, + ALTROM(115, 1, 1, 32768, ROMTYPE_EVEN|ROMTYPE_SCRAMBLED|ROMTYPE_8BIT, 0x4bfc71de,0x51914de0,0xdc0f055a,0x29ca188d,0xa7f61914,0xfdecbd07) + ALTROM(115, 1, 2, 32768, ROMTYPE_ODD |ROMTYPE_SCRAMBLED|ROMTYPE_8BIT, 0x923ec443,0x9f1e5334,0xaa620745,0xf4d0c50e,0x8736543b,0x6d4366c5) + { _T("Freezer: Pro Access v2.17"), 2, 17, 2, 17, _T("PROACCESS\0"), 65536, 116, 0, 0, ROMTYPE_AR, 0, 1, NULL, + 0xc4c265cd, 0x6a5c0d99,0x69a624dc,0x1b437aec,0x5dbcd4c7,0x2ce9064a }, + ALTROM(116, 1, 1, 32768, ROMTYPE_EVEN | ROMTYPE_8BIT, 0x1909f7e9, 0x5abe9b9d,0xaae328c8,0x134e2b62,0x7b33b698,0xe342afc2) + ALTROM(116, 1, 2, 32768, ROMTYPE_ODD | ROMTYPE_8BIT, 0xa3927c72, 0x7adc9352,0x2d112ae9,0x23b9a70d,0x951b1e7a,0xba800ea6) + + { _T("Freezer: HRTMon v2.33 (built-in)"), 0, 0, 0, 0, _T("HRTMON\0"), 0, 63, 0, 0, ROMTYPE_HRTMON, 0, 1, NULL, 0xffffffff, 0, 0, 0, 0, 0, _T("HRTMon") }, @@ -1002,11 +1013,11 @@ struct romdata *getromdatabydata (uae_u8 *rom, int size) get_sha1 (rom, size / 2, sha1); ret = checkromdata (sha1, size / 2, -1); if (!ret) { - /* ignore AR IO-port range until we have full dump */ + /* ignore AR2/3 IO-port range until we have full dump */ memcpy (tmp, rom, 4); memset (rom, 0, 4); get_sha1 (rom, size, sha1); - ret = checkromdata (sha1, size, ROMTYPE_AR); + ret = checkromdata (sha1, size, ROMTYPE_AR2); memcpy (rom, tmp, 4); } }//9 @@ -1214,6 +1225,16 @@ static int read_rom_file (uae_u8 *buf, const struct romdata *rd) return 1; } +#if SAVE_ROM +static void save_rom(uae_u8 *rom, int size) +{ + struct zfile *f; + f = zfile_fopen (_T("c:\\temp\\1.rom"), _T("wb")); + zfile_fwrite (rom, 1, size, f); + zfile_fclose(f); +} +#endif + struct zfile *read_rom (struct romdata *prd) { struct romdata *rd2 = prd; @@ -1313,6 +1334,11 @@ struct zfile *read_rom (struct romdata *prd) } add = 2; } + +#if SAVE_ROM + save_rom(buf, size); +#endif + if (notcrc32(crc32) || get_crc32(buf, size) == crc32) { ok = 1; }