diff --git a/A5200DS.nds b/A5200DS.nds index ad69c29..9c0909e 100644 Binary files a/A5200DS.nds and b/A5200DS.nds differ diff --git a/Makefile b/Makefile index ebb213e..b5a3988 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=1.8 +VERSION=1.8a #--------------------------------------------------------------------------------- .SUFFIXES: diff --git a/arm9/source/a5200utils.c b/arm9/source/a5200utils.c index 2c17016..d05d5ca 100644 --- a/arm9/source/a5200utils.c +++ b/arm9/source/a5200utils.c @@ -301,86 +301,73 @@ void VsoundHandler(void) targetIndex=(targetIndex + 1) % 368; } -const unsigned int palette_ntsc[256] = { - 0x000000, 0x1c1c1c, 0x393939, 0x595959, // 1 - 0x797979, 0x929292, 0xababab, 0xbcbcbc, - 0xcdcdcd, 0xd9d9d9, 0xe6e6e6, 0xececec, - 0xf2f2f2, 0xf8f8f8, 0xffffff, 0xffffff, - - 0x391701, 0x5e2304, 0x833008, 0xa54716, // 2 - 0xc85f24, 0xe37820, 0xff911d, 0xffab1d, - 0xffc51d, 0xffce34, 0xffd84c, 0xffe651, - 0xfff456, 0xfff977, 0xffff98, 0xffff98, - - 0x451904, 0x721e11, 0x9f241e, 0xb33a20, // 3 - 0xc85122, 0xe36920, 0xff811e, 0xff8c25, - 0xff982c, 0xffae38, 0xffc545, 0xffc559, - 0xffc66d, 0xffd587, 0xffe4a1, 0xffe4a1, - - 0x4a1704, 0x7e1a0d, 0xb21d17, 0xc82119, // 4 - 0xdf251c, 0xec3b38, 0xfa5255, 0xfc6161, - 0xff706e, 0xff7f7e, 0xff8f8f, 0xff9d9e, - 0xffabad, 0xffb9bd, 0xffc7ce, 0xffc7ce, - - 0x050568, 0x3b136d, 0x912640, 0x912640, // 5 - 0xa532a6, 0xb938ba, 0xcd3ecf, 0xdb47dd, - 0xea51eb, 0xf45ff5, 0xfe6dff, 0xfe7afd, - 0xff87fb, 0xff95fd, 0xffa4ff, 0xffa4ff, - - 0x280479, 0x400984, 0x590f90, 0x70249d, // 6 - 0x8839aa, 0xa441c3, 0xc04adc, 0xd054ed, - 0xe05eff, 0xe96dff, 0xf27cff, 0xf88aff, - 0xff98ff, 0xfea1ff, 0xfeabff, 0xfeabff, - - 0x35088a, 0x420aad, 0x500cd0, 0x6428d0, // 7 - 0x7945d0, 0x8d4bd4, 0xa251d9, 0xb058ec, - 0xbe60ff, 0xc56bff, 0xcc77ff, 0xd183ff, - 0xd790ff, 0xdb9dff, 0xdfaaff, 0xdfaaff, - - 0x051e81, 0x0626a5, 0x082fca, 0x263dd4, // 8 - 0x444cde, 0x4f5aee, 0x5a68ff, 0x6575ff, - 0x7183ff, 0x8091ff, 0x90a0ff, 0x97a9ff, - 0x9fb2ff, 0xafbeff, 0xc0cbff, 0xc0cbff, - - 0x0c048b, 0x2218a0, 0x382db5, 0x483ec7, // 9 - 0x584fda, 0x6159ec, 0x6b64ff, 0x7a74ff, - 0x8a84ff, 0x918eff, 0x9998ff, 0xa5a3ff, - 0xb1aeff, 0xb8b8ff, 0xc0c2ff, 0xc0c2ff, - - 0x1d295a, 0x1d3876, 0x1d4892, 0x1c5cac, // 10 - 0x1c71c6, 0x3286cf, 0x489bd9, 0x4ea8ec, - 0x55b6ff, 0x70c7ff, 0x8cd8ff, 0x93dbff, - 0x9bdfff, 0xafe4ff, 0xc3e9ff, 0xc3e9ff, - - 0x2f4302, 0x395202, 0x446103, 0x417a12, // 11 - 0x3e9421, 0x4a9f2e, 0x57ab3b, 0x5cbd55, - 0x61d070, 0x69e27a, 0x72f584, 0x7cfa8d, - 0x87ff97, 0x9affa6, 0xadffb6, 0xadffb6, - - 0x0a4108, 0x0d540a, 0x10680d, 0x137d0f, // 12 - 0x169212, 0x19a514, 0x1cb917, 0x1ec919, - 0x21d91b, 0x47e42d, 0x6ef040, 0x78f74d, - 0x83ff5b, 0x9aff7a, 0xb2ff9a, 0xb2ff9a, - - 0x04410b, 0x05530e, 0x066611, 0x077714, // 13 - 0x088817, 0x099b1a, 0x0baf1d, 0x48c41f, - 0x86d922, 0x8fe924, 0x99f927, 0xa8fc41, - 0xb7ff5b, 0xc9ff6e, 0xdcff81, 0xdcff81, - - 0x02350f, 0x073f15, 0x0c4a1c, 0x2d5f1e, // 14 - 0x4f7420, 0x598324, 0x649228, 0x82a12e, - 0xa1b034, 0xa9c13a, 0xb2d241, 0xc4d945, - 0xd6e149, 0xe4f04e, 0xf2ff53, 0xf2ff53, - - 0x263001, 0x243803, 0x234005, 0x51541b, // 15 - 0x806931, 0x978135, 0xaf993a, 0xc2a73e, - 0xd5b543, 0xdbc03d, 0xe1cb38, 0xe2d836, - 0xe3e534, 0xeff258, 0xfbff7d, 0xfbff7d, - - 0x401a02, 0x581f05, 0x702408, 0x8d3a13, // 16 - 0xab511f, 0xb56427, 0xbf7730, 0xd0853a, - 0xe19344, 0xeda04e, 0xf9ad58, 0xfcb75c, - 0xffc160, 0xffc671, 0xffcb83, 0xffcb83 +#define PALETTE_SIZE 768 + +byte palette_data[PALETTE_SIZE] = { +0x00,0x00,0x00,0x25,0x25,0x25,0x34,0x34,0x34,0x4F,0x4F,0x4F, +0x5B,0x5B,0x5B,0x69,0x69,0x69,0x7B,0x7B,0x7B,0x8A,0x8A,0x8A, +0xA7,0xA7,0xA7,0xB9,0xB9,0xB9,0xC5,0xC5,0xC5,0xD0,0xD0,0xD0, +0xD7,0xD7,0xD7,0xE1,0xE1,0xE1,0xF4,0xF4,0xF4,0xFF,0xFF,0xFF, +0x4C,0x32,0x00,0x62,0x3A,0x00,0x7B,0x4A,0x00,0x9A,0x60,0x00, +0xB5,0x74,0x00,0xCC,0x85,0x00,0xE7,0x9E,0x08,0xF7,0xAF,0x10, +0xFF,0xC3,0x18,0xFF,0xD0,0x20,0xFF,0xD8,0x28,0xFF,0xDF,0x30, +0xFF,0xE6,0x3B,0xFF,0xF4,0x40,0xFF,0xFA,0x4B,0xFF,0xFF,0x50, +0x99,0x25,0x00,0xAA,0x25,0x00,0xB4,0x25,0x00,0xD3,0x30,0x00, +0xDD,0x48,0x02,0xE2,0x50,0x09,0xF4,0x67,0x00,0xF4,0x75,0x10, +0xFF,0x9E,0x10,0xFF,0xAC,0x20,0xFF,0xBA,0x3A,0xFF,0xBF,0x50, +0xFF,0xC6,0x6D,0xFF,0xD5,0x80,0xFF,0xE4,0x90,0xFF,0xE6,0x99, +0x98,0x0C,0x0C,0x99,0x0C,0x0C,0xC2,0x13,0x00,0xD3,0x13,0x00, +0xE2,0x35,0x00,0xE3,0x40,0x00,0xE4,0x40,0x20,0xE5,0x52,0x30, +0xFD,0x78,0x54,0xFF,0x8A,0x6A,0xFF,0x98,0x7C,0xFF,0xA4,0x8B, +0xFF,0xB3,0x9E,0xFF,0xC2,0xB2,0xFF,0xD0,0xBA,0xFF,0xD7,0xC0, +0x99,0x00,0x00,0xA9,0x00,0x00,0xC2,0x04,0x00,0xD3,0x04,0x00, +0xDA,0x04,0x00,0xDB,0x08,0x00,0xE4,0x20,0x20,0xF6,0x40,0x40, +0xFB,0x70,0x70,0xFB,0x7E,0x7E,0xFB,0x8F,0x8F,0xFF,0x9F,0x9F, +0xFF,0xAB,0xAB,0xFF,0xB9,0xB9,0xFF,0xC9,0xC9,0xFF,0xCF,0xCF, +0x7E,0x00,0x50,0x80,0x00,0x50,0x80,0x00,0x5F,0x95,0x0B,0x74, +0xAA,0x22,0x88,0xBB,0x2F,0x9A,0xCE,0x3F,0xAD,0xD7,0x5A,0xB6, +0xE4,0x67,0xC3,0xEF,0x72,0xCE,0xFB,0x7E,0xDA,0xFF,0x8D,0xE1, +0xFF,0x9D,0xE5,0xFF,0xA5,0xE7,0xFF,0xAF,0xEA,0xFF,0xB8,0xEC, +0x48,0x00,0x6C,0x5C,0x04,0x88,0x65,0x0D,0x90,0x7B,0x23,0xA7, +0x93,0x3B,0xBF,0x9D,0x45,0xC9,0xA7,0x4F,0xD3,0xB2,0x5A,0xDE, +0xBD,0x65,0xE9,0xC5,0x6D,0xF1,0xCE,0x76,0xFA,0xD5,0x83,0xFF, +0xDA,0x90,0xFF,0xDE,0x9C,0xFF,0xE2,0xA9,0xFF,0xE6,0xB6,0xFF, +0x1B,0x00,0x70,0x22,0x1B,0x8D,0x37,0x30,0xA2,0x48,0x41,0xB3, +0x59,0x52,0xC4,0x63,0x5C,0xCE,0x6F,0x68,0xDA,0x7D,0x76,0xE8, +0x87,0x80,0xF8,0x93,0x8C,0xFF,0x9D,0x97,0xFF,0xA8,0xA3,0xFF, +0xB3,0xAF,0xFF,0xBC,0xB8,0xFF,0xC4,0xC1,0xFF,0xDA,0xD1,0xFF, +0x00,0x0D,0x7F,0x00,0x12,0xA7,0x00,0x18,0xC0,0x0A,0x2B,0xD1, +0x1B,0x4A,0xE3,0x2F,0x58,0xF0,0x37,0x68,0xFF,0x49,0x79,0xFF, +0x5B,0x85,0xFF,0x6D,0x96,0xFF,0x7F,0xA3,0xFF,0x8C,0xAD,0xFF, +0x96,0xB4,0xFF,0xA8,0xC0,0xFF,0xB7,0xCB,0xFF,0xC6,0xD6,0xFF, +0x00,0x29,0x5A,0x00,0x38,0x76,0x00,0x48,0x92,0x00,0x5C,0xAC, +0x00,0x71,0xC6,0x00,0x86,0xD0,0x0A,0x9B,0xDF,0x1A,0xA8,0xEC, +0x2B,0xB6,0xFF,0x3F,0xC2,0xFF,0x45,0xCB,0xFF,0x59,0xD3,0xFF, +0x7F,0xDA,0xFF,0x8F,0xDE,0xFF,0xA0,0xE2,0xFF,0xB0,0xEB,0xFF, +0x00,0x4A,0x00,0x00,0x4C,0x00,0x00,0x6A,0x20,0x50,0x8E,0x79, +0x40,0x99,0x99,0x00,0x9C,0xAA,0x00,0xA1,0xBB,0x01,0xA4,0xCC, +0x03,0xA5,0xD7,0x05,0xDA,0xE2,0x18,0xE5,0xFF,0x34,0xEA,0xFF, +0x49,0xEF,0xFF,0x66,0xF2,0xFF,0x84,0xF4,0xFF,0x9E,0xF9,0xFF, +0x00,0x4A,0x00,0x00,0x5D,0x00,0x00,0x70,0x00,0x00,0x83,0x00, +0x00,0x95,0x00,0x00,0xAB,0x00,0x07,0xBD,0x07,0x0A,0xD0,0x0A, +0x1A,0xD5,0x40,0x5A,0xF1,0x77,0x82,0xEF,0xA7,0x84,0xED,0xD1, +0x89,0xFF,0xED,0x7D,0xFF,0xFF,0x93,0xFF,0xFF,0x9B,0xFF,0xFF, +0x22,0x4A,0x03,0x27,0x53,0x04,0x30,0x64,0x05,0x3C,0x77,0x0C, +0x45,0x8C,0x11,0x5A,0xA5,0x13,0x1B,0xD2,0x09,0x1F,0xDD,0x00, +0x3D,0xCD,0x2D,0x3D,0xCD,0x30,0x58,0xCC,0x40,0x60,0xD3,0x50, +0xA2,0xEC,0x55,0xB3,0xF2,0x4A,0xBB,0xF6,0x5D,0xC4,0xF8,0x70, +0x2E,0x3F,0x0C,0x36,0x4A,0x0F,0x40,0x56,0x15,0x46,0x5F,0x17, +0x57,0x77,0x1A,0x65,0x85,0x1C,0x74,0x93,0x1D,0x8F,0xA5,0x25, +0xAD,0xB7,0x2C,0xBC,0xC7,0x30,0xC9,0xD5,0x33,0xD4,0xE0,0x3B, +0xE0,0xEC,0x42,0xEA,0xF6,0x45,0xF0,0xFD,0x47,0xF4,0xFF,0x6F, +0x55,0x24,0x00,0x5A,0x2C,0x00,0x6C,0x3B,0x00,0x79,0x4B,0x00, +0xB9,0x75,0x00,0xBB,0x85,0x00,0xC1,0xA1,0x20,0xD0,0xB0,0x2F, +0xDE,0xBE,0x3F,0xE6,0xC6,0x45,0xED,0xCD,0x57,0xF5,0xDB,0x62, +0xFB,0xE5,0x69,0xFC,0xEE,0x6F,0xFD,0xF3,0x77,0xFD,0xF3,0x7F, +0x5C,0x27,0x00,0x5C,0x2F,0x00,0x71,0x3B,0x00,0x7B,0x48,0x00, +0xB9,0x68,0x20,0xBB,0x72,0x20,0xC5,0x86,0x29,0xD7,0x96,0x33, +0xE6,0xA4,0x40,0xF4,0xB1,0x4B,0xFD,0xC1,0x58,0xFF,0xCC,0x55, +0xFF,0xD4,0x61,0xFF,0xDD,0x69,0xFF,0xE6,0x79,0xFF,0xEA,0x98 }; @@ -418,13 +405,13 @@ void dsLoadGame(char *filename) { // Init palette for(index = 0; index < 256; index++) { - unsigned short r = ((palette_ntsc[index]& 0x00ff0000) >> 19); - unsigned short g = ((palette_ntsc[index]& 0x0000ff00) >> 11); - unsigned short b = ((palette_ntsc[index]& 0x000000ff) >> 3); - BG_PALETTE[index] = RGB15(r, g, b); + unsigned short r = palette_data[(index * 3) + 0]; + unsigned short g = palette_data[(index * 3) + 1]; + unsigned short b = palette_data[(index * 3) + 2]; + BG_PALETTE[index] = RGB8(r, g, b); atari_pal16[index] = index; } - + psound_buffer=sound_buffer; TIMER2_DATA = TIMER_FREQ(22050); TIMER2_CR = TIMER_DIV_1 | TIMER_IRQ_REQ | TIMER_ENABLE; @@ -612,7 +599,7 @@ unsigned int dsWaitForRom(void) { else { ucBas = 0; } - if (keysCurrent() & KEY_R) { + if ((keysCurrent() & KEY_R) || (keysCurrent() & KEY_RIGHT)) { if (!ucSBas) { ucFicAct = (ucFicAct< counta5200-nbRomPerPage ? ucFicAct+nbRomPerPage : counta5200-nbRomPerPage); if (firstRomDisplay nbRomPerPage ? ucFicAct-nbRomPerPage : 0); if (firstRomDisplay>nbRomPerPage) { firstRomDisplay -= nbRomPerPage; } diff --git a/arm9/source/emu/atari_nds.c b/arm9/source/emu/atari_nds.c index 2ee19f3..d2fef86 100644 --- a/arm9/source/emu/atari_nds.c +++ b/arm9/source/emu/atari_nds.c @@ -49,8 +49,11 @@ void Atari_Initialise(void) { Sound_Initialise(); #endif - trig0 = 1; - stick0 = 15; + trig0 = 1; // Not pressed + trig1 = 1; // Not pressed + stick0 = STICK_CENTRE; + stick1 = STICK_CENTRE; + key_consol = CONSOL_NONE; } diff --git a/arm9/source/emu/cartridge.c b/arm9/source/emu/cartridge.c index a4f5341..b396fbf 100644 --- a/arm9/source/emu/cartridge.c +++ b/arm9/source/emu/cartridge.c @@ -32,7 +32,7 @@ #include "hash.h" #include "atari.h" -#include "binload.h" /* loading_basic */ +#include "binload.h" #include "cartridge.h" #include "memory.h" #include "pia.h" @@ -42,153 +42,126 @@ #include "statesav.h" #endif -struct cart_t cart_table[] = +static const struct cart_t cart_table[] = { - {"45f8841269313736489180c8ec3e9588", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,18}, // Activision Decathlon, The (USA).a52 - {"4b1aecab0e2f9c90e514cb0a506e3a5f", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,14}, // Adventure II-a.a52 - {"e2f6085028eb8cf24ad7b50ca4ef640f", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,14}, // Adventure II-b.a52 - {"bae7c1e5eb04e19ef8d0d0b5ce134332", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Astro Chase (USA).a52 + {"DefaultCart000000000000000000000", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Default Cart - If no other cart type found... + {"c8e90376b7e1b00dcbd4042f50bffb75", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Atari 5200 Calibration Cart + {"45f8841269313736489180c8ec3e9588", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,18}, // Activision Decathlon, The (USA).a52 + {"4b1aecab0e2f9c90e514cb0a506e3a5f", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,14}, // Adventure II-a.a52 + {"e2f6085028eb8cf24ad7b50ca4ef640f", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,14}, // Adventure II-b.a52 + {"bae7c1e5eb04e19ef8d0d0b5ce134332", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Astro Chase (USA).a52 + {"d31a3bbb4c99f539f0d2c4e02bec516e", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,19}, // Atlantis (XL Conversion).a52 {"f5cd178cbea0ae7d8cf65b30cfd04225", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,16}, // Ballblazer (USA).a52 - {"1913310b1e44ad7f3b90aeb16790a850", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,18}, // Beamrider (USA).a52 + {"17e5c03b4fcada48d4c2529afcfe3a70", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,24}, // BCs Quest For Tires (XL Conversion).a52 + {"1913310b1e44ad7f3b90aeb16790a850", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,18}, // Beamrider (USA).a52 {"f8973db8dc272c2e5eb7b8dbb5c0cc3b", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,25}, // BerZerk (USA).a52 - {"5d5a75ac53230915701bc918249f1055", CART_5200_40, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Bounty Bob Strikes Back! (USA).a52 + {"139229eed18032fdea735fa5360bd551", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,23}, // Beef Drop Ultimate SD Edition.a52 + {"81790daff7f7646a6c371c056622be9c", CART_5200_40, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Bounty Bob Strikes Back (Merged) (Big Five Software) (U).a52 {"a074a1ff0a16d1e034ee314b85fa41e9", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 230, 32,15}, // Buck Rogers - Planet of Zoom (USA).a52 + {"3147ad22f8d5f46b1ef40a39da3a3de1", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,23}, // Captain Beeble (XL Conversion).a52 {"01b978c3faf5d516f300f98c00377532", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,15}, // Carol Shaw's River Raid (USA).a52 - {"4965b4c8acca64c4fac39a7c0763f611", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Castle Blast (USA) (Unl).a52 - {"8f4c07a9e0ef2ded720b403810220aaf", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Castle Crisis (USA) (Unl).a52 + {"4965b4c8acca64c4fac39a7c0763f611", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Castle Blast (USA) (Unl).a52 + {"8f4c07a9e0ef2ded720b403810220aaf", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Castle Crisis (USA) (Unl).a52 + {"d64a175672b6dba0c0b244c949799e64", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Caverns of Mars (Conv).a52 + {"1db260d6769bed6bf4731744213097b8", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Caverns Of Mars 2 (Conv).a52 {"261702e8d9acbf45d44bb61fd8fa3e17", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,14}, // Centipede (USA).a52 - {"3ff7707e25359c9bcb2326a5d8539852", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 220, 32,10}, // Choplifter! (USA).a52 - {"5720423ebd7575941a1586466ba9beaf", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Congo Bongo (USA).a52 - {"1a64edff521608f9f4fa9d7bdb355087", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Countermeasure (USA).a52 - {"7c27d225a13e178610babf331a0759c0", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,23}, // David Crane's Pitfall II - Lost Caverns (USA).a52 + {"3ff7707e25359c9bcb2326a5d8539852", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Choplifter! (USA).a52 + {"5720423ebd7575941a1586466ba9beaf", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Congo Bongo (USA).a52 + {"1a64edff521608f9f4fa9d7bdb355087", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Countermeasure (USA).a52 + {"cd64cc0b348a634080078206e3111f9a", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Crystal Castles (Final Conversion).a52 + {"7c27d225a13e178610babf331a0759c0", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,23}, // David Crane's Pitfall II - Lost Caverns (USA).a52 {"27d5f32b0d46d3d80773a2b505f95046", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,18}, // Defender (1982) (Atari).a52 - {"3abd0c057474bad46e45f3d4e96eecee", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 340, 256, 34,22}, // Dig Dug (1983) (Atari).a52 - {"159ccaa564fc2472afd1f06665ec6d19", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,14}, // Dreadnaught Factor, The (USA).a52 - {"14bd9a0423eafc3090333af916cfbce6", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Frisky Tom (USA) (Proto).a52 - {"2c89c9444f99fd7ac83f88278e6772c6", CART_5200_8, CTRL_FROG, DIGITAL, 2, 6, 220, 256, 230, 32,14}, // Frogger (1983) (Parker Bros).a52 - {"d8636222c993ca71ca0904c8d89c4411", CART_5200_EE_16, CTRL_FROG, DIGITAL, 2, 6, 220, 256, 230, 32,14}, // Frogger II - Threeedeep! (USA).a52 - {"3ace7c591a88af22bac0c559bbb08f03", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 236, 32,16}, // Galaxian (1982) (Atari).a52 - {"85fe2492e2945015000272a9fefc06e3", CART_5200_8, CTRL_JOY, ANALOG, 2, 30, 185, 256, 240, 32,16}, // Gorf (1982) (CBS).a52 - {"dc271e475b4766e80151f1da5b764e52", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Gremlins (USA).a52 - {"dacc0a82e8ee0c086971f9d9bac14127", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Gyruss (USA).a52 - {"f8f0e0a6dc2ffee41b2a2dd736cba4cd", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,16}, // H.E.R.O. (USA).a52 - {"936db7c08e6b4b902c585a529cb15fc5", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // James Bond 007 (USA).a52 - {"25cfdef5bf9b126166d5394ae74a32e7", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,22}, // Joust (USA).a52 - {"bc748804f35728e98847da6cdaf241a7", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,22}, // Jr. Pac-Man (USA) (Proto).a52 - {"834067fdce5d09b86741e41e7e491d6c", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,20}, // Jungle Hunt (USA).a52 - {"92fd2f43bc0adf2f704666b5244fadf1", CART_5200_4, CTRL_JOY, ANALOG, 2, 30, 185, 256, 256, 32,22}, // Kaboom! (USA).a52 - {"796d2c22f8205fb0ce8f1ee67c8eb2ca", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,16}, // Kangaroo (USA).a52 - {"f25a084754ea4d37c2fb1dc8ca6dc51b", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,23}, // Keystone Kapers (USA).a52 - {"3b03e3cda8e8aa3beed4c9617010b010", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,14}, // Koffi - Yellow Kopter (USA) (Unl).a52 - {"b99f405de8e7700619bcd18524ba0e0e", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // K-Razy Shoot-Out (USA).a52 - {"46264c86edf30666e28553bd08369b83", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Last Starfighter, The (USA) (Proto).a52 - {"ff785ce12ad6f4ca67f662598025c367", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,12}, // Megamania (1983) (Activision).a52 - {"1cd67468d123219201702eadaffd0275", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Meteorites (USA).a52 + {"b4af8b555278dec6e2c2329881dc0a15", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,18}, // Demon Attack (XL Conversion).a52 + {"32b2bb28213dbb01b69e003c4b35bb57", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,20}, // Desmonds Dungeon (XL Conversion).a52 + {"3abd0c057474bad46e45f3d4e96eecee", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 340, 256, 34,22}, // Dig Dug (1983) (Atari).a52 + {"1d1eab4067fc0aaf2b2b880fb8f72e40", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,19}, // Donkey Kong Arcade.a52 + {"4dcca2e6a88d57e54bc7b2377cc2e5b5", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,19}, // Donkey Kong Jr Enhanded.a52 + {"0c393d2b04afae8a8f8827d30794b29a", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,19}, // Donkey Kong (XL Conversion).a52 + {"ae5b9bbe91983ab111fd7cf3d29d6b11", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,19}, // Donkey Kong Jr (XL Conversion).a52 + {"159ccaa564fc2472afd1f06665ec6d19", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,14}, // Dreadnaught Factor, The (USA).a52 + {"4b6c878758f4d4de7f9650296db76d2e", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,19}, // Fast Eddie (XL Conversion).a52 + {"14bd9a0423eafc3090333af916cfbce6", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Frisky Tom (USA) (Proto).a52 + {"2c89c9444f99fd7ac83f88278e6772c6", CART_5200_8, CTRL_FROG, DIGITAL, 2, 6, 220, 256, 230, 32,14}, // Frogger (1983) (Parker Bros).a52 + {"d8636222c993ca71ca0904c8d89c4411", CART_5200_EE_16, CTRL_FROG, DIGITAL, 2, 6, 220, 256, 230, 32,14}, // Frogger II - Threeedeep! (USA).a52 + {"3ace7c591a88af22bac0c559bbb08f03", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 236, 32,16}, // Galaxian (1982) (Atari).a52 + {"85fe2492e2945015000272a9fefc06e3", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Gorf (1982) (CBS).a52 + {"a21c545a52d488bfdaf078d786bf4916", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Gorf (1982) (CBS).a52 + {"dc271e475b4766e80151f1da5b764e52", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Gremlins (USA).a52 + {"dacc0a82e8ee0c086971f9d9bac14127", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Gyruss (USA).a52 + {"f8f0e0a6dc2ffee41b2a2dd736cba4cd", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // H.E.R.O. (USA).a52 + {"d824f6ee24f8bc412468268395a76159", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Ixion (XL Conversion).a52 + {"936db7c08e6b4b902c585a529cb15fc5", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // James Bond 007 (USA).a52 + {"082846d3a43aab4672fe98252eb1b6f9", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Jawbreaker (XL Conversion).a52 + {"25cfdef5bf9b126166d5394ae74a32e7", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Joust (USA).a52 + {"bc748804f35728e98847da6cdaf241a7", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Jr. Pac-Man (USA) (Proto).a52 + {"40f3fca978058da46cd3e63ea8d2412f", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Jr Pac-Man (1984) (Atari) (U).a52 + {"a0d407ab5f0c63e1e17604682894d1a9", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Jumpman Jr (Conv).a52 + {"27140302a715694401319568a83971a1", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Jumpman Jr (XL Conversion).a52 + {"834067fdce5d09b86741e41e7e491d6c", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,20}, // Jungle Hunt (USA).a52 + {"92fd2f43bc0adf2f704666b5244fadf1", CART_5200_4, CTRL_JOY, ANALOG, 4, 6, 220, 256, 256, 32,22}, // Kaboom! (USA).a52 + {"796d2c22f8205fb0ce8f1ee67c8eb2ca", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Kangaroo (USA).a52 + {"f25a084754ea4d37c2fb1dc8ca6dc51b", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,23}, // Keystone Kapers (USA).a52 + {"3b03e3cda8e8aa3beed4c9617010b010", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,22}, // Koffi - Yellow Kopter (USA) (Unl).a52 + {"03d0d59c5382b0a34a158e74e9bfce58", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,30}, // Kid Grid.a52 + {"b99f405de8e7700619bcd18524ba0e0e", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // K-Razy Shoot-Out (USA).a52 + {"66977296ff8c095b8cb755de3472b821", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // K-Razy Shoot-Out (1982) (CBS) [h1] (Two Port).a52 + {"5154dc468c00e5a343f5a8843a14f8ce", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,24}, // K-Star Patrol (XL Conversion).a52 + {"c4931be078e2b16dc45e9537ebce836b", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,30}, // Laser Gates (Conversion).a52 + {"46264c86edf30666e28553bd08369b83", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Last Starfighter, The (USA) (Proto).a52 + {"ff785ce12ad6f4ca67f662598025c367", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,12}, // Megamania (1983) (Activision).a52 + {"1cd67468d123219201702eadaffd0275", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Meteorites (USA).a52 {"84d88bcdeffee1ab880a5575c6aca45e", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,18}, // Millipede (USA) (Proto).a52 - {"d859bff796625e980db1840f15dec4b5", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,24}, // Miner 2049er Starring Bounty Bob (USA).a52 - {"972b6c0dbf5501cacfdc6665e86a796c", CART_5200_8, CTRL_JOY, ANALOG, 2, 30, 185, 256, 256, 32,22}, // Missile Command (USA).a52 - {"694897cc0d98fcf2f59eef788881f67d", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Montezuma's Revenge featuring Panama Joe (USA).a52 - {"296e5a3a9efd4f89531e9cf0259c903d", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,22}, // Moon Patrol (USA).a52 - {"618e3eb7ae2810768e1aefed1bfdcec4", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Mountain King (USA).a52 - {"d1873645fee21e84b25dc5e939d93e9b", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Mr. Do!'s Castle (USA).a52 - {"ef9a920ffdf592546499738ee911fc1e", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,25}, // Ms. Pac-Man (USA).a52 - {"f1a4d62d9ba965335fa13354a6264623", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,16}, // Pac-Man (USA).a52 - {"a301a449fc20ad345b04932d3ca3ef54", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,16}, // Pengo (USA).a52 - {"ecbd6dd2ab105dd43f98476966bbf26c", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,25}, // Pitfall! (USA).a52 - {"fd0cbea6ad18194be0538844e3d7fdc9", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Pole Position (USA).a52 - {"dd4ae6add63452aafe7d4fa752cd78ca", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Popeye (USA).a52 - {"ce44d14341fcc5e7e4fb7a04f77ffec9", CART_5200_8, CTRL_QBERT, DIGITAL, 2, 6, 220, 300, 240, 48,20}, // Q-bert (USA).a52 - {"9b7d9d874a93332582f34d1420e0f574", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 320, 256, 66,20}, // QIX (USA).a52 - {"099706cedd068aced7313ffa371d7ec3", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Quest for Quintana Roo (USA).a52 - {"2bb928d7516e451c6b0159ac413407de", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // RealSports Baseball (USA).a52 - {"e056001d304db597bdd21b2968fcc3e6", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // RealSports Basketball (USA).a52 - {"022c47b525b058796841134bb5c75a18", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // RealSports Football (USA).a52 - {"3074fad290298d56c67f82e8588c5a8b", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // RealSports Soccer (USA).a52 - {"7e683e571cbe7c77f76a1648f906b932", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // RealSports Tennis (USA).a52 - {"0dc44c5bf0829649b7fec37cb0a8186b", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Rescue on Fractalus! (USA).a52 - {"ddf7834a420f1eaae20a7a6255f80a99", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Road Runner (USA) (Proto).a52 - {"5dba5b478b7da9fd2c617e41fb5ccd31", CART_5200_NS_16, CTRL_ROBO, DIGITAL, 2, 30, 185, 256, 240, 32,18}, // Robotron 2084 (USA).a52 - {"be75afc33f5da12974900317d824f9b9", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 220, 32,10}, // Sinistar.a52 - {"6e24e3519458c5cb95a7fd7711131f8d", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,18}, // Space Dungeon (USA).a52 - {"58430368d2c9190083f95ce923f4c996", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 240, 32,16}, // Space Invaders (USA).a52 - {"802a11dfcba6229cc2f93f0f3aaeb3aa", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Space Shuttle - A Journey Into Space (USA).a52 - {"e2d3a3e52bb4e3f7e489acd9974d68e2", CART_5200_EE_16, CTRL_JOY, ANALOG, 2, 30, 185, 256, 192, 32, 0}, // Star Raiders (USA).a52 - {"c959b65be720a03b5479650a3af5a511", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Star Trek - Strategic Operations Simulator (USA).a52 - {"00beaa8405c7fb90d86be5bb1b01ea66", CART_5200_EE_16, CTRL_JOY, ANALOG, 2, 30, 185, 256, 192, 32, 0}, // Star Wars - The Arcade Game (USA).a52 - {"865570ff9052c1704f673e6222192336", CART_5200_4, CTRL_JOY, ANALOG, 3, 30, 185, 280, 256, 36,18}, // Super Breakout (USA).a52 - {"dfcd77aec94b532728c3d1fef1da9d85", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Super Cobra (USA).a52 - {"556a66d6737f0f793821e702547bc051", CART_5200_32, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,24}, // Vanguard (USA).a52 - {"560b68b7f83077444a57ebe9f932905a", CART_5200_NS_16, CTRL_SWAP, DIGITAL, 2, 30, 185, 256, 240, 32,14}, // Wizard of Wor (USA).a52 - {"9fee054e7d4ba2392f4ba0cb73fc99a5", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Zaxxon (USA).a52 - {"77beee345b4647563e20fd896231bd47", CART_5200_8, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 192, 32, 0}, // Zenji (USA).a52 - {"dc45af8b0996cb6a94188b0be3be2e17", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,22}, // Zone Ranger (USA).a52 - {"1db260d6769bed6bf4731744213097b8", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Caverns Of Mars 2 (Conversion) fixed.a52 - {"c4a14a88a4257970223b1ef9bf95da5b", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Phobos (Caverns of Mars 3).a52 - {"1d1eab4067fc0aaf2b2b880fb8f72e40", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,19}, // DK5200_Arcade.a52 - {"4dcca2e6a88d57e54bc7b2377cc2e5b5", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,19}, // DKJr_5200_Enhanced.a52 - {"66057fd4b37be2a45bd8c8e6aa12498d", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 250, 32,20}, // Popeye5200_ArcadeFinal.a52 - {"d64a175672b6dba0c0b244c949799e64", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Caverns of Mars (Conv).a52 - {"a0d407ab5f0c63e1e17604682894d1a9", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Jumpman Jr (Conv).a52 + {"d859bff796625e980db1840f15dec4b5", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,24}, // Miner 2049er Starring Bounty Bob (USA).a52 + {"972b6c0dbf5501cacfdc6665e86a796c", CART_5200_8, CTRL_JOY, ANALOG, 2, 6, 220, 256, 256, 32,22}, // Missile Command (USA).a52 + {"694897cc0d98fcf2f59eef788881f67d", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,20}, // Montezuma's Revenge featuring Panama Joe (USA).a52 + {"296e5a3a9efd4f89531e9cf0259c903d", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Moon Patrol (USA).a52 + {"618e3eb7ae2810768e1aefed1bfdcec4", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Mountain King (USA).a52 + {"23296829e0e1316541aa6b5540b9ba2e", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Mountain King (1984) (Sunrise Software) [h1] (Two Port).a52 + {"d1873645fee21e84b25dc5e939d93e9b", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Mr. Do!'s Castle (USA).a52 + {"ef9a920ffdf592546499738ee911fc1e", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,25}, // Ms. Pac-Man (USA).a52 + {"6c661ed6f14d635482f1d35c5249c788", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Oils Well.a52 + {"f1a4d62d9ba965335fa13354a6264623", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,16}, // Pac-Man (USA).a52 + {"a301a449fc20ad345b04932d3ca3ef54", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Pengo (USA).a52 + {"ecbd6dd2ab105dd43f98476966bbf26c", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,25}, // Pitfall! (USA).a52 (use classics fix instead) {"2be3529c33fdf6b76fa7528ba43cdd7f", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,24}, // Pitfall (classics fix).a52 + {"fd0cbea6ad18194be0538844e3d7fdc9", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 30, 185, 256, 256, 32,22}, // Pole Position (USA).a52 + {"c3fc21b6fa55c0473b8347d0e2d2bee0", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Pooyan.a52 + {"dd4ae6add63452aafe7d4fa752cd78ca", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Popeye (USA).a52 + {"66057fd4b37be2a45bd8c8e6aa12498d", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 250, 32,20}, // Popeye Arcade Final (Hack).a52 + {"ce44d14341fcc5e7e4fb7a04f77ffec9", CART_5200_8, CTRL_QBERT, DIGITAL, 2, 6, 220, 300, 240, 48,20}, // Q-bert (USA).a52 + {"9b7d9d874a93332582f34d1420e0f574", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 320, 256, 66,20}, // QIX (USA).a52 + {"099706cedd068aced7313ffa371d7ec3", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Quest for Quintana Roo (USA).a52 + {"80e0ad043da9a7564fec75c1346dbc6e", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // RainbowWalker.a52 + {"2bb928d7516e451c6b0159ac413407de", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // RealSports Baseball (USA).a52 + {"e056001d304db597bdd21b2968fcc3e6", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // RealSports Basketball (USA).a52 + {"022c47b525b058796841134bb5c75a18", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // RealSports Football (USA).a52 + {"3074fad290298d56c67f82e8588c5a8b", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // RealSports Soccer (USA).a52 + {"7e683e571cbe7c77f76a1648f906b932", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // RealSports Tennis (USA).a52 + {"0dc44c5bf0829649b7fec37cb0a8186b", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Rescue on Fractalus! (USA).a52 + {"ddf7834a420f1eaae20a7a6255f80a99", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Road Runner (USA) (Proto).a52 + {"5dba5b478b7da9fd2c617e41fb5ccd31", CART_5200_NS_16, CTRL_ROBO, DIGITAL, 2, 6, 220, 256, 240, 32,18}, // Robotron 2084 (USA).a52 {"950aa1075eaf4ee2b2c2cfcf8f6c25b4", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 300, 240, 42,30}, // Satans Hollow (Conv).a52 - {"03d0d59c5382b0a34a158e74e9bfce58", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Kid Grid.a52 - {"c3fc21b6fa55c0473b8347d0e2d2bee0", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Pooyan.a52 - {"80e0ad043da9a7564fec75c1346dbc6e", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // RainbowWalker.a52 - {"c8e90376b7e1b00dcbd4042f50bffb75", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Atari 5200 Calibration Cart {"467e72c97db63eb59011dd062c965ec9", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Scramble.a52 - {"59699274930349b4fe0ee94b21ce3c16", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Tapper.a52 - {"3649bfd2008161b9825f386dbaff88da", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Up and Down.a52 - {"c4931be078e2b16dc45e9537ebce836b", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,30}, // Laser Gates.a52 + {"be75afc33f5da12974900317d824f9b9", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Sinistar.a52 + {"6e24e3519458c5cb95a7fd7711131f8d", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,18}, // Space Dungeon (USA).a52 + {"58430368d2c9190083f95ce923f4c996", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Space Invaders (USA).a52 + {"802a11dfcba6229cc2f93f0f3aaeb3aa", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Space Shuttle - A Journey Into Space (USA).a52 + {"6208110dc3c0bf7b15b33246f2971b6e", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,16}, // Spy Hunter (XL Conversion).a52 + {"e2d3a3e52bb4e3f7e489acd9974d68e2", CART_5200_EE_16, CTRL_JOY, ANALOG, 2, 6, 220, 256, 192, 32, 0}, // Star Raiders (USA).a52 + {"c959b65be720a03b5479650a3af5a511", CART_5200_EE_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Star Trek - Strategic Operations Simulator (USA).a52 + {"00beaa8405c7fb90d86be5bb1b01ea66", CART_5200_EE_16, CTRL_JOY, ANALOG, 2, 6, 220, 256, 192, 32, 0}, // Star Wars - The Arcade Game (USA).a52 + {"865570ff9052c1704f673e6222192336", CART_5200_4, CTRL_JOY, ANALOG, 3, 6, 220, 280, 256, 36,18}, // Super Breakout (USA).a52 + {"dfcd77aec94b532728c3d1fef1da9d85", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Super Cobra (USA).a52 + {"c098a0ce6c7e059264511e650ce47b35", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Tapper (XL Conversion).a52 + {"556a66d6737f0f793821e702547bc051", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,24}, // Vanguard (USA).a52 + {"560b68b7f83077444a57ebe9f932905a", CART_5200_NS_16, CTRL_SWAP, DIGITAL, 2, 6, 220, 256, 240, 32,14}, // Wizard of Wor (USA).a52 + {"9fee054e7d4ba2392f4ba0cb73fc99a5", CART_5200_32, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 220, 32,10}, // Zaxxon (USA).a52 + {"77beee345b4647563e20fd896231bd47", CART_5200_8, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 192, 32, 0}, // Zenji (USA).a52 + {"dc45af8b0996cb6a94188b0be3be2e17", CART_5200_NS_16, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 256, 32,22}, // Zone Ranger (USA).a52 + {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", CART_NONE, CTRL_JOY, DIGITAL, 2, 6, 220, 256, 240, 32,30}, // End of List }; - -int cart_kb[CART_LAST_SUPPORTED + 1] = { - 0, - 0,//8, /* CART_STD_8 */ - 0,//16, /* CART_STD_16 */ - 0,//16, /* CART_OSS_16 */ - 32, /* CART_5200_32 */ - 0,//32, /* CART_DB_32 */ - 16, /* CART_5200_EE_16 */ - 40, /* CART_5200_40 */ - 0,//64, /* CART_WILL_64 */ - 0,//64, /* CART_EXP_64 */ - 0,//64, /* CART_DIAMOND_64 */ - 0,//64, /* CART_SDX */ - 0,//32, /* CART_XEGS_32 */ - 0,//64, /* CART_XEGS_64 */ - 0,//128,/* CART_XEGS_128 */ - 0,//16, /* CART_OSS2_16 */ - 16, /* CART_5200_NS_16 */ - 0,//128,/* CART_ATRAX_128 */ - 0, //40, /* CART_BBSB_40 */ - 8, /* CART_5200_8 */ - 4, /* CART_5200_4 */ - 0,//8, /* CART_RIGHT_8 */ - 0,//32, /* CART_WILL_32 */ - 0,//256,/* CART_XEGS_256 */ - 0,//512,/* CART_XEGS_512 */ - 0,//1024,/* CART_XEGS_1024 */ - 0,//16, /* CART_MEGA_16 */ - 0,//32, /* CART_MEGA_32 */ - 0,//64, /* CART_MEGA_64 */ - 0,//128,/* CART_MEGA_128 */ - 0,//256,/* CART_MEGA_256 */ - 0,//512,/* CART_MEGA_512 */ - 0,//1024,/* CART_MEGA_1024 */ - 0,//32, /* CART_SWXEGS_32 */ - 0,//64, /* CART_SWXEGS_64 */ - 0,//128,/* CART_SWXEGS_128 */ - 0,//256,/* CART_SWXEGS_256 */ - 0,//512,/* CART_SWXEGS_512 */ - 0,//1024,/* CART_SWXEGS_1024 */ - 0,//8, /* CART_PHOENIX_8 */ - 0,//16, /* CART_BLIZZARD_16 */ - 0,//128,/* CART_ATMAX_128 */ - 0,//1024 /* CART_ATMAX_1024 */ -}; - int CART_IsFor5200(int type) { switch (type) { @@ -211,220 +184,11 @@ char cart_filename[FILENAME_MAX]; struct cart_t myCart = {"", CART_5200_32, CTRL_JOY, 0,0,0,0}; -static int bank; - -/* DB_32, XEGS_32, XEGS_64, XEGS_128, XEGS_256, XEGS_512, XEGS_1024 */ -/* SWXEGS_32, SWXEGS_64, SWXEGS_128, SWXEGS_256, SWXEGS_512, SWXEGS_1024 */ -static void set_bank_809F(int b, int main) -{ - if (b != bank) { - if (b & 0x80) { - Cart809F_Disable(); - CartA0BF_Disable(); - } - else { - Cart809F_Enable(); - CartA0BF_Enable(); - CopyROM(0x8000, 0x9fff, cart_image + b * 0x2000); - if (bank & 0x80) - CopyROM(0xa000, 0xbfff, cart_image + main); - } - bank = b; - } -} - -/* OSS_16, OSS2_16 */ -static void set_bank_A0AF(int b, int main) -{ - if (b != bank) { - if (b < 0) - CartA0BF_Disable(); - else { - CartA0BF_Enable(); - CopyROM(0xa000, 0xafff, cart_image + b * 0x1000); - if (bank < 0) - CopyROM(0xb000, 0xbfff, cart_image + main); - } - bank = b; - } -} - -/* EXP_64, DIAMOND_64, SDX_64 */ -static void set_bank_A0BF(int b) -{ - if (b != bank) { - if (b & 0x0008) - CartA0BF_Disable(); - else { - CartA0BF_Enable(); - CopyROM(0xa000, 0xbfff, cart_image + (~b & 7) * 0x2000); - } - bank = b; - } -} - -static void set_bank_A0BF_WILL64(int b) -{ - if (b != bank) { - if (b & 0x0008) - CartA0BF_Disable(); - else { - CartA0BF_Enable(); - CopyROM(0xa000, 0xbfff, cart_image + (b & 7) * 0x2000); - } - bank = b; - } -} - -static void set_bank_A0BF_WILL32(int b) -{ - if (b != bank) { - if (b & 0x0008) - CartA0BF_Disable(); - else { - CartA0BF_Enable(); - CopyROM(0xa000, 0xbfff, cart_image + (b & 3) * 0x2000); - } - bank = b; - } -} - -static void set_bank_A0BF_ATMAX128(int b) -{ - if (b != bank) { - if (b >= 0x20) - return; - else if (b >= 0x10) - CartA0BF_Disable(); - else { - CartA0BF_Enable(); - CopyROM(0xa000, 0xbfff, cart_image + b * 0x2000); - } - bank = b; - } -} - -static void set_bank_A0BF_ATMAX1024(int b) -{ - if (b != bank) { - if (b >= 0x80) - CartA0BF_Disable(); - else { - CartA0BF_Enable(); - CopyROM(0xa000, 0xbfff, cart_image + b * 0x2000); - } - bank = b; - } -} - -static void set_bank_80BF(int b) -{ - if (b != bank) { - if (b & 0x80) { - Cart809F_Disable(); - CartA0BF_Disable(); - } - else { - Cart809F_Enable(); - CartA0BF_Enable(); - CopyROM(0x8000, 0xbfff, cart_image + b * 0x4000); - } - bank = b; - } -} - -/* an access (read or write) to D500-D5FF area */ -static void CART_Access(UWORD addr) -{ - int b = bank; - switch (myCart.type) - { - case CART_OSS_16: - if (addr & 0x08) - b = -1; - else - switch (addr & 0x07) { - case 0x00: - case 0x01: - b = 0; - break; - case 0x03: - case 0x07: - b = 1; - break; - case 0x04: - case 0x05: - b = 2; - break; - /* case 0x02: - case 0x06: */ - default: - break; - } - set_bank_A0AF(b, 0x3000); - break; - case CART_DB_32: - set_bank_809F(addr & 0x03, 0x6000); - break; - case CART_WILL_64: - set_bank_A0BF_WILL64(addr); - break; - case CART_WILL_32: - set_bank_A0BF_WILL32(addr); - break; - case CART_EXP_64: - if ((addr & 0xf0) == 0x70) - set_bank_A0BF(addr); - break; - case CART_DIAMOND_64: - if ((addr & 0xf0) == 0xd0) - set_bank_A0BF(addr); - break; - case CART_SDX_64: - if ((addr & 0xf0) == 0xe0) - set_bank_A0BF(addr); - break; - case CART_OSS2_16: - switch (addr & 0x09) { - case 0x00: - b = 1; - break; - case 0x01: - b = 3; - break; - case 0x08: - b = -1; - break; - case 0x09: - b = 2; - break; - } - set_bank_A0AF(b, 0x0000); - break; - case CART_PHOENIX_8: - CartA0BF_Disable(); - break; - case CART_BLIZZARD_16: - Cart809F_Disable(); - CartA0BF_Disable(); - break; - case CART_ATMAX_128: - set_bank_A0BF_ATMAX128(addr & 0xff); - break; - case CART_ATMAX_1024: - set_bank_A0BF_ATMAX1024(addr & 0xff); - break; - default: - break; - } -} - /* a read from D500-D5FF area */ UBYTE CART_GetByte(UWORD addr) { if (rtime_enabled && (addr == 0xd5b8 || addr == 0xd5b9)) return RTIME_GetByte(); - CART_Access(addr); return 0xff; } @@ -435,85 +199,6 @@ void CART_PutByte(UWORD addr, UBYTE byte) RTIME_PutByte(byte); return; } - switch (myCart.type) - { - case CART_XEGS_32: - set_bank_809F(byte & 0x03, 0x6000); - break; - case CART_XEGS_64: - set_bank_809F(byte & 0x07, 0xe000); - break; - case CART_XEGS_128: - set_bank_809F(byte & 0x0f, 0x1e000); - break; - case CART_XEGS_256: - set_bank_809F(byte & 0x1f, 0x3e000); - break; - case CART_XEGS_512: - set_bank_809F(byte & 0x3f, 0x7e000); - break; - case CART_XEGS_1024: - set_bank_809F(byte & 0x7f, 0xfe000); - break; - case CART_ATRAX_128: - if (byte & 0x80) { - if (bank >= 0) { - CartA0BF_Disable(); - bank = -1; - } - } - else { - int b = byte & 0xf; - if (b != bank) { - CartA0BF_Enable(); - CopyROM(0xa000, 0xbfff, cart_image + b * 0x2000); - bank = b; - } - } - break; - case CART_MEGA_16: - set_bank_80BF(byte & 0x80); - break; - case CART_MEGA_32: - set_bank_80BF(byte & 0x81); - break; - case CART_MEGA_64: - set_bank_80BF(byte & 0x83); - break; - case CART_MEGA_128: - set_bank_80BF(byte & 0x87); - break; - case CART_MEGA_256: - set_bank_80BF(byte & 0x8f); - break; - case CART_MEGA_512: - set_bank_80BF(byte & 0x9f); - break; - case CART_MEGA_1024: - set_bank_80BF(byte & 0xbf); - break; - case CART_SWXEGS_32: - set_bank_809F(byte & 0x83, 0x6000); - break; - case CART_SWXEGS_64: - set_bank_809F(byte & 0x87, 0xe000); - break; - case CART_SWXEGS_128: - set_bank_809F(byte & 0x8f, 0x1e000); - break; - case CART_SWXEGS_256: - set_bank_809F(byte & 0x9f, 0x3e000); - break; - case CART_SWXEGS_512: - set_bank_809F(byte & 0xbf, 0x7e000); - break; - case CART_SWXEGS_1024: - set_bank_809F(byte, 0xfe000); - break; - default: - CART_Access(addr); - break; - } } /* special support of Bounty Bob on Atari5200 */ @@ -619,15 +304,9 @@ int CART_Checksum(const UBYTE *image, int nbytes) } int CART_Insert(const char *filename) { -#ifdef NOCASH - char sz[64]; sprintf(sz,"CART_Insert %s %08x\n",filename,cart_image);nocashMessage(sz); -#endif - FILE *fp; int len; - int type; - UBYTE header[16]; - + /* remove currently inserted cart */ CART_Remove(); @@ -644,10 +323,8 @@ int CART_Insert(const char *filename) { strcpy(cart_filename, filename); /* if full kilobytes, assume it is raw image */ - if ((len & 0x3ff) == 0) { -#ifdef NOCASH - nocashMessage("raw image detected\n"); -#endif + if ((len & 0x3ff) == 0) + { /* alloc memory and read data */ cart_image = (UBYTE *) Util_malloc(len); fread(cart_image, 1, len, fp); @@ -658,18 +335,16 @@ int CART_Insert(const char *filename) { myCart.type = CART_NONE; myCart.control = CTRL_JOY; int len_kb = len >> 10; /* number of kilobytes */ - for (type = 1; type <= CART_LAST_SUPPORTED; type++) - { - if (cart_kb[type] == len_kb) - { - if (myCart.type == CART_NONE) - { - myCart.type = type; - break; - } - } - } - + if (len_kb == 4) myCart.type = CART_5200_4; + if (len_kb == 8) myCart.type = CART_5200_8; + if (len_kb == 16) myCart.type = CART_5200_EE_16; + if (len_kb == 32) myCart.type = CART_5200_32; + if (len_kb == 40) myCart.type = CART_5200_40; + + // -------------------------------------------- + // Go grab the MD5 sum and see if we find + // it in our master table of games... + // -------------------------------------------- char md5[33]; hash_Compute(cart_image, len, (byte*)md5); //dsPrintValue(0,23,0,md5); @@ -688,59 +363,19 @@ int CART_Insert(const char *filename) { if (myCart.type != CART_NONE) { CART_Start(); -#ifdef NOCASH - nocashMessage("found cart type"); -#endif return 0; } free(cart_image); cart_image = NULL; return CART_BAD_FORMAT; } - /* if not full kilobytes, assume it is CART file */ - fread(header, 1, 16, fp); - if ((header[0] == 'C') && - (header[1] == 'A') && - (header[2] == 'R') && - (header[3] == 'T')) { - type = (header[4] << 24) | - (header[5] << 16) | - (header[6] << 8) | - header[7]; - if (CART_IsFor5200(type)) {fclose(fp); return CART_BAD_FORMAT; } - if (type >= 1 && type <= CART_LAST_SUPPORTED) { - int checksum; - len = cart_kb[type] << 10; - /* alloc memory and read data */ - cart_image = (UBYTE *) Util_malloc(len); - fread(cart_image, 1, len, fp); - fclose(fp); - checksum = (header[8] << 24) | - (header[9] << 16) | - (header[10] << 8) | - header[11]; - myCart.type = type; - CART_Start(); - { - int checksum2 = CART_Checksum(cart_image, len); - int error = (checksum == checksum2) ? 0 : CART_BAD_CHECKSUM; - return error; - } - } - } fclose(fp); return CART_BAD_FORMAT; } void CART_Remove(void) { -#ifdef NOCASH - char sz[64];sprintf(sz,"CART_Remove %08x\n",cart_image);nocashMessage(sz); -#endif myCart.type = CART_NONE; if (cart_image != NULL) { -#ifdef NOCASH - nocashMessage("free cart image\n"); -#endif free(cart_image); cart_image = NULL; } @@ -768,15 +403,10 @@ void CART_Start(void) CopyROM(0x5000, 0x5fff, cart_image + 0x4000); CopyROM(0x8000, 0x9fff, cart_image + 0x8000); CopyROM(0xa000, 0xbfff, cart_image + 0x8000); -#ifndef PAGED_ATTRIB - SetHARDWARE(0x4ff6, 0x4ff9); - SetHARDWARE(0x5ff6, 0x5ff9); -#else readmap[0x4f] = BountyBob1_GetByte; readmap[0x5f] = BountyBob2_GetByte; writemap[0x4f] = BountyBob1_PutByte; writemap[0x5f] = BountyBob2_PutByte; -#endif break; case CART_5200_NS_16: CopyROM(0x8000, 0xbfff, cart_image); @@ -803,32 +433,10 @@ void CART_Start(void) void CARTStateRead(void) { - int savedCartType = CART_NONE; - - /* Read the cart type from the file. If there is no cart type, becaused we have - reached the end of the file, this will just default to CART_NONE */ - ReadINT(&savedCartType, 1); - if (savedCartType != CART_NONE) { - char filename[FILENAME_MAX]; - ReadFNAME(filename); - if (filename[0]) { - /* Insert the cartridge... */ - if (CART_Insert(filename) >= 0) { - /* And set the type to the saved type, in case it was a raw cartridge image */ - myCart.type = savedCartType; - CART_Start(); - } - } - } } void CARTStateSave(void) { - /* Save the cartridge type, or CART_NONE if there isn't one...*/ - SaveINT(&myCart.type, 1); - if (myCart.type != CART_NONE) { - SaveFNAME(cart_filename); - } } #endif diff --git a/arm9/source/emu/input.c b/arm9/source/emu/input.c index dccf1d6..dde9b61 100644 --- a/arm9/source/emu/input.c +++ b/arm9/source/emu/input.c @@ -90,17 +90,18 @@ int mouse_joy_inertia = 10; #endif static UBYTE STICK[4], OLDSTICK[4]; -static UBYTE TRIG_input[4]; +static UBYTE TRIG_input[4] = {0,0,0,0}; //static int max_scanline_counter; //static int scanline_counter; void INPUT_Initialise(void) { - for (int i = 0; i < 2; i++) + for (int i = 0; i < 4; i++) { PCPOT_input[2 * i] = joy_5200_center; PCPOT_input[2 * i+1] = joy_5200_center; + TRIG_input[i] = 1; } } @@ -181,7 +182,7 @@ void INPUT_Frame(void) { STICK[3] = (i >> 4) & 0x0f;*/ //ALEK for (i = 0; i < 4; i++) { - for (i = 0; i < 2; i++) { + for (i = 0; i < 4; i++) { //if (joy_block_opposite_directions) { if ((STICK[i] & 0x0c) == 0) { /* right and left simultaneously */ if (last_stick[i] & 0x04) /* if wasn't left before, move left */ @@ -220,7 +221,7 @@ void INPUT_Frame(void) { } else { */ - for (i = 0; i < 2; i++) { + for (i = 0; i < 4; i++) { if ((STICK[i] & (STICK_CENTRE ^ STICK_LEFT)) == 0) { if (myCart.use_analog) { if (PCPOT_input[2 * i] >joy_5200_min) PCPOT_input[2 * i] -= myCart.analog_speed;