diff --git a/changelog.txt b/changelog.txt index 60c6037f..322c3209 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +03-march-2010 - prockguy - fceux - now prints the name of the mapper on rom load 03-march-2010 - prockguy - SDL - VS unisystem keys now configable 03-march-2010 - prcokguy - SDL - changed default hotkeys and keys to match w32 03-march-2010 - prockguy - SDL - fixed dpad/joyhat support diff --git a/src/ines.cpp b/src/ines.cpp index ebf1dfe5..8733b06a 100644 --- a/src/ines.cpp +++ b/src/ines.cpp @@ -530,6 +530,156 @@ static int not_power2[] = { 228 }; +typedef struct { + char* name; + int number; + void (*init)(CartInfo *); +} BMAPPING; + +static BMAPPING bmap[] = { + {"NROM", 0, NROM_Init}, + {"MMC1", 1, Mapper1_Init}, + {"UNROM", 2, UNROM_Init}, + {"CNROM", 3, CNROM_Init}, + {"MMC3", 4, Mapper4_Init}, + {"MMC5", 5, Mapper5_Init}, + {"ANROM", 7, ANROM_Init}, + {"Color Dreams", 11, Mapper11_Init}, + {"", 12, Mapper12_Init}, + {"CPROM", 13, CPROM_Init}, + {"100-in1", 15, Mapper15_Init}, + {"Bandai", 16, Mapper16_Init}, + {"Namcot 106", 19, Mapper19_Init}, + {"Konami VRC2 type B", 23, Mapper23_Init}, + {"Wario Land 2", 35, UNLSC127_Init}, // Wario Land 2 + {"TXC Policeman", 36, Mapper36_Init}, // TXC Policeman + {"", 37, Mapper37_Init}, + {"Bit Corp. Crime Busters", 38, Mapper38_Init}, // Bit Corp. Crime Busters + {"", 43, Mapper43_Init}, + {"", 44, Mapper44_Init}, + {"", 45, Mapper45_Init}, + {"", 47, Mapper47_Init}, + {"", 49, Mapper49_Init}, + {"", 52, Mapper52_Init}, + {"", 57, Mapper57_Init}, + {"", 58, BMCGK192_Init}, + {"", 60, BMCD1038_Init}, + {"MHROM", 66, MHROM_Init}, + {"Sunsoft Mapper #4", 68, Mapper68_Init}, + {"", 70, Mapper70_Init}, + {"", 74, Mapper74_Init}, + {"Irem 74HC161/32", 78, Mapper78_Init}, + {"", 87, Mapper87_Init}, + {"", 88, Mapper88_Init}, + {"", 90, Mapper90_Init}, + {"Sunsoft UNROM", 93, SUNSOFT_UNROM_Init}, + {"", 94, Mapper94_Init}, + {"", 95, Mapper95_Init}, + {"", 101, Mapper101_Init}, + {"", 103, Mapper103_Init}, + {"", 105, Mapper105_Init}, + {"", 106, Mapper106_Init}, + {"", 107, Mapper107_Init}, + {"", 108, Mapper108_Init}, + {"", 112, Mapper112_Init}, + {"", 113, Mapper113_Init}, + {"", 114, Mapper114_Init}, + {"", 115, Mapper115_Init}, + {"", 116, Mapper116_Init}, +// {116, UNLSL1632_Init}, + {"", 117, Mapper117_Init}, + {"TSKROM", 118, TKSROM_Init}, + {"", 119, Mapper119_Init}, + {"", 120, Mapper120_Init}, + {"", 121, Mapper121_Init}, + {"UNLH2288", 123, UNLH2288_Init}, + {"UNL22211", 132, UNL22211_Init}, + {"SA72008", 133, SA72008_Init}, + {"", 134, Mapper134_Init}, + {"TCU02", 136, TCU02_Init}, + {"S8259D", 137, S8259D_Init}, + {"S8259B", 138, S8259B_Init}, + {"S8259C", 139, S8259C_Init}, + {"", 140, Mapper140_Init}, + {"S8259A", 141, S8259A_Init}, + {"UNLKS7032", 142, UNLKS7032_Init}, + {"TCA01", 143, TCA01_Init}, + {"", 144, Mapper144_Init}, + {"SA72007", 145, SA72007_Init}, + {"SA0161M", 146, SA0161M_Init}, + {"TCU01", 147, TCU01_Init}, + {"SA0037", 148, SA0037_Init}, + {"SA0036", 149, SA0036_Init}, + {"S74LS374N", 150, S74LS374N_Init}, + {"", 152, Mapper152_Init}, + {"", 153, Mapper153_Init}, + {"", 154, Mapper154_Init}, + {"", 155, Mapper155_Init}, + {"SA009", 160, SA009_Init}, + {"", 163, Mapper163_Init}, + {"", 164, Mapper164_Init}, + {"", 165, Mapper165_Init}, +// {169, Mapper169_Init}, + {"", 171, Mapper171_Init}, + {"", 172, Mapper172_Init}, + {"", 173, Mapper173_Init}, + {"", 175, Mapper175_Init}, + {"BMCFK23C", 176, BMCFK23C_Init}, + {"", 177, Mapper177_Init}, + {"", 178, Mapper178_Init}, + {"", 180, Mapper180_Init}, + {"", 181, Mapper181_Init}, + {"", 182, Mapper182_Init}, + {"", 183, Mapper183_Init}, + {"", 184, Mapper184_Init}, + {"", 185, Mapper185_Init}, + {"", 186, Mapper186_Init}, + {"", 187, Mapper187_Init}, + {"", 188, Mapper188_Init}, + {"", 189, Mapper189_Init}, + {"", 191, Mapper191_Init}, + {"", 192, Mapper192_Init}, + {"", 194, Mapper194_Init}, + {"", 195, Mapper195_Init}, + {"", 196, Mapper196_Init}, + {"", 197, Mapper197_Init}, + {"", 198, Mapper198_Init}, + {"", 199, Mapper199_Init}, + {"", 200, Mapper200_Init}, + {"", 205, Mapper205_Init}, + {"DEIROM", 206, DEIROM_Init}, + {"", 208, Mapper208_Init}, + {"", 209, Mapper209_Init}, + {"", 210, Mapper210_Init}, + {"", 211, Mapper211_Init}, + {"", 215, Mapper215_Init}, + {"", 216, Mapper216_Init}, + {"", 217, Mapper217_Init}, + {"UNLA9746", 219, UNLA9746_Init}, + +// {220, BMCFK23C_Init}, +// {220, UNL3DBlock_Init}, +// {220, UNLTF1201_Init}, +// {220, TCU02_Init}, +// {220, UNLCN22M_Init}, +// {220, BMCT2271_Init}, +// {220, UNLDANCE_Init}, + + {"UNLN625092", 221, UNLN625092_Init}, + {"", 222, Mapper222_Init}, + {"", 226, Mapper226_Init}, + {"", 235, Mapper235_Init}, + {"UNL6035052", 238, UNL6035052_Init}, + {"", 240, Mapper240_Init}, + {"S74LS374NA", 243, S74LS374NA_Init}, + {"", 245, Mapper245_Init}, + {"", 249, Mapper249_Init}, + {"", 250, Mapper250_Init}, + {"", 253, Mapper253_Init}, + {"", 254, Mapper254_Init}, + {"", 0, 0} +}; + int iNESLoad(const char *name, FCEUFILE *fp, int OverwriteVidMode) { @@ -679,7 +829,8 @@ int iNESLoad(const char *name, FCEUFILE *fp, int OverwriteVidMode) FCEU_printf("%02x",iNESCart.MD5[x]); FCEU_printf("\n"); } - FCEU_printf(" Mapper: %d\n Mirroring: %s\n", MapperNo,Mirroring==2?"None(Four-screen)":Mirroring?"Vertical":"Horizontal"); + FCEU_printf(" Mapper #: %d\n Mapper name: %s\n Mirroring: %s\n", + MapperNo, bmap[MapperNo].name, Mirroring==2?"None(Four-screen)":Mirroring?"Vertical":"Horizontal"); if(head.ROM_type&2) FCEU_printf(" Battery-backed.\n"); if(head.ROM_type&4) FCEU_printf(" Trained.\n"); @@ -1286,163 +1437,13 @@ static void iNESPower(void) } } - -typedef struct { - int number; - void (*init)(CartInfo *); -} BMAPPING; - -static BMAPPING bmap[] = { - {0, NROM_Init}, - {1, Mapper1_Init}, - {2, UNROM_Init}, - {3, CNROM_Init}, - {4, Mapper4_Init}, - {5, Mapper5_Init}, - {7, ANROM_Init}, - {11, Mapper11_Init}, - {12, Mapper12_Init}, - {13, CPROM_Init}, - {15, Mapper15_Init}, - {16, Mapper16_Init}, - {19, Mapper19_Init}, - {23, Mapper23_Init}, - {35, UNLSC127_Init}, // Wario Land 2 - {36, Mapper36_Init}, // TXC Policeman - {37, Mapper37_Init}, - {38, Mapper38_Init}, // Bit Corp. Crime Busters - {43, Mapper43_Init}, - {44, Mapper44_Init}, - {45, Mapper45_Init}, - {47, Mapper47_Init}, - {49, Mapper49_Init}, - {52, Mapper52_Init}, - {57, Mapper57_Init}, - {58, BMCGK192_Init}, - {60, BMCD1038_Init}, - {66, MHROM_Init}, - {68, Mapper68_Init}, - {70, Mapper70_Init}, - {74, Mapper74_Init}, - {78, Mapper78_Init}, - {87, Mapper87_Init}, - {88, Mapper88_Init}, - {90, Mapper90_Init}, - {93, SUNSOFT_UNROM_Init}, - {94, Mapper94_Init}, - {95, Mapper95_Init}, - {101, Mapper101_Init}, - {103, Mapper103_Init}, - {105, Mapper105_Init}, - {106, Mapper106_Init}, - {107, Mapper107_Init}, - {108, Mapper108_Init}, - {112, Mapper112_Init}, - {113, Mapper113_Init}, - {114, Mapper114_Init}, - {115, Mapper115_Init}, - {116, Mapper116_Init}, -// {116, UNLSL1632_Init}, - {117, Mapper117_Init}, - {118, TKSROM_Init}, - {119, Mapper119_Init}, - {120, Mapper120_Init}, - {121, Mapper121_Init}, - {123, UNLH2288_Init}, - {132, UNL22211_Init}, - {133, SA72008_Init}, - {134, Mapper134_Init}, - {136, TCU02_Init}, - {137, S8259D_Init}, - {138, S8259B_Init}, - {139, S8259C_Init}, - {140, Mapper140_Init}, - {141, S8259A_Init}, - {142, UNLKS7032_Init}, - {143, TCA01_Init}, - {144, Mapper144_Init}, - {145, SA72007_Init}, - {146, SA0161M_Init}, - {147, TCU01_Init}, - {148, SA0037_Init}, - {149, SA0036_Init}, - {150, S74LS374N_Init}, - {152, Mapper152_Init}, - {153, Mapper153_Init}, - {154, Mapper154_Init}, - {155, Mapper155_Init}, - {160, SA009_Init}, - {163, Mapper163_Init}, - {164, Mapper164_Init}, - {165, Mapper165_Init}, -// {169, Mapper169_Init}, - {171, Mapper171_Init}, - {172, Mapper172_Init}, - {173, Mapper173_Init}, - {175, Mapper175_Init}, - {176, BMCFK23C_Init}, - {177, Mapper177_Init}, - {178, Mapper178_Init}, - {180, Mapper180_Init}, - {181, Mapper181_Init}, - {182, Mapper182_Init}, - {183, Mapper183_Init}, - {184, Mapper184_Init}, - {185, Mapper185_Init}, - {186, Mapper186_Init}, - {187, Mapper187_Init}, - {188, Mapper188_Init}, - {189, Mapper189_Init}, - {191, Mapper191_Init}, - {192, Mapper192_Init}, - {194, Mapper194_Init}, - {195, Mapper195_Init}, - {196, Mapper196_Init}, - {197, Mapper197_Init}, - {198, Mapper198_Init}, - {199, Mapper199_Init}, - {200, Mapper200_Init}, - {205, Mapper205_Init}, - {206, DEIROM_Init}, - {208, Mapper208_Init}, - {209, Mapper209_Init}, - {210, Mapper210_Init}, - {211, Mapper211_Init}, - {215, Mapper215_Init}, - {216, Mapper216_Init}, - {217, Mapper217_Init}, - {219, UNLA9746_Init}, - -// {220, BMCFK23C_Init}, -// {220, UNL3DBlock_Init}, -// {220, UNLTF1201_Init}, -// {220, TCU02_Init}, -// {220, UNLCN22M_Init}, -// {220, BMCT2271_Init}, -// {220, UNLDANCE_Init}, - - {221, UNLN625092_Init}, - {222, Mapper222_Init}, - {226, Mapper226_Init}, - {235, Mapper235_Init}, - {238, UNL6035052_Init}, - {240, Mapper240_Init}, - {243, S74LS374NA_Init}, - {245, Mapper245_Init}, - {249, Mapper249_Init}, - {250, Mapper250_Init}, - {253, Mapper253_Init}, - {254, Mapper254_Init}, - { 0, 0} -}; - static int NewiNES_Init(int num) { BMAPPING *tmp=bmap; if(GameInfo->type == GIT_VSUNI) AddExState(FCEUVSUNI_STATEINFO, ~0, 0, 0); - + while(tmp->init) { if(num==tmp->number)