Experimental versions of the Nintendulator, which are used for various tests of the chip simulator.
The original version of the Nintendulator with the CPU core replaced by the Breaks M6502Core.
Distinctions:
- The part of the code directly related to 6502 (instruction and BRK-sequence emulator) is stripped from CPU.cpp and put into CPUCore.cpp
- CPUBreaksCore.cpp is used instead of the original sawed off piece of CPUCore.cpp
- The PCH/PCL macros are inside CPU.cpp / CPUCore.cpp so that they do not conflict
Results:
- The emulation speed is 20-30 FPS. It can still be accelerated a little bit, but it will take considerable effort.
- Passes all tests of regular and illegal instructions in
nestest
Build:
Use the solution from the msvcXXX folder and the Debug Breaks
/ Release Breaks
configuration to build.
A special version of the Nintendulator for logging access to the APU/PPU registers.
The result of the logging is a .regdump file with the following format of records:
#pragma pack(push, 1)
struct RegDumpEntry
{
uint32_t clkDelta; // Delta of previous CLK counter (CPU Core clock cycles) value at the time of accessing to the register
uint8_t reg; // Register index + Flag (msb - 0: write, 1: read)
uint8_t value; // Written value. Not used for reading.
uint16_t padding; // Not used (yet?)
};
#pragma pack(pop)
It only makes sense to dump registers $4015/$2002 read, because reading it performs additional actions inside the APU/PPU.
You can then use these dumps to test your APU/PPU implementation separately from the rest of the NES/Famicom components.
It is best for simple .nes, without complicated mappers to work with VRAM.
To start and stop logging, use the Misc
menu:
The log is recorded in the .regdump file in the folder with the emulator.
Simulator of a real APU DAC.
Uses pre-compiled tables that are used to translate digital outputs of audio generators into analog levels (voltage).
Note: APU.cpp uses digital values of audio generators that are not compatible with real processor, so they are preconverted to their original form (as in chip: Square/Triangle/Noise 4 bit, DMC 7 bit).
Use the Sound menu to turn on the DAC Simulator: