Skip to content

Commit 54dae52

Browse files
authored
Merge pull request #180 from fhoedemakers/dvi2
Mapper 5 support
2 parents b7f2552 + df13d14 commit 54dae52

25 files changed

Lines changed: 4571 additions & 511 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ bld/
7474
[Oo]bj/
7575
[Ll]og/
7676
[Ll]ogs/
77-
77+
*.nes
7878
# Visual Studio 2015/2017 cache/options directory
7979
.vs/
8080
# Uncomment if you have tasks that create the project's static files in wwwroot

CHANGELOG.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANGELOG
22

3+
New and improved mappers. Castlevania III is now fully playable — US version only on RP2350, Japanese version (Akumajou Densetsu) on both RP2040 and RP2350.
4+
35
# General Info
46

57
[Binaries for each configuration and PCB design are at the end of this page](#downloads___).
@@ -8,6 +10,38 @@
810

911
[See setup section in readme how to install and wire up](https://github.com/fhoedemakers/pico-infonesPlus#pico-setup)
1012

13+
# v0.38
14+
15+
## New and improved Mapper support
16+
17+
- **RP2350 only:** Added support for Mapper 5 (MMC5 – *Castlevania III* US). Graphical glitches may still occur. These MMC 5 games are tested:
18+
- Castlevania III US
19+
- Gemfire (USA version)
20+
- Romance of the Three Kingdoms II (Japanese version)
21+
- Nobunaga’s Ambition II (Japanese/USA version)
22+
- **All platforms (RP2040/RP2350):** Added support for Mapper 24 (VRC6A – *Castlevania III/Akumajou Densetsu* JP).
23+
- Mapper 30 (NesMaker) now working.
24+
- Fix HUD not displaying in Parodius DA! (Jap) - mapper 23
25+
- Fix HUD not displaying in Fudou Myouou Den (Japan) - mapper 80
26+
- ~~Fixed missing hit sound effects in Battletoads and Battletoads & Double Dragon. [#111](https://github.com/fhoedemakers/pico-infonesPlus/issues/111)~~
27+
- Fix corrupt graphics in Punch Out! and Fire Emblem Gaiden (JP)
28+
29+
Many thanks to [@szuping](https://github.com/szuping) for testing the mapper changes.
30+
31+
Mapper fixes were developed with the help of [Anthropic Claude](https://www.anthropic.com/claude/opus).
32+
33+
## Display & audio
34+
35+
- Added a new **"Display Mode"** option on HSTX boards, allowing selection between HDMI and DVI. When DVI is selected, external audio (when available) is enabled by default. DVI does not have audio over HDMI.
36+
- Enabling **External audio** no longer forces DVI mode.
37+
- **Adafruit Fruit Jam:**
38+
- Headphone detection now works correctly. Plugging in headphones automatically mutes the internal speaker; unplugging them re-enables it.
39+
- Removed the setting and pushbutton1 functionality for muting the internal speaker. Headphone detection now automatically mutes the internal speaker.
40+
41+
## Fixes
42+
43+
- Updated the metadata and cover art pack with missing entries, including artwork for several Japanese titles. See the [Downloads section](#downloads___) below for the download link and instructions. Thanks again to [@DynaMight1124](https://github.com/DynaMight1124)
44+
1145
# v0.37
1246

1347
- Added support for DVI (Video only) mode on HSTX boards (GPIO 12–19) as an alternative to HDMI (Video + Audio). This allows the emulator to work on displays that do not support HDMI but do support DVI. [#171](https://github.com/fhoedemakers/pico-infonesPlus/issues/171).
@@ -44,16 +78,6 @@ To use HDMI audio, disable External Audio in the Settings menu.
4478

4579
- Various fixes and improvements
4680

47-
# v0.35 release notes
48-
49-
## Fixes
50-
51-
- The -s option (PSRAM cs pin) is removed from pico_shared/bld.sh script as it caused issues with the PSRAM settings in pico_shared/BoardConfigs.cmake. The PSRAM CS pin must be set correctly in pico_shared/BoardConfigs.cmake. (default is 47)
52-
- Murmulator M1 and M2 fixes [#165](https://github.com/fhoedemakers/pico-infonesPlus/issues/165):
53-
- Second NES controller now works.
54-
- PS_RAM setting fixed for M2 board.
55-
- PS_RAM setting added for M1 board.
56-
5781

5882
# previous changes
5983

CMakeLists.txt

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ IF(NOT CMAKE_BUILD_TYPE)
4646
ENDIF(NOT CMAKE_BUILD_TYPE)
4747
message("* Current build type is : ${CMAKE_BUILD_TYPE}")
4848
if (NOT HW_CONFIG)
49-
set(HW_CONFIG 2 CACHE STRING "Select the hardware configuration for your board")
49+
set(HW_CONFIG 7 CACHE STRING "Select the hardware configuration for your board")
5050
endif()
5151
if (NOT USE_HSTX)
5252
set(USE_HSTX 1 CACHE STRING "Use HSTX for display output when possible")
@@ -57,19 +57,8 @@ if (NOT PICO_BOARD )
5757
set(PICO_BOARD pico2 CACHE STRING "Board type")
5858
message("PICO_BOARD not set, using default: ${PICO_BOARD}")
5959
endif()
60-
# Although Pico 2 has enough memory, mapper 5 games do not work properly. (sound and screen glitches)
61-
# if (PICO_BOARD STREQUAL "pico2" OR PICO_BOARD STREQUAL "pico2_w")
62-
# set(INFONES_PICO_BOARD "1" CACHE STRING "Select the hardware configuration for your board")
63-
# set(INFONES_MAPPER_5_ENABLED "1" CACHE STRING "Enable NES Mapper 5")
64-
# else()
65-
# set(INFONES_PICO_BOARD "0" CACHE STRING "Select the hardware configuration for your board")
66-
# set(INFONES_MAPPER_5_ENABLED "0" CACHE STRING "Enable NES Mapper 5")
67-
# endif()
68-
set(INFONES_MAPPER_5_ENABLED "0" CACHE STRING "Enable NES Mapper 5")
69-
message("Mapper 5 enabled : ${INFONES_MAPPER_5_ENABLED}")
70-
add_definitions( -DNDEBUG )
71-
7260

61+
add_definitions( -DNDEBUG )
7362

7463
include(${PICO_SDK_PATH}/lib/tinyusb/hw/bsp/family_support.cmake)
7564
project(${projectname} C CXX ASM)
@@ -85,6 +74,13 @@ add_executable(${projectname}
8574
state.cpp
8675
)
8776

77+
if (PICO_PLATFORM STREQUAL "rp2350-arm-s" OR PICO_PLATFORM STREQUAL "rp2350-riscv")
78+
set(INFONES_MAPPER_5_ENABLED "1" CACHE STRING "Enable NES Mapper 5")
79+
else()
80+
set(INFONES_MAPPER_5_ENABLED "0" CACHE STRING "Enable NES Mapper 5")
81+
endif()
82+
message("Mapper 5 enabled : ${INFONES_MAPPER_5_ENABLED}")
83+
8884
# Optional: embed a NES ROM directly into the firmware.
8985
# Usage: cmake -DEMBED_NES_ROM=/path/to/rom.nes ..
9086
if (EMBED_NES_ROM)

HISTORY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# History of changes
22

3+
# v0.35 release notes
4+
5+
## Fixes
6+
7+
- The -s option (PSRAM cs pin) is removed from pico_shared/bld.sh script as it caused issues with the PSRAM settings in pico_shared/BoardConfigs.cmake. The PSRAM CS pin must be set correctly in pico_shared/BoardConfigs.cmake. (default is 47)
8+
- Murmulator M1 and M2 fixes [#165](https://github.com/fhoedemakers/pico-infonesPlus/issues/165):
9+
- Second NES controller now works.
10+
- PS_RAM setting fixed for M2 board.
11+
- PS_RAM setting added for M1 board.
12+
313
# v0.34 release notes
414

515
- Implemented savestates [#140](https://github.com/fhoedemakers/pico-infonesPlus/issues/140)

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ Click on image below to see a demo video.
3737
## Possible configurations
3838

3939
You can use it with these RP2040/RP2350 boards and configurations:
40-
41-
- Raspberry Pi Pico, Pico 2, [Pimoroni Pico Plus 2](https://shop.pimoroni.com/products/pimoroni-pico-plus-2?variant=42092668289107). Requires one of these addons:
42-
- [Pimoroni Pico DV Demo Base](https://shop.pimoroni.com/products/pimoroni-pico-dv-demo-base?variant=39494203998291) hdmi add-on board. For use with a USB gamecontroller or up to two a legacy NES controllers. (NES controller ports require soldering)
43-
- Breadboard and
44-
- [Adafruit DVI Breakout For HDMI Source Devices](https://www.adafruit.com/product/4984)
45-
- [Adafruit Micro-SD breakout board+](https://www.adafruit.com/product/254).
46-
47-
For use with a USB gamecontroller or up to two legacy NES controllers. (No soldering requirerd)
4840

4941
- A custom printed circuit board (PCB) designed by [@johnedgarpark](https://twitter.com/johnedgarpark). (requires soldering) Up to two NES controller ports can be added to this PCB. Can also be used with a USB gamecontroller. You can 3d print your own NES-like case for the PCB. The Pimoroni Pico Plus 2 is not suitable for this PCB because of the SP/CE connector on back of the board
5042

@@ -82,6 +74,14 @@ See downloads in the releases page for the correct binary to use with this board
8274
- [Murmulator M1 and M2 boards](https://murmulator.ru).
8375
See downloads in the releases page for the correct binary to use with these boards.
8476

77+
- (Discontinued) [Pimoroni Pico Plus 2](https://shop.pimoroni.com/products/pimoroni-pico-plus-2?variant=42092668289107) and a Raspberry Pi Pico, Pico 2. Requires one of these addons:
78+
- [Pimoroni Pico DV Demo Base](https://shop.pimoroni.com/products/pimoroni-pico-dv-demo-base?variant=39494203998291) hdmi add-on board. For use with a USB gamecontroller or up to two a legacy NES controllers. (NES controller ports require soldering)
79+
- Breadboard and
80+
- [Adafruit DVI Breakout For HDMI Source Devices](https://www.adafruit.com/product/4984)
81+
- [Adafruit Micro-SD breakout board+](https://www.adafruit.com/product/254).
82+
83+
For use with a USB gamecontroller or up to two legacy NES controllers. (No soldering requirerd)
84+
8585
[See below to see how to setup your specific configuration.](#Setup)
8686

8787
> [!NOTE]
@@ -179,7 +179,7 @@ I also do not take responsability in any way when damage is caused to the Pico o
179179

180180
Click on the link below for your specific board configuration:
181181

182-
- [Raspberry Pi Pico or Pico 2, setup for Pimoroni Pico DV Demo Base](#raspberry-pi-pico-or-pico-2-setup-for-pimoroni-pico-dv-demo-base)
182+
183183
- [Raspberry Pi Pico or Pico 2, setup with Adafruit hardware and breadboard](#raspberry-pi-pico-or-pico-2-setup-with-adafruit-hardware-and-breadboard)
184184
- [Pimoroni Pico Plus 2](#raspberry-pi-pico-or-pico-2-setup-with-adafruit-hardware-and-breadboard)
185185
- [Adafruit Feather RP2040 with DVI (HDMI) Output Port setup](#adafruit-feather-rp2040-with-dvi-hdmi-output-port-setup)
@@ -195,11 +195,15 @@ Click on the link below for your specific board configuration:
195195
* [3D printed case for this PCB](#3d-printed-case)
196196
- [PCB with WaveShare RP2350 USB A](#pcb-with-waveshare-rp2350-usb-a)
197197
* [Build Guide](#build-guide)
198+
- (Discontinued) [Raspberry Pi Pico or Pico 2, setup for Pimoroni Pico DV Demo Base](#raspberry-pi-pico-or-pico-2-setup-for-pimoroni-pico-dv-demo-base)
198199

199200
***
200201

201202
## Raspberry Pi Pico or Pico 2, setup for Pimoroni Pico DV Demo Base.
202203

204+
> [!NOTE]
205+
> This board is discontinued and no longer sold by Pimoroni
206+
203207
### materials needed
204208
- Raspberry Pi Pico or Pico 2 with soldered male headers.
205209
- [Pimoroni Pico DV Demo Base](https://shop.pimoroni.com/products/pimoroni-pico-dv-demo-base?variant=39494203998291).
@@ -784,7 +788,7 @@ When ordering, simply upload the zip file containing the gerber design. This fi
784788
> If you are looking for the previous design (v0.2). You can find it [here](PCB/v0.2)
785789
786790
> [!NOTE]
787-
> It seems that sellers on AliExpress have copied the PCB design and are selling pre-populated PCB's. I do not condone this in any way. For questions about those boards, please contact the seller on AliExpress.
791+
> It seems that sellers on AliExpress have copied the PCB design and are selling pre-populated PCB's. For questions about those boards, please contact the seller on AliExpress.
788792
789793
Other materials needed:
790794

@@ -944,7 +948,6 @@ Gamepad buttons:
944948
- **Pimoroni Pico DV Demo Base only**: SELECT + LEFT: Switch audio output to the connected speakers on the line-out jack of the Pimoroni Pico DV Demo Base. The speaker setting will be remembered when the emulator is restarted.
945949
- **Fruit Jam Only**
946950
- SELECT + UP: Toggle scanlines.
947-
- pushbutton 1 (on board): Mute audio of built-in speaker. Audio is still outputted to the audio jack.
948951
- pushbutton 2 (on board) or SELECT + RIGHT: Toggles the VU meter on or off. (NeoPixel LEDs light up in sync with the music rhythm)
949952
- START + LEFT/RIGHT: Adjust volume of built-in speaker and external audio jack.
950953
- **RP2350 with PSRAM only**: Record about 30 seconds of audio by pressing START to pause the game and then START + BUTTON1. Audio is recorded to **/soundrecorder.wav** on the SD-card.
@@ -1061,7 +1064,7 @@ Some displays need 5V connected to the HDMI breakout in order to work:
10611064

10621065
# Known Issues and limitations
10631066

1064-
- Due to the Pico's memory limitations, not all games will work. Games not working will show a "Mapper n is unsupported." (n is a number). For example starting Castlevania III will show the "Mapper 5 is unsupported." message.
1067+
- Not all games will run, as some mappers are either not fully implemented or exceed memory limitations. If a game uses an unsupported mapper, the system will display a message such as: "Mapper n is unsupported." (where n is the mapper number). For example, attempting to start Castlevania III (US) on the RP2040 will result in the message: "Mapper 5 is unsupported." On the RP2350, however, this game runs without issues.
10651068
- tar file support is removed.
10661069

10671070
***
@@ -1184,6 +1187,8 @@ PSRAM: https://github.com/AndrewCapon/PicoPlusPsram
11841187

11851188
lwmem: https://github.com/MaJerle/lwmem
11861189

1190+
[Anthropic Claude Opus 4.6](https://www.anthropic.com/claude/opus): Assisted with NES mapper 5 (MMC5), mapper 24 (VRC6a), mapper 30, fixes in other mappers, and with general code optimizations and bug fixes.
1191+
11871192
***
11881193

11891194
# Other versions

infones/InfoNES.cpp

Lines changed: 73 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,13 @@ void InfoNES_Fin()
365365
Frens::f_free(PPURAM);
366366
Frens::f_free(SPRRAM);
367367
Frens::f_free(ChrBuf);
368+
#if NES_MAPPER_5_ENABLED == 1
369+
if (Map5_Wram) { Frens::f_free(Map5_Wram); Map5_Wram = nullptr; }
370+
if (Map5_Ex_Ram) { Frens::f_free(Map5_Ex_Ram); Map5_Ex_Ram = nullptr; }
371+
if (Map5_Ex_Vram) { Frens::f_free(Map5_Ex_Vram); Map5_Ex_Vram = nullptr; }
372+
if (Map5_Ex_Nam) { Frens::f_free(Map5_Ex_Nam); Map5_Ex_Nam = nullptr; }
373+
Map5_Gfx_Mode = 0;
374+
#endif
368375
}
369376

370377
/*===================================================================*/
@@ -431,17 +438,20 @@ int InfoNES_Reset()
431438
/*-------------------------------------------------------------------*/
432439

433440
// Get Mapper Number
434-
MapperNo = NesHeader.byInfo1 >> 4;
441+
// MapperNo = (NesHeader.byInfo1 >> 4) ;
435442

436-
// Check bit counts of Mapper No.
437-
for (nIdx = 4; nIdx < 8 && NesHeader.byReserve[nIdx] == 0; ++nIdx)
438-
;
443+
// // Check bit counts of Mapper No.
444+
// for (nIdx = 4; nIdx < 8 && NesHeader.byReserve[nIdx] == 0; ++nIdx)
445+
// ;
439446

440-
if (nIdx == 8)
441-
{
442-
// Mapper Number is 8bits
443-
MapperNo |= (NesHeader.byInfo2 & 0xf0);
444-
}
447+
// if (nIdx == 8)
448+
// {
449+
// // Mapper Number is 8bits
450+
// MapperNo |= (NesHeader.byInfo2 & 0xf0);
451+
// }
452+
453+
// Mapper Number is 8bits. Always use lower 4bits of byInfo2 for compatibility with old ROMs.
454+
MapperNo = (NesHeader.byInfo1 >> 4) | (NesHeader.byInfo2 & 0xf0);
445455

446456
// Get information on the ROM
447457
ROM_Mirroring = NesHeader.byInfo1 & 1;
@@ -1017,11 +1027,24 @@ void __not_in_flash_func(InfoNES_DrawLine)()
10171027
{
10181028
pPoint += 8 - PPU_Scr_H_Bit;
10191029

1020-
const auto pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
10211030
const int ch = *pbyNameTable;
1022-
const int bank = (ch >> 6) + bankOfsBG;
1023-
const int addrOfs = ((ch & 63) << 4) + yOfsModBG;
1024-
const auto data = PPUBANK[bank] + addrOfs;
1031+
#if NES_MAPPER_5_ENABLED == 1
1032+
const WORD *pal;
1033+
const BYTE *data;
1034+
if (Map5_Gfx_Mode == 1) {
1035+
const BYTE exram = Map5_Ex_Vram[nY * 32 + nX];
1036+
pal = &PalTable[((exram >> 6) & 3) << 2];
1037+
const int chrBank4K = ((int)Map5_Chr_Upper << 6) | (exram & 0x3F);
1038+
const int vromPage = (chrBank4K * 4 + (ch >> 6)) % (NesHeader.byVRomSize << 3);
1039+
data = VROMPAGE(vromPage) + ((ch & 63) << 4) + yOfsModBG;
1040+
} else {
1041+
pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
1042+
data = PPUBANK[(ch >> 6) + bankOfsBG] + ((ch & 63) << 4) + yOfsModBG;
1043+
}
1044+
#else
1045+
const auto pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
1046+
const auto data = PPUBANK[(ch >> 6) + bankOfsBG] + ((ch & 63) << 4) + yOfsModBG;
1047+
#endif
10251048
const auto pl0 = data[0];
10261049
const auto pl1 = data[8];
10271050
const auto pat0 = (pl0 & 0x55) | ((pl1 << 1) & 0xaa);
@@ -1062,12 +1085,27 @@ void __not_in_flash_func(InfoNES_DrawLine)()
10621085

10631086
auto putBG = [&](int nX) __attribute__((always_inline))
10641087
{
1065-
const auto pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
1066-
const auto palAddr = reinterpret_cast<uintptr_t>(pal);
10671088
const int ch = *pbyNameTable;
1089+
#if NES_MAPPER_5_ENABLED == 1
1090+
const WORD *pal;
1091+
const BYTE *data;
1092+
if (Map5_Gfx_Mode == 1) {
1093+
const BYTE exram = Map5_Ex_Vram[nY * 32 + nX];
1094+
pal = &PalTable[((exram >> 6) & 3) << 2];
1095+
const int chrBank4K = ((int)Map5_Chr_Upper << 6) | (exram & 0x3F);
1096+
const int vromPage = (chrBank4K * 4 + (ch >> 6)) % (NesHeader.byVRomSize << 3);
1097+
data = VROMPAGE(vromPage) + ((ch & 63) << 4) + yOfsModBG;
1098+
} else {
1099+
pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
1100+
data = PPUBANK[(ch >> 6) + bankOfsBG] + ((ch & 63) << 4) + yOfsModBG;
1101+
}
1102+
#else
1103+
const auto pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
10681104
const int bank = (ch >> 6) + bankOfsBG;
10691105
const int addrOfs = ((ch & 63) << 4) + yOfsModBG;
10701106
const auto data = PPUBANK[bank] + addrOfs;
1107+
#endif
1108+
const auto palAddr = reinterpret_cast<uintptr_t>(pal);
10711109
const auto pl0 = data[0];
10721110
const auto pl1 = data[8];
10731111
// const auto pat0 = (pl0 & 0x55) | ((pl1 << 1) & 0xaa);
@@ -1110,6 +1148,7 @@ void __not_in_flash_func(InfoNES_DrawLine)()
11101148
#endif
11111149

11121150
// Callback at PPU read/write
1151+
pbyChrData = PPU_BG_Base + (*pbyNameTable << 6) + nYBit;
11131152
MapperPPU(PATTBL(pbyChrData));
11141153

11151154
++pbyNameTable;
@@ -1145,6 +1184,7 @@ void __not_in_flash_func(InfoNES_DrawLine)()
11451184
#endif
11461185

11471186
// Callback at PPU read/write
1187+
pbyChrData = PPU_BG_Base + (*pbyNameTable << 6) + nYBit;
11481188
MapperPPU(PATTBL(pbyChrData));
11491189

11501190
++pbyNameTable;
@@ -1163,11 +1203,24 @@ void __not_in_flash_func(InfoNES_DrawLine)()
11631203
}
11641204
#else
11651205
{
1166-
const auto pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
11671206
const int ch = *pbyNameTable;
1168-
const int bank = (ch >> 6) + bankOfsBG;
1169-
const int addrOfs = ((ch & 63) << 4) + yOfsModBG;
1170-
const auto data = PPUBANK[bank] + addrOfs;
1207+
#if NES_MAPPER_5_ENABLED == 1
1208+
const WORD *pal;
1209+
const BYTE *data;
1210+
if (Map5_Gfx_Mode == 1) {
1211+
const BYTE exram = Map5_Ex_Vram[nY * 32 + nX];
1212+
pal = &PalTable[((exram >> 6) & 3) << 2];
1213+
const int chrBank4K = ((int)Map5_Chr_Upper << 6) | (exram & 0x3F);
1214+
const int vromPage = (chrBank4K * 4 + (ch >> 6)) % (NesHeader.byVRomSize << 3);
1215+
data = VROMPAGE(vromPage) + ((ch & 63) << 4) + yOfsModBG;
1216+
} else {
1217+
pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
1218+
data = PPUBANK[(ch >> 6) + bankOfsBG] + ((ch & 63) << 4) + yOfsModBG;
1219+
}
1220+
#else
1221+
const auto pal = &PalTable[(((pAttrBase[nX >> 2] >> ((nX & 2) + nY4)) & 3) << 2)];
1222+
const auto data = PPUBANK[(ch >> 6) + bankOfsBG] + ((ch & 63) << 4) + yOfsModBG;
1223+
#endif
11711224
const auto pl0 = data[0];
11721225
const auto pl1 = data[8];
11731226
const auto pat0 = (pl0 & 0x55) | ((pl1 << 1) & 0xaa);
@@ -1200,6 +1253,7 @@ void __not_in_flash_func(InfoNES_DrawLine)()
12001253
#endif
12011254

12021255
// Callback at PPU read/write
1256+
pbyChrData = PPU_BG_Base + (*pbyNameTable << 6) + nYBit;
12031257
MapperPPU(PATTBL(pbyChrData));
12041258

12051259
/*-------------------------------------------------------------------*/

0 commit comments

Comments
 (0)