fix linking, rename lib, prep for GB/C
get more consoles working. PCE still not there
fix PCE hucard loading; CD still broken
fix PCE CD loading and firmware. SGB still not quite there
get SGB working
add gitlab recipe for libretro buildbot
This is implemented by pretending every 16 bytes in ROM is a different function, allowing the profiler to display cycle counts for each individual "function" in the UI
Also fixes a missing call to ResetFlags for the merge opcode for FX3
Also fixed a few scenarios where the PPU memory write callbacks did not allow the Lua script to change the value about to be written (because the callback was called too late)
-Fixed getAccessCounters documentation (swapped param order)
-Fixed file watcher not being disabled properly when closing the script window, causing the script to run if changed on the disk, even if the script window is closed
-Prevent file watcher from triggering from writes done by the script window itself (which caused the script to be reloaded 2 or 3 times in a row)
-Fixed UI freezes when using emu.log() on a large table
-Fixed crash when 100k character limit (in the last 500 lines) for script log was reached (out of bounds read/write)
-Added "fps" value to "getState"
-Slightly improved getAccessCounters/getCdlData performance
-Added a new drawPixels API to improve performance when a script needs to draw a lot of individual pixels
Misc fixes:
-Fixed issues with the opcode tooltip not appearing for some GBA instructions (esp. when the condition code ends with an 's', e.g: rsbcs, movls, subcs)
-Fixed byte code not being lower case when the "use lower case" option is enabled
Also, minor bug fixes for WS:
-Fixed tilemap viewer for sometimes using the wrong background color
-Fixed the 4-bit RGB color values in the palette viewer having the R and B values swapped
Also:
-Improved emu.log() to support tables/array and numeric values, instead of only strings.
-Fixed duplicate save state key name for GB
-Fixed TrimRight logic not working properly when the string had a single non-space character followed by spaces (e.g TrimRight("A ") returned "A ")
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format"
* fix ui format warnings
getCpuState/setCpuState allow the same functionality as getState/setState, but limited to only the CPU's state, making them much faster (some performance optimizations to the serialization & Lua code were also done)
getMasterClock/getCpuCycleCount are very fast alternatives to getState when all the script needs is a cycle count.
* Debugger: NES - Show Namco 163's audio RAM in memory viewer, breakpoints, etc.
* Fixed crash when debugging NSF files
* Limit mapper ram to $180 bytes and 0-init all of the "bios" region that's mapped to CPU ram (4100-41FF)
When switching between GB and SGB models and then power cycling, the old BIOS would continue being used for the new model. This fixes that for GB and any other firmware where a similar problem may have come up.
Thanks to Sour for this fix.
-Replaced dummy reads with idle cycles where needed
-Fixed order of operation for some instructions
-Fixed IRQ timing (was 10 cycles, should be 8)
-Tweaked VDC timings to match test roms after the IRQ timing changes
The game sets the sprites to obj mode 3 (by mistake?), which is an unused "stereoscopic" mode for sprites. Mode 3 seems to behave like mode 0 when the global "stereoscopic" flag is not set (previously "green swap"), so the sprites are meant to display normally in this scenario (instead of being hidden like they were before)
Caused by what looks like slight differences between how AOT treats an empty array (vs JIT builds) when it marshals the array (AOT sends a null pointer, JIT sends a pointer to an empty array)
This was causing issues in both builds (AOT crashed immediately because of the null pointer, JIT read from out-of-bounds memory)
-Labels defined within the assembler that were referred to before their definition did not work properly and ended up being assigned the wrong value (when the label's address wasn't a value between 0x100 and 0xFFFF) - this is fixed by running multiple passes until the resulting byte code stops changing.
-Fixed issues where e.g EOR $00, Y would be assembled as a 2-byte instruction, which is invalid.
If the number of rows and columns did not result in an amount of bytes that was a power of 2, the viewer would incorrectly repeat some tiles, etc.
This was broken by performance fixes done a few months ago
Prevent queueing another update while the previous update is still running, which should prevent most issues.
Also slightly improves performance for the SNES tilemap viewer (which was causing the freeze when displaying an 8bpp 1024x1024 tilemap)