nes-ram-to-fceux - File README.txt
nes-ram-to-fceux
NES ROM for NROM boards that injects the initial CPU and PPU RAM values of the FCEUX emulator into an NES Console's CPU and PPU RAM
[GIT] git clone git://vigrey.com/git/nes-ram-to-fceux
README.txt - (4666 Bytes)
# NES RAM to FCEUX RAM Tool
##### Version 0.1.0
NES ROM for NROM boards that injects the initial CPU and PPU RAM values
of the FCEUX emulator into an NES Console's CPU and PPU RAM.
NES RAM to FCEUX RAM Tool was created by Vi Grey (https://vigrey.com)
<vi@vigrey.com> and is licensed under the BSD 2-Clause License.
### Description:
An NES ROM for NROM boards that injects the initial CPU and PPU values
of the FCEUX emulator into an NES Console's CPU and PPU RAM to allow
for consistent initial RAM values for the start of other games.
### Platforms:
- Linux
- macOS
- BSD
### NES ROM Build Dependencies:
- asm6 (You'll probably have to build asm6 from source. I am hosting a
copy of the source code at git://vigrey.com/git/asm6 but the source
code can also be found at https://3dscapture.com/NES/asm6.zip at the
time of writing this.)
### Build NES ROM:
From a terminal, go to the the main directory of this project (the
directory this README.md file exists in). You can then build the NES
ROM with the following command.
$ make
The resulting NES ROM will be located at `bin/nes-ram-to-fceux.nes`.
### Cleaning NES ROM Build Environment:
If you used `make` to build the NES ROM file, you can run the following
command to clean up the build environment.
$ make clean
### Selecting Initial CPU RAM:
Upon starting up the cartridge, either from Power-On or Reset, you can
select which initial CPU RAM you want. To do this, you will need to be
pressing specific buttons on either controller on Power-On or Reset.
The buttons are as follows:
* No direction on the D-pad: "Default" repeating sequence of
00 00 00 00 FF FF FF FF
* Left: All FF bytes
* Up: All 00 bytes
* Right: Random bytes
### Initializing PPU RAM:
Along with initializing the CPU RAM, you can also initialize the PPU
RAM. To do this, just hold B on either controller on Power-On or
Reset. This can be done with a selected CPU RAM Initialization mode as
well. Keep in mind though that if you clear the PPU RAM, the screen
will end up being solid gray, as all of the video RAM, including the
palette and drawn tiles will be zeroed out.
### Cartridge Swapping
After the FCEUX initial CPU and PPU RAM values are injected into the
NES Console's CPU and PPU RAM (this process will take about 4-10
frames), the game will run an infinite loop that modifies CPU RAM
address $01FD to #$4C (JMP), $01FE to #$FD and $01FF to #$01, thus
creating a JMP $01FD command at CPU RAM values $01FD-$01FF (inclusive
range). With the exception of addresses $01FD, $01FE, and $01FF, the
CPU RAM of the NES Console should be set to the initial RAM values of
FCEUX. If B was held at Power-On or Reset, then the PPU RAM of the
NES Console should be set to the initial PPU RAM values of FCEUX as
well. At this point, while the power is on, you can remove the
cartridge from the console and insert the next game you wish to use,
then press (but don't hold) "RESET". The new game should now start
with a consistent CPU (and PPU if that was optionally set) memory
state.
**Please Note:** If the NES Console has a functioning CIC Lockout Chip,
the console will power off and back on repeatedly until the RESET
button is pressed. This will cause the NES Console to break out of the
infinite loop. CPU RAM also degrades over time while the cartridge is
being swapped on an NES Console with a functioning CIC Lockout Chip.
It is still possible to cartridge swap on an unmodified front loading
NES Console, but be aware of likely RAM decay. If the NES Console has a
disabled CIC Lockout Chip (like a modded front loader) or no CIC
Lockout Chip at all (like the top loader NES-101 console model), the
console should stay powered on running the infinite loop.
### Write NES ROM to INL NROM Using INL-Retro Dumper/Programmer
In the host directory of the INL-retro-progdump repository from
https://gitlab.com/InfiniteNesLives/INL-retro-progdump, run the
following command. Replace `/path/to/nes-ram-to-fceux.nes` with the
path to the `nes-ram-to-fceux.nes` ROM. The NROM board can be set to
either Vertical or Horizontal Mirroring.
$ ./inlretro -s scripts/inlretro2.lua -c NES -m nrom -x 32 -y 8 -p /path/to/nes-ram-to-fceux.nes
### Special Thanks
- DwangoAC (https://tas.bot): For finally convincing me to make a tool
like this after I have procrastinated on making a tool like this for
many months
- Brad Smith (http://rainwarrior.ca): For providing me with tips and
knowledge while streaming production of the TKROM version of the
generic NES RAM Debug Tool
- Paul Molloy (https://infiniteneslives.com): For creating and
providing the NES NROM board for testing and use