69 Commits
Author SHA1 Message Date
SourMesen 8ac7e1df7d Lua: Fixed address value in memory callbacks when using memory types other than the default cpu memory type (#265)
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)
2026-08-27 19:00:22 +09:00
SourMesen 49c9a3a4ba GB: Added overclock and remove sprite limit options (#216) 2026-07-11 17:47:41 +09:00
SourMesen a7910b9766 Windows: Fixed build error after latest MSVC update (VS2026 May update) (#127)
Also fixed GB PPU problem caused by the compiler changing how it builds this particular bit of code (which has been a problem in the past for the same code in the GB debug tools)
2026-05-18 21:15:29 +09:00
NovaSquirrelandSour 325c78fcbd GB: Link cable support with two local consoles (#77)
* GB: Link cable support with two local consoles

* GB: Fix crash when color blending is enabled

* GB: Fix formatting

* GB: Link UI fixes, control fixes, audio fixes

Copied from Sour's branch. Also a separate change to use separate savefiles.

* GB: Try to avoid crashes from buffer overflows

* GB: Separate savefiles with linked multiplayer

* GB: Add support for faster link speed

* GB: Move enum to correct file

* GB: Refactor, move serial transfer to function

* -Fixed secondary console sometimes running far ahead of the main console when frame counters did not match (e.g because one console had their LCD disabled longer, etc.) This would cause buffer overflows in the audio buffer.
-Fixed screen tearing when both consoles are not perfectly in sync (because of the LCD being disabled for a different amount of time, etc.)
-Fixed main console not calling PlayQueuedAudio properly mid-frame
-Reuse VS Dualsystem code to merge audio/video when possible/simple and moved that to AvMergeUtilities

Some visual glitches can appear on the secondary screen (for GB) while rewinding, but this can't really be fixed.

* Fixed warning (unused local variable)

* Prevent loading single-console save states when in dual-console modes

* Disable debugger for VS DualSystem's subconsole. Fixes issues when debugging VS DualSystem games

* Code cleanup

* Rework solution to disable debugger on second console to improve performance
Added InternalRunFrame for nes & gb to avoid checking for the presence of the second console after each cpu instruction

* Don't enable the linked GB option by default

* Removed unused function

* Netplay: Force game to reload after updating emulation settings when connecting to the server (or when the host changes game)
This ensures that e.g the GB link cable setting is applied and that the game loads correctly, regardless of the client's link cable settings (otherwise the game could load without the link mode enabled, etc.)

---------

Co-authored-by: Sour <[email protected]>
2026-05-15 02:35:27 -07:00
NovaSquirrel 4380777010 GB: Add GBC palette to memory viewer (#93) 2026-05-10 10:29:18 +09:00
SourMesen e391fd8f9a Code: Add auto-formatting rules for C++ (clang-format) and enforce in CI via "clang-format" and "dotnet format" (#78)
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format"

* fix ui format warnings
2026-04-30 06:03:55 -07:00
Sour f5a957abf0 GBC: Fixed HDMA behavior when CPU is halted and then resumes
Fixes regression caused by the fix done for the hblank_vram_dma test rom.
HDMA should run immediately after the CPU resumes - fixes the menu in Nascar 2000
2025-07-02 21:49:20 +09:00
Sour 2e8ca044ec GB: Fixed HDMA not running on scanline 143
This fixes graphical issues in Warau Inu no Bouken (because some tiles were not being transferred to VRAM)
2025-03-23 13:33:45 +09:00
Sour e9a0e7aaa5 SGB: Improved logic to select row/bank to write pixels to
Uses hblank/vblank (when mode changes) to move to the next row/reset to the top of the screen
2025-03-02 13:23:07 +09:00
Sour 6f68db5c4b GB: Improved behavior when changing SCX in the middle of a scanline
Improves the results for the m3_scx_high_5_bits and m3_scx_low_3_bits tests, and fixes the effect in one of the scenes in the "Mental respirator" demo
2025-01-20 13:11:54 +09:00
Sour fd2c3fa46e GBC: Initialize palette RAM based on power on ram option
The "Vila Caldan Color" homebrew demo (?) doesn't initialize the OBJ palette and would likely get non-deterministic OBJ colors on hardware
2025-01-20 13:04:41 +09:00
Sour af78010bc2 GB: Fixed white pixels appearing on screen in CGB mode when writing to $FF47 2024-10-23 16:27:21 +09:00
Sour f80ee42c73 GB: Fixed BG color when BG layer is disabled and BGP doesn't set index 0 as color 0
Fixes title screen in Megami Tensei Gaiden
2024-05-24 16:34:13 +09:00
Sour e1eaaf71ef GB: Fixed SGB issue when GB is powered off and then back on
Some state was not being reset properly, causing an issue with the GB logo in Akumajou Dracula in SGB mode
2024-05-13 23:22:10 +09:00
Sour bbc1087888 GB: Fixed crash in Super Mario Land 2 in GBC mode
When entering Wario's castle, the game frequently crashed in GBC mode.  This was caused by the different timing for the rendering idle cycles - making the GBC timing identical to the GB fixed the crash (and other minor adjustments fixed the couple of GBC test roms that broke as a result)
2024-05-13 20:41:15 +09:00
Sour c61297c6c5 GB: Fixed missing HUD in 007 The World Is Not Enough 2024-05-12 22:26:25 +09:00
Sour 25142a9451 GB: Improved STOP behavior for GB/GBC
Fixes the stop_instr and stop_instr_gbc_mode3 tests
2024-01-31 17:50:15 +09:00
Sour 0ea8d88a05 GB: Implemented GBC LCDC glitch required to pass cgb-acid-hell test 2024-01-30 22:23:12 +09:00
Sour 18eb40dd62 GB: Improve behavior when OAM DMA runs during rendering 2024-01-25 17:30:24 +09:00
Sour 4745bab5e4 GB: Fixed read behavior for FEA0-FEFF when DMA is running 2024-01-24 22:21:15 +09:00
Sour 0a74000e18 GB: Fixed memory leak 2024-01-24 22:20:48 +09:00
Sour f466a69083 GB: Minor refactoring 2024-01-23 23:44:48 +09:00
Sour b673028d6d GB: Improve behavior when BG rendering is toggled on/off 2024-01-23 22:26:01 +09:00
Sour 36d23cc47d GB: Performance tweaks 2024-01-23 22:26:01 +09:00
Sour 3a55b60c24 GB: Implement the window glitch that causes additional pixels to be added to the BG FIFO
Passes the windesync-validate test
2024-01-23 22:26:01 +09:00
Sour bc3b265e3e GB: Improve BGP mid-scanline writes behavior + tweak halt timing for CGB
ppu_scanline_bgp and m3_bgp_change tests display the correct result
2024-01-23 22:26:01 +09:00
Sour 5d44c98827 GB: Fixed blanking logic when LCD is disabled and then re-enabled for CGB
Allows Alone in the Dark + Men in Black to both work properly
2024-01-23 22:26:01 +09:00
Sour 6d278285c8 GB: Improved window timing/behavior
Fixes glitchy scanline in Pocket Music
2024-01-23 22:26:01 +09:00
Sour 7af69362e8 GB: Tweak halt IRQ detection timing, change ppu vs cpu order of operation 2024-01-23 22:26:01 +09:00
Sour f51d8bd56f GB: Fixed IRQs getting triggered when re-enabling the LCD 2024-01-23 22:26:01 +09:00
Sour ef2ab6a104 GB: Re-add hblank mode at the start of a new frame, but only for DMG 2024-01-23 22:26:01 +09:00
Sour 4065f9a45d GB: Fixed graphical glitches during start sequence in Densha de Go 2
Unsure if the fix is correct, but this is what breaks the game's timings. Until the GB core's LCD timings are improved, this will do - this fix does not seem to change the result of any test rom
2024-01-12 18:05:10 +09:00
Sour f251aa766a GB: Improved window enable logic
Removed what was probably an incorrect patch for Warriors of Might And Magic
2023-06-30 22:03:04 +09:00
Sour ff032b3230 GBC: Fixed issues with read/writing palette register
Fixes "CRAM readable" and "CRAM access blocking" tests
2023-05-12 23:36:21 -04:00
Sour 88894a272b GB: Improved logic to enable window
Only enable window if WY==LY at some point in the frame - setting WY during the frame to a value before the current scanline should not turn on the window
Fixes glitches when moving in Urusei Yatsura
2023-04-13 19:38:04 -04:00
Sour 976825b6f3 GBC: Fixed broken HUD in Warriors of Might and Magic
Window does not get enabled on CGB when WX=0 (?)
2023-04-13 00:08:02 -04:00
Sour 556ea9b6f1 GB: First frame after turning on LCD on CGB shouldn't be white
Fixes flickering in the intro of Men in Black - The Series
2023-04-12 23:09:06 -04:00
Sour 380377dd82 GBC: Fixed GBC sprite priority logic 2023-04-12 20:50:31 -04:00
Sour 945b1c8418 GB: Fixed out-of-bounds writes when processing oam corruption 2023-04-11 21:34:08 -04:00
Sour 41a082b8e0 GB: Fixed scene transitions in Alone in the Dark
CGB should also turn white when LCD is disabled (at least based on what other emulators are doing)
2023-04-09 00:28:40 -04:00
Sour 1abc479e0f GB: Fixed CGB sprite priority 2023-03-07 00:46:25 -05:00
Sour b147bc67d3 GB: Implemented OAM corruption bug 2023-02-26 23:47:27 -05:00
Sour b4618eb47a GB: Allow loading GB/GBC/SGB save states on any of the 3 models 2023-01-30 19:50:05 -05:00
Sour 78ebd36c13 SGB: Fixed GB LCD being stuck in "first frame" mode permanently 2023-01-28 18:30:01 -05:00
Sour d449f0c641 Debugger: Added cpuType parameter for Lua events 2023-01-24 22:14:24 -05:00
Sour 7108bdde36 Refactoring - Moved some leftover files out of the root folder 2022-09-08 21:48:49 -04:00
Sour 152abf690b Rename stdafx.h to pch.h 2022-09-08 21:29:52 -04:00
Sour 6163158637 Debugger: Lua - Implemented getState + setState 2022-07-31 15:00:53 -04:00
Sour 495dc1f4be GB: Fixed behavior when disabling GB background while in SGB mode 2022-07-27 23:35:41 -04:00
Sour 7c6a028206 UI: Implemented shortcuts to enable/disable bg/sprite layers 2022-07-27 19:29:48 -04:00