Merged with 1.8.0+.
Updated save state patch to use exe hook. Patch must be re-applied if non-base FPGA is loaded. Only works on base FPGA file.
Fixed bug in exe portion to support reentrant code.
Removed development features in the FPGA (streaming/buffer changes).
Added back MSU and DSP to main FPGA file.
To support multiple custom chips the FPGA is reconfigured at ROM loading
time while the menu is running.
After reconfiguration the initial state of all synchronizing shift
registers was 0 which led the FPGA to believe the SNES is actively
accessing the bus, writing to peripheral address $00 (CPU address $2100
- brightness register). This invalid state persists for a couple of FPGA
cycles until the SNES control signals have been clocked into the shift
registers.
The recently introduced brightness patch partly reacts to this pattern,
momentarily forcing the sd2snes data bus drivers active. Depending on
the SNES CPU's current position in the cycle this could cause a crash,
disrupting the game loading handshake. Upon pushing reset the game would
still run but without long reset or autosave features, so one would
inevitably lose their SRAM contents.
This fix initializes the synchronizers for all active low control
registers with 1's (and the CPU_CLK synchronizer with 0's for good
measure) so the FPGA doesn't make up any accesses that do not exist.
This intercepts and overrides writes to $2100, limiting the brightness
written to a configurable value (8..15).
The FPGA feature bitfield is extended to 16 bits to accomodate the 4
additional bits for the brightness limit.
The menu itself does not apply the brightness limit on FPGA level but
"fakes" it by setting the brightness manually. The newly added menu
change hooks are used to reflect the brightness setting as soon as it is
changed during selection.
This applies a simple rule set to patch CPU writes to the PPU2
brightness register ($2100), avoiding brightness DAC voltage changes
when switching to/from forced blanking, also substituting brightness 0
when the picture is to be darkened momentarily.
This fixes, on 1CHIP consoles:
- darkening of picture along the top edge on Capcom games
- distorted scanlines+garbage on Rudra no Hihou dialogue boxes
- invisible shadow in A.S.P. Air Strike Patrol
Fixed timing problem in MCU. In 0.1.7e firmware.
Disabled in-game saving to SD card for gsu games. Hold reset button to save.
Disabled gsu DEBUG and enabled msu by default.
Fixed multiplication timing problems again. The fix isn't ideal, but this is the only way it worked.
Removed some commented out code as a minor cleanup.