Skip to content

Commit

Permalink
Merge pull request #778 from awjackson/mapper97
Browse files Browse the repository at this point in the history
More mapper fixes
  • Loading branch information
thor2016 authored Jan 19, 2025
2 parents 71ba361 + 4008488 commit eb5ca2e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 101 deletions.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ set(SRC_CORE
${CMAKE_CURRENT_SOURCE_DIR}/boards/120.cpp
${CMAKE_CURRENT_SOURCE_DIR}/boards/121.cpp
${CMAKE_CURRENT_SOURCE_DIR}/boards/12in1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/boards/151.cpp
${CMAKE_CURRENT_SOURCE_DIR}/boards/156.cpp
${CMAKE_CURRENT_SOURCE_DIR}/boards/158B.cpp
${CMAKE_CURRENT_SOURCE_DIR}/boards/15.cpp
Expand Down
59 changes: 0 additions & 59 deletions src/boards/151.cpp

This file was deleted.

23 changes: 3 additions & 20 deletions src/boards/datalatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,31 +370,14 @@ void Mapper94_Init(CartInfo *info) {
//------------------ Map 97 ---------------------------

static void M97Sync(void) {
setchr8(0);
setprg16(0x8000, ~0);
setprg16(0xc000, latche & 15);
switch (latche >> 6) {
case 0: break;
case 1: setmirror(MI_H); break;
case 2: setmirror(MI_V); break;
case 3: break;
}
setchr8(((latche >> 1) & 1) | ((latche << 1) & 2));
setmirror((latche >> 7) & 1);
setchr8(0);
}

void Mapper97_Init(CartInfo *info) {
Latch_Init(info, M97Sync, ~0, 0x8000, 0xFFFF, 0, 0);
}

//------------------ Map 101 ---------------------------

static void M101Sync(void) {
setprg32(0x8000, 0);
setchr8(latche);
}

void Mapper101_Init(CartInfo *info) {
Latch_Init(info, M101Sync, ~0, 0x6000, 0x7FFF, 0, 0);
Latch_Init(info, M97Sync, ~0, 0x8000, 0xBFFF, 0, 0);
}

//------------------ Map 107 ---------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/ines-correct.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@
{0xd4a76b07, 79, 0}, /* F-15 City Wars*/
{0x1eb4a920, 79, 1}, /* Double Strike */
{0x3e1271d5, 79, 1}, /* Tiles of Fate */
{0x0da5e32e, 87, 1}, /* Urusei Yatsura */
{0xd2699893, 88, 0}, /* Dragon Spirit */
{0xbb7c5f7a, 89, 8}, /* Mito Koumon or something similar */
{0x0da5e32e, 101, -1}, /* new Uruusey Yatsura */
{0x8eab381c, 113, 1}, /* Death Bots */
{0x6a03d3f3, 114, -1},
{0x0d98db53, 114, -1}, /* Pocahontas */
Expand Down
28 changes: 14 additions & 14 deletions src/ines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ BMAPPINGLocal bmap[] = {
{"100-in-1", 15, Mapper15_Init},
{"BANDAI 24C02", 16, Mapper16_Init},
{"FFE Rev. B", 17, Mapper17_Init},
{"JALECO SS880006", 18, Mapper18_Init}, // JF-NNX (EB89018-30007) boards
{"JALECO SS88006", 18, Mapper18_Init}, // JF-NNX (EB89018-30007) boards
{"Namcot 106", 19, Mapper19_Init},
// {"", 20, Mapper20_Init},
{"Konami VRC2/VRC4 A", 21, Mapper21_Init},
Expand All @@ -557,7 +557,7 @@ BMAPPINGLocal bmap[] = {
{"Konami VRC2/VRC4 D", 25, Mapper25_Init},
{"Konami VRC6 Rev. B", 26, Mapper26_Init},
{"CC-21 MI HUN CHE", 27, UNLCC21_Init}, // Former dupe for VRC2/VRC4 mapper, redefined with crc to mihunche boards
{"", 28, Mapper28_Init},
{"ACTION 53", 28, Mapper28_Init},
{"RET-CUFROM", 29, Mapper29_Init},
{"UNROM 512", 30, UNROM512_Init},
{"infiniteneslives-NSF", 31, Mapper31_Init},
Expand Down Expand Up @@ -630,7 +630,7 @@ BMAPPINGLocal bmap[] = {
// {"", 98, Mapper98_Init},
{"VS Uni/Dual- system", 99, Mapper99_Init},
// {"", 100, Mapper100_Init},
{"", 101, Mapper101_Init},
// {"", 101, Mapper101_Init}, // Deprecated, dupe
// {"", 102, Mapper102_Init},
{"FDS DOKIDOKI FULL", 103, Mapper103_Init},
// {"", 104, Mapper104_Init},
Expand All @@ -647,7 +647,7 @@ BMAPPINGLocal bmap[] = {
{"MMC3 PIRATE A", 115, Mapper115_Init},
{"MMC1/MMC3/VRC PIRATE",116, UNLSL12_Init},
{"FUTURE MEDIA BOARD", 117, Mapper117_Init},
{"TSKROM", 118, TKSROM_Init},
{"TKSROM", 118, TKSROM_Init},
{"NES-TQROM", 119, Mapper119_Init},
{"FDS TOBIDASE", 120, Mapper120_Init},
{"MMC3 PIRATE PROT. A", 121, Mapper121_Init},
Expand Down Expand Up @@ -680,11 +680,11 @@ BMAPPINGLocal bmap[] = {
{"SA0037", 148, SA0037_Init},
{"SA0036", 149, SA0036_Init},
{"S74LS374N", 150, S74LS374N_Init},
{"", 151, Mapper151_Init},
{"", 152, Mapper152_Init},
// {"", 151, Mapper151_Init}, // Deprecated, dupe
{"BA SARA DISCRETE", 152, Mapper152_Init},
{"BANDAI SRAM", 153, Mapper153_Init}, // Bandai board 16 with SRAM instead of EEPROM
{"", 154, Mapper154_Init},
{"", 155, Mapper155_Init},
{"MMC1A", 155, Mapper155_Init}, // No WRAM disable
{"", 156, Mapper156_Init},
{"BANDAI BARCODE", 157, Mapper157_Init},
// {"", 158, Mapper158_Init},
Expand All @@ -709,15 +709,15 @@ BMAPPINGLocal bmap[] = {
{"", 177, Mapper177_Init},
{"", 178, Mapper178_Init},
// {"", 179, Mapper179_Init},
{"", 180, Mapper180_Init},
{"UNROM+74HC08", 180, Mapper180_Init}, // Crazy Climber
{"", 181, Mapper181_Init},
// {"", 182, Mapper182_Init}, // Deprecated, dupe
{"", 183, Mapper183_Init},
{"", 184, Mapper184_Init},
{"", 185, Mapper185_Init},
{"", 186, Mapper186_Init},
{"SUNSOFT-K", 184, Mapper184_Init}, // Sunsoft-1 mapper
{"CNROM+SECURITY", 185, Mapper185_Init},
{"STUDY BOX", 186, Mapper186_Init},
{"", 187, Mapper187_Init},
{"", 188, Mapper188_Init},
{"KARAOKE STUDIO", 188, Mapper188_Init},
{"", 189, Mapper189_Init},
{"", 190, Mapper190_Init},
{"", 191, Mapper191_Init},
Expand Down Expand Up @@ -757,8 +757,8 @@ BMAPPINGLocal bmap[] = {
{"", 225, Mapper225_Init},
{"BMC 22+20-in-1", 226, Mapper226_Init},
{"", 227, Mapper227_Init},
{"", 228, Mapper228_Init},
{"", 229, Mapper229_Init},
{"ACTIVE ENTERPRISES", 228, Mapper228_Init},
{"BMC 31-in-1", 229, Mapper229_Init},
{"BMC Contra+22-in-1", 230, Mapper230_Init},
{"", 231, Mapper231_Init},
{"BMC QUATTRO", 232, Mapper232_Init},
Expand Down
4 changes: 2 additions & 2 deletions src/vsuni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ VSUNIENTRY VSUniGames[] =
{ "Freedom Force", 0xed96436bd1b5e688ULL, 4, 0, GIPPU_RP2C04_0001, VS_OPTION_GUN, 0, EGIVS_NORMAL }, /* Wrong color in game select screen? */
{ "Stroke and Match Golf", 0x612325606e82bc66ULL, 99, 2, GIPPU_RP2C04_0002, VS_OPTION_SWAPDIRAB | VS_OPTION_PREDIP, 0x01, EGIVS_NORMAL },

{ "Goonies", 0xb4032d694e1d2733ULL, 151, 1, GIPPU_RP2C04_0003, 0, 0, EGIVS_NORMAL },
{ "Gradius", 0x50687ae63bdad976ULL, 151, 1, GIPPU_RP2C04_0001, VS_OPTION_SWAPDIRAB, 0, EGIVS_NORMAL },
{ "Goonies", 0xb4032d694e1d2733ULL, 75, 2, GIPPU_RP2C04_0003, 0, 0, EGIVS_NORMAL },
{ "Gradius", 0x47b22dfda574b968ULL, 75, 2, GIPPU_RP2C04_0001, VS_OPTION_SWAPDIRAB, 0, EGIVS_NORMAL },
{ "Gumshoe", 0x87161f8ee37758d3ULL, 99, 2, GIPPU_RC2C05_03, VS_OPTION_GUN, 0, EGIVS_NORMAL },
{ "Gumshoe", 0xb8500780bf69ce29ULL, 99, 2, GIPPU_RC2C05_03, VS_OPTION_GUN, 0, EGIVS_NORMAL },
{ "Hogan's Alley", 0xd78b7f0bb621fb45ULL, 99, 2, GIPPU_RP2C04_0001, VS_OPTION_GUN, 0, EGIVS_NORMAL },
Expand Down
1 change: 0 additions & 1 deletion vc/vc14_fceux.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z_64.dll" "$(OutDir)"</Command>
<ClCompile Include="..\src\boards\121.cpp" />
<ClCompile Include="..\src\boards\12in1.cpp" />
<ClCompile Include="..\src\boards\15.cpp" />
<ClCompile Include="..\src\boards\151.cpp" />
<ClCompile Include="..\src\boards\156.cpp" />
<ClCompile Include="..\src\boards\158B.cpp" />
<ClCompile Include="..\src\boards\164.cpp" />
Expand Down
3 changes: 0 additions & 3 deletions vc/vc14_fceux.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,6 @@
<ClCompile Include="..\src\boards\99.cpp">
<Filter>boards</Filter>
</ClCompile>
<ClCompile Include="..\src\boards\151.cpp">
<Filter>boards</Filter>
</ClCompile>
<ClCompile Include="..\src\boards\156.cpp">
<Filter>boards</Filter>
</ClCompile>
Expand Down

0 comments on commit eb5ca2e

Please sign in to comment.