BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

Update mupen64plus to latest upstream version

Open Morilli opened this issue 1 year ago • 41 comments

Work in progress update of the mupen64plus core to the latest version. This would ideally improve compatibility and increase accuracy and be a real-time playable alternative to the existing ares64 core.

dev build for branch | Morilli:tmp-mupen

There's a couple of known TODOs that need to be resolved:

  • [x] RSP and RDP plugin choices are not final. Currently the diff contains the angrylion-plus, GLideN64 and paraLLEl RDP plugins and mupen64plus's HLE and cxd4 RSP plugins and the paraLLEl rsp plugin. Apparently mupen-rr uses better-gln64 which may be worth considering for its high speed.
  • [x] sync settings for plugins need to be implemented; ~~those are currently all default because no choices exist~~ done
  • [x] ~~integrate mupen core and plugin sources and build in the bizhawk repo; I currently build from a fork that is not checked in to bizhawk (https://github.com/Morilli/mupen64plus-core/tree/bizhawk)~~ <-- done, added basic build script. There's still some issues while waiting for upstream commits, but assuming we fork all projects anyway that shouldn't be a blocker
  • [x] IDebuggable functionality is missing, mainly because registers aren't implemented. Registers not being implemented also affects ITraceable impl (why is that required but only exposed in IDebuggable... whatever)
  • [x] ~~the (mupen) debugger has some overhead and should be toggleable~~ I'll consider this unfeasible as lots of functionality depends on the debugger now, overhead is probably negligible
  • [x] compile for linux as well
  • [x] ~~some games have graphical issues with GLideN64, this appears to be a plugin issue that can't be resolved easily~~ resolved upstream
  • [ ] lots of testing, I have no test roms or known complex test games so I can't say whether anything is broken beyond simple game boots working
  • [x] ~~re-investigate linux binaries after 25203c59aa8d18758b11f1ba2f4bf370277b7e1e~~ program freeze has been resolved via workaround (see #4553), GLideN64 crash resolved via compiler arguments, cxd4 crash has been resolved upstream
  • [ ] reimplement the digital-->analog controls, or do it properly in the frontend (#3871)

The diff should be relatively clean, the commit history isn't. Best to look at the full diff instead of individual commits.

Morilli avatar Nov 15 '24 20:11 Morilli

I feel I should let @Wyst3r know about this.

vadosnaprimer avatar Nov 16 '24 08:11 vadosnaprimer

The latest commit adds linux binaries which "work", as in everything loads, but I've experienced freezing after 1-100 frames. It's not a crash, just an unresponsiveness forcing me to close the program. I have no idea how to debug this except by adding dozens of console.writelines and trying to narrow down the place it's getting stuck at.

Morilli avatar Nov 17 '24 20:11 Morilli

Just for the sake of re-documenting it here and not like somewhere in the Discord (and it is the first todo point).

better gln64 is a high recommended from Mupen64-rr-lua mainly for it having low hardware requirements and better to TAS with.

The only caveat against it from what I can tell is that it's HLE and not LLE and some glitches with certain titles (which some of the plugins already in Hawk has those issues). So in other words it would be a suitable replacement to Rice (so lowest of the low).

And whilst porting it, it's probably beneficial to disable the texture settings (technically you can hide everything, and make it just the plugin, but some people might benefit from disabling fog).

Spikestuff avatar Nov 21 '24 13:11 Spikestuff

Linux can be fixed to work with all currently checked in binaries by applying the following diff:

diff --git a/Assets/EmuHawkMono.sh b/Assets/EmuHawkMono.sh
index 7ca69f6ea..e695450ac 100755
--- a/Assets/EmuHawkMono.sh
+++ b/Assets/EmuHawkMono.sh
@@ -18,6 +18,7 @@ fi
 export LD_LIBRARY_PATH="$PWD/dll:$PWD:$libpath"
 export MONO_CRASH_NOFILE=1
 export MONO_WINFORMS_XIM_STYLE=disabled # see https://bugzilla.xamarin.com/show_bug.cgi?id=28047#c9
+export MONO_THREADS_SUSPEND=preemptive
 if [ "$1" = "--mono-no-redirect" ]; then
 #	printf "(passing --mono-no-redirect is no longer necessary)\n" #TODO uncomment later
 	shift

Looking at the documentation, it looks like this might be an actual mono bug (maybe https://github.com/mono/mono/issues/14084 ?). Either hybrid (default) or coop values hang for me, just preemptive works without issues.

Morilli avatar Jan 22 '25 19:01 Morilli

Pre-emptive mode also improved framerates in managed and maybe wbox, so ^ I set it globally. Nice find!

~~Testing this branch now.~~ Well it doesn't hang and the audio is working, but still no video. solitaire effect That's with GLideN64. I tried changing it to angrylion-plus as suggested but got a black screen with no audio.

YoshiRulz avatar Jan 22 '25 19:01 YoshiRulz

Well it doesn't hang and the audio is working, but still no video. That's with GLideN64. I tried changing it to angrylion-plus as suggested but got a black screen with no audio.

Could you post the full stdout/stderr output? There should be some logging about plugins in the beginning.

Morilli avatar Jan 22 '25 20:01 Morilli

GLideN64
running as unprivileged user
HawkFile bound /home/yoshi/Documents/BizHawk/output/gamedb/mame_machines.txt
HawkFile bound /home/yoshi/Documents/BizHawk/output/gamedb/NesCarts.xml
MAME Machine DB load: 00:00:00.0222606 sec
Bootgod DB load: 00:00:00.1173148 sec
throttle method: 1; resolution: 10000000
extra bundled gamedb files were not #included: gamedb_3ds.txt, gamedb_msx2-L.txt, mame_machines.txt, gamedb_Odyssey2.txt, gamedb_msx1-L.txt
GameDB load: 00:00:00.6495401 sec
Using SDL2 for host input (keyboard + gamepads)
HawkFile bound /home/yoshi/Downloads/roms/cam_proj_rev/Super Mario 64 (USA).n64
Game was not in DB. CRC: 3CE60709 MD5: 20B854B239203BAF6C961B850A4A51A2
N64
DEBUG CALLBACK 2: No version number in 'Core' config section. Setting defaults.
DEBUG CALLBACK 2: No version number in 'CoreEvents' config section. Setting defaults.
DEBUG CALLBACK 3: Using full mem base
DEBUG CALLBACK 1: Unable to open rom database file '(null)'.
SUCCESS
SUCCESS
DEBUG CALLBACK 3: Goodname: SUPER MARIO 64 (unknown rom)
DEBUG CALLBACK 3: Name: SUPER MARIO 64      
DEBUG CALLBACK 3: MD5: 20B854B239203BAF6C961B850A4A51A2
DEBUG CALLBACK 3: CRC: 635A2BFF 8B022326
DEBUG CALLBACK 3: Imagetype: .z64 (native)
DEBUG CALLBACK 3: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
DEBUG CALLBACK 5: ClockRate = F
DEBUG CALLBACK 3: Version: 1444
DEBUG CALLBACK 3: Manufacturer: Nintendo
DEBUG CALLBACK 5: Cartridge_ID: 4D53
DEBUG CALLBACK 3: Country: USA
DEBUG CALLBACK 5: PC = 80246000
DEBUG CALLBACK 5: Save type: 0
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
DEBUG CALLBACK 2: Input plugin does not contain VRU support.
DEBUG CALLBACK 3: input plugin did not specify a render callback; there will be no on screen display by the input plugin.
SUCCESS
SUCCESS
SUCCESS
SUCCESS
DEBUG CALLBACK 3: Using video capture backend: dummy
DEBUG CALLBACK 3: Using CIC type X102
Attempted to SetVideoMode, width 640, height 480, bpp 0, screenMode WINDOWED, flags SUPPORT_RESIZING
State changed! Param VIDEO_MODE, new value 2
State changed! Param VIDEO_SIZE, new value 41943520
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations.
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast).
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations.
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 2 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast).
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 3 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) will use SYSTEM HEAP memory as the source for buffer object operations.
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 3 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_DYNAMIC_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast).
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 2
DEBUG CALLBACK 3: Initializing 2 RDRAM modules for a total of 4 MB
DEBUG CALLBACK 3: Starting R4300 emulator: Dynamic Recompiler
DEBUG CALLBACK 3: Init new dynarec
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
SwapBuffers was called.
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 320 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 320 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1120 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1120 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1120 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1120 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1120 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1088 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
DebugSourceApi DebugTypeError DebugSeverityHigh: GL_INVALID_OPERATION error generated. The required buffer is missing.
reading and enqueuing 1056 samples
SwapBuffers was called.
entering dispose...
DEBUG CALLBACK 4: Stopping emulation.
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 2
SUCCESS
DEBUG CALLBACK 3: R4300 emulator finished.
State changed! Param VIDEO_MODE, new value 1
State changed! Param EMU_STATE, new value 1
DEBUG CALLBACK 4: Rom closed.
BizHawk has completed its shutdown routines, killing process...
angrylion-plus
running as unprivileged user
HawkFile bound /home/yoshi/Documents/BizHawk/output/gamedb/mame_machines.txt
HawkFile bound /home/yoshi/Documents/BizHawk/output/gamedb/NesCarts.xml
MAME Machine DB load: 00:00:00.0244529 sec
Bootgod DB load: 00:00:00.1245037 sec
throttle method: 1; resolution: 10000000
extra bundled gamedb files were not #included: gamedb_3ds.txt, gamedb_msx2-L.txt, mame_machines.txt, gamedb_Odyssey2.txt, gamedb_msx1-L.txt
GameDB load: 00:00:00.6678550 sec
Using SDL2 for host input (keyboard + gamepads)
HawkFile bound /home/yoshi/Downloads/roms/cam_proj_rev/Super Mario 64 (USA).n64
Game was not in DB. CRC: 3CE60709 MD5: 20B854B239203BAF6C961B850A4A51A2
N64
DEBUG CALLBACK 2: No version number in 'Core' config section. Setting defaults.
DEBUG CALLBACK 2: No version number in 'CoreEvents' config section. Setting defaults.
DEBUG CALLBACK 3: Using full mem base
DEBUG CALLBACK 1: Unable to open rom database file '(null)'.
SUCCESS
SUCCESS
DEBUG CALLBACK 3: Goodname: SUPER MARIO 64 (unknown rom)
DEBUG CALLBACK 3: Name: SUPER MARIO 64      
DEBUG CALLBACK 3: MD5: 20B854B239203BAF6C961B850A4A51A2
DEBUG CALLBACK 3: CRC: 635A2BFF 8B022326
DEBUG CALLBACK 3: Imagetype: .z64 (native)
DEBUG CALLBACK 3: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
DEBUG CALLBACK 5: ClockRate = F
DEBUG CALLBACK 3: Version: 1444
DEBUG CALLBACK 3: Manufacturer: Nintendo
DEBUG CALLBACK 5: Cartridge_ID: 4D53
DEBUG CALLBACK 3: Country: USA
DEBUG CALLBACK 5: PC = 80246000
DEBUG CALLBACK 5: Save type: 0
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
DEBUG CALLBACK 2: Input plugin does not contain VRU support.
DEBUG CALLBACK 3: input plugin did not specify a render callback; there will be no on screen display by the input plugin.
SUCCESS
SUCCESS
SUCCESS
SUCCESS
DEBUG CALLBACK 3: Using video capture backend: dummy
DEBUG CALLBACK 3: Using CIC type X102
Attempted to SetVideoMode, width 640, height 480, bpp 0, screenMode WINDOWED, flags SUPPORT_RESIZING
State changed! Param VIDEO_MODE, new value 2
State changed! Param VIDEO_SIZE, new value 41943520
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 2
DEBUG CALLBACK 3: Initializing 2 RDRAM modules for a total of 4 MB
DEBUG CALLBACK 3: Starting R4300 emulator: Dynamic Recompiler
DEBUG CALLBACK 3: Init new dynarec
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
DebugSourceApi DebugTypeOther DebugSeverityNotification: Buffer detailed info: Buffer object 1 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 320 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 320 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1120 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 1120 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1120 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1120 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1120 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1088 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1056 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1056 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1056 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1056 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1056 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1056 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
reading and enqueuing 1056 samples
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1056 samples
State changed! Param EMU_STATE, new value 2
SUCCESS
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
reading and enqueuing 1088 samples
entering dispose...
DEBUG CALLBACK 4: Stopping emulation.
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 2
SUCCESS
DEBUG CALLBACK 3: R4300 emulator finished.
State changed! Param VIDEO_MODE, new value 1
State changed! Param EMU_STATE, new value 1
DEBUG CALLBACK 4: Rom closed.
BizHawk has completed its shutdown routines, killing process...

YoshiRulz avatar Jan 22 '25 21:01 YoshiRulz

Hmm, those logs look proper, nothing out of the ordinary there. Note that for angrylion-plus, the rsp plugin must be set to cxd4-sse2, otherwise there will be no audio or video.

Morilli avatar Jan 22 '25 22:01 Morilli

Oh, that fixes it, now I can get in-game and it's almost playable (mostly stable 50 fps).

YoshiRulz avatar Jan 22 '25 23:01 YoshiRulz

Looking at the documentation, it looks like this might be an actual mono bug (maybe mono/mono#14084 ?). Either hybrid (default) or coop values hang for me, just preemptive works without issues.

Looking at how that works, it does somewhat make sense. You have a pure native thread being created (in this case the "render thread"), without the runtime having any knowledge of them (since they weren't made with managed APIs). As such, it doesn't really know of such a thread needing to be suspended for GC purposes. This is all fine, as long as that thread remains in unmanaged land, and thus doesn't touch managed state. Once it tries to come back to managed land (via a callback), things go very poorly.

CasualPokePlayer avatar Jan 23 '25 18:01 CasualPokePlayer

Hm, I did a bit of testing with Donkey Kong 64 and it appears to be a GLideN64 plugin issue rather than a fault of anything in BizHawk, so it's unlikely I'll be able to resolve this. I also get broken video output in the old mupen core with gliden64 (in bizhawk), so it's not really a new regression.

Morilli avatar Jan 31 '25 22:01 Morilli

This is more or less ready from my side. I want to pull a couple more submodules once they're ready and of course this needs to be rebased, but aside from that the diff should be about final.

Mainly needs more testing now, especially on linux and the parallel video plugin (vulkan).

Morilli avatar Feb 03 '25 02:02 Morilli

I'm looking to test this branch with some N64 games on my machine running Arch Linux but I'm having trouble compiling.

BizHawk.Bizware.Graphics.Controls failed with 1 error(s) (0.0s)
    /usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1479,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk.
  BizHawk.Client.DiscoHawk failed with 1 error(s) (0.0s)
    /usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1479,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk.
  BizHawk.Client.EmuHawk failed with 1 error(s) (0.0s)
    /usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1479,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk.
  BizHawk.WinForms.Controls failed with 1 error(s) (0.0s)
    /usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1479,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/share/dotnet/sdk/9.0.103/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk.

I have the .NET SDK installed and ran Dist/BuildRelease.sh according to the instructions. Is there something I'm missing?

kimimaru4000 avatar Mar 06 '25 08:03 kimimaru4000

Your copy of the .NET SDK is incomplete. edit: Pushed https://github.com/TASEmulators/BizHawk/commit/697cf259119565601995082f7eea88b9f4fb7df4 to detect this. I'd be surprised if Arch doesn't have a proper package, but if that is the case, you can use Nix. (Or we could fix the merge conflicts here and have CI build it.)

YoshiRulz avatar Mar 06 '25 10:03 YoshiRulz

Thanks! It turns out the only missing SDK was the WindowsDesktop, so I simply copied and pasted the SDK from the official download into the install folder. Not a permanent solution, but good enough for testing this.

On the testing side, I'm currently stuck getting much going on all 3 video plugins.

Video: GLideN64 | RSP: hle
HawkFile bound /home/user/BizHawk/output/gamedb/NesCarts.xml
HawkFile bound /home/user/BizHawk/output/gamedb/mame_machines.txt
MAME Machine DB load: 00:00:00.0247307 sec
Bootgod DB load: 00:00:00.1071705 sec
throttle method: 1; resolution: 10000000
Using SDL2 for host input (keyboard + gamepads)
extra bundled gamedb files were not #included: gamedb_msx1-L.txt, mame_machines.txt, gamedb_msx2-L.txt
GameDB load: 00:00:00.6328893 sec
Connected SDL gamepad, device index 0, instance ID 2, name raphnet technologies Dual N64/N64 to USB v3.6
Connected SDL gamepad, device index 1, instance ID 3, name raphnet technologies Dual N64/N64 to USB v3.6
HawkFile bound /home/user/BizHawk/output/Super Mario 64 (U) [!].z64
Game was not in DB. CRC: 3CE60709 MD5: 20B854B239203BAF6C961B850A4A51A2
N64
WARNING: No version number in 'Core' config section. Setting defaults.
WARNING: No version number in 'CoreEvents' config section. Setting defaults.
INFO: Using full mem base
ERROR: Unable to open rom database file '(null)'.
INFO: Goodname: SUPER MARIO 64 (unknown rom)
INFO: Name: SUPER MARIO 64      
INFO: MD5: 20B854B239203BAF6C961B850A4A51A2
INFO: CRC: 635A2BFF 8B022326
INFO: Imagetype: .z64 (native)
INFO: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
VERBOSE: ClockRate = F
INFO: Version: 1444
INFO: Manufacturer: Nintendo
VERBOSE: Cartridge_ID: 4D53
INFO: Country: USA
VERBOSE: PC = 80246000
VERBOSE: Save type: 0
WARNING: Input plugin does not contain VRU support.
INFO: input plugin did not specify a render callback; there will be no on screen display by the input plugin.
INFO: Using video capture backend: dummy
INFO: Using CIC type X102
Attempted to SetVideoMode, width 640, height 480, bpp 0, screenMode WINDOWED, flags SUPPORT_RESIZING
State changed! Param VIDEO_MODE, new value 2
State changed! Param VIDEO_SIZE, new value 41943520
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 2
INFO: Initializing 4 RDRAM modules for a total of 8 MB
INFO: Starting R4300 emulator: Dynamic Recompiler
INFO: Init new dynarec
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
Video: paraLLel | RSP: paraLLel
HawkFile bound /home/user/BizHawk/output/gamedb/mame_machines.txt
HawkFile bound /home/user/BizHawk/output/gamedb/NesCarts.xml
MAME Machine DB load: 00:00:00.0201666 sec
Bootgod DB load: 00:00:00.0776444 sec
throttle method: 1; resolution: 10000000
Using SDL2 for host input (keyboard + gamepads)
extra bundled gamedb files were not #included: gamedb_msx1-L.txt, mame_machines.txt, gamedb_msx2-L.txt
GameDB load: 00:00:00.6980595 sec
Connected SDL gamepad, device index 0, instance ID 2, name raphnet technologies Dual N64/N64 to USB v3.6
Connected SDL gamepad, device index 1, instance ID 3, name raphnet technologies Dual N64/N64 to USB v3.6
HawkFile bound /home/user/BizHawk/output/Super Mario 64 (U) [!].z64
Game was not in DB. CRC: 3CE60709 MD5: 20B854B239203BAF6C961B850A4A51A2
N64
WARNING: No version number in 'Core' config section. Setting defaults.
WARNING: No version number in 'CoreEvents' config section. Setting defaults.
INFO: Using full mem base
ERROR: Unable to open rom database file '(null)'.
INFO: Goodname: SUPER MARIO 64 (unknown rom)
INFO: Name: SUPER MARIO 64      
INFO: MD5: 20B854B239203BAF6C961B850A4A51A2
INFO: CRC: 635A2BFF 8B022326
INFO: Imagetype: .z64 (native)
INFO: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
VERBOSE: ClockRate = F
INFO: Version: 1444
INFO: Manufacturer: Nintendo
VERBOSE: Cartridge_ID: 4D53
INFO: Country: USA
VERBOSE: PC = 80246000
VERBOSE: Save type: 0
WARNING: Input plugin does not contain VRU support.
INFO: input plugin did not specify a render callback; there will be no on screen display by the input plugin.
INFO: Using video capture backend: dummy
INFO: Using CIC type X102
INFO: Netplay enabled, disabling vsync
Attempted to SetVideoMode, width 640, height 480, bpp 0, screenMode WINDOWED, flags SUPPORT_RESIZING
State changed! Param VIDEO_MODE, new value 2
State changed! Param VIDEO_SIZE, new value 41943520
INFO: Targeting VK_KHR_present_wait latency to 1 frames.
INFO: Layer count: 7
INFO: Found layer: VK_LAYER_VALVE_steam_overlay_32.
INFO: Found layer: VK_LAYER_VALVE_steam_fossilize_64.
INFO: Found layer: VK_LAYER_VALVE_steam_fossilize_32.
INFO: Found layer: VK_LAYER_VALVE_steam_overlay_64.
INFO: Found layer: VK_LAYER_NV_optimus.
INFO: Found layer: VK_LAYER_MANGOHUD_overlay_x86_64.
INFO: Found layer: VK_LAYER_MANGOHUD_overlay_x86.
INFO: Enabling instance extension: VK_KHR_surface.
INFO: Enabling instance extension: VK_KHR_xlib_surface.
INFO: Enabling instance extension: VK_EXT_debug_utils.
INFO: Enabling instance extension: VK_KHR_get_surface_capabilities2.
INFO: Enabling instance extension: VK_EXT_swapchain_colorspace.
INFO: Enabling instance extension: VK_EXT_surface_maintenance1.
INFO: Found Vulkan GPU: NVIDIA GeForce RTX 2060
INFO:     API: 1.4.303
INFO:     Driver: 570.496.256
INFO: Using Vulkan GPU: NVIDIA GeForce RTX 2060
INFO: Enabling device extension: VK_KHR_swapchain.
INFO: Enabling device extension: VK_KHR_external_semaphore_fd.
INFO: Enabling device extension: VK_KHR_external_memory_fd.
INFO: Enabling device extension: VK_EXT_calibrated_timestamps.
INFO: Enabling device extension: VK_EXT_conservative_rasterization.
INFO: Enabling device extension: VK_NV_compute_shader_derivatives.
INFO: Enabling device extension: VK_EXT_memory_priority.
INFO: Enabling device extension: VK_EXT_memory_budget.
INFO: Enabling device extension: VK_EXT_pageable_device_local_memory.
INFO: Enabling device extension: VK_NV_device_generated_commands.
INFO: Enabling device extension: VK_NV_device_generated_commands_compute.
INFO: Enabling device extension: VK_NV_descriptor_pool_overallocation.
INFO: Enabling device extension: VK_EXT_mesh_shader.
INFO: Enabling device extension: VK_EXT_index_type_uint8.
INFO: Enabling device extension: VK_EXT_external_memory_host.
INFO: Enabling device extension: VK_KHR_fragment_shader_barycentric.
INFO: Enabling device extension: VK_KHR_push_descriptor.
INFO: Enabling device extension: VK_KHR_present_id.
INFO: Enabling device extension: VK_KHR_present_wait.
INFO: Enabling device extension: VK_EXT_swapchain_maintenance1.
INFO: Using present mode: 0.
INFO: Current transform is enum 0x1.
INFO: Supported transform 0x1: IDENTITY_BIT_KHR.
INFO: Swapchain current extent: 640 x 480
INFO: Targeting 3 swapchain images.
INFO: Created swapchain 640 x 480 (fmt: 44, transform: 1).
INFO: Got 3 swapchain images.
WARNING: Current NVIDIA driver is known to be slightly faster without 8/16-bit integer arithmetic.
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 2
INFO: Initializing 4 RDRAM modules for a total of 8 MB
INFO: Starting R4300 emulator: Dynamic Recompiler
INFO: Init new dynarec
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 3
Video: angrylion-plus | RSP: cxd4
HawkFile bound /home/user/BizHawk/output/gamedb/mame_machines.txt
HawkFile bound /home/user/BizHawk/output/gamedb/NesCarts.xml
MAME Machine DB load: 00:00:00.0295808 sec
Bootgod DB load: 00:00:00.0956510 sec
throttle method: 1; resolution: 10000000
Using SDL2 for host input (keyboard + gamepads)
extra bundled gamedb files were not #included: gamedb_msx1-L.txt, mame_machines.txt, gamedb_msx2-L.txt
GameDB load: 00:00:00.6492538 sec
Connected SDL gamepad, device index 0, instance ID 2, name raphnet technologies Dual N64/N64 to USB v3.6
Connected SDL gamepad, device index 1, instance ID 3, name raphnet technologies Dual N64/N64 to USB v3.6
HawkFile bound /home/user/BizHawk/output/Super Mario 64 (U) [!].z64
Game was not in DB. CRC: 3CE60709 MD5: 20B854B239203BAF6C961B850A4A51A2
N64
WARNING: No version number in 'Core' config section. Setting defaults.
WARNING: No version number in 'CoreEvents' config section. Setting defaults.
INFO: Using full mem base
ERROR: Unable to open rom database file '(null)'.
INFO: Goodname: SUPER MARIO 64 (unknown rom)
INFO: Name: SUPER MARIO 64      
INFO: MD5: 20B854B239203BAF6C961B850A4A51A2
INFO: CRC: 635A2BFF 8B022326
INFO: Imagetype: .z64 (native)
INFO: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits)
VERBOSE: ClockRate = F
INFO: Version: 1444
INFO: Manufacturer: Nintendo
VERBOSE: Cartridge_ID: 4D53
INFO: Country: USA
VERBOSE: PC = 80246000
VERBOSE: Save type: 0
WARNING: Input plugin does not contain VRU support.
INFO: input plugin did not specify a render callback; there will be no on screen display by the input plugin.
INFO: Using video capture backend: dummy
INFO: Using CIC type X102
Attempted to SetVideoMode, width 640, height 480, bpp 0, screenMode WINDOWED, flags SUPPORT_RESIZING
State changed! Param VIDEO_MODE, new value 2
State changed! Param VIDEO_SIZE, new value 41943520
INFO: vdac_init: GL_VERSION='4.6 (Compatibility Profile) Mesa 24.3.4-arch1.1'
INFO: vdac_init: GL_VENDOR='Intel'
INFO: vdac_init: GL_RENDERER='Mesa Intel(R) UHD Graphics 630 (CFL GT2)'
INFO: vdac_init: GL_SHADING_LANGUAGE_VERSION='4.60'
State changed! Param EMU_STATE, new value 2
State changed! Param EMU_STATE, new value 2
INFO: Initializing 4 RDRAM modules for a total of 8 MB
INFO: Starting R4300 emulator: Dynamic Recompiler
INFO: Init new dynarec
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
INFO: vdac_write: resized framebuffer texture: 640x240
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.
State changed! Param EMU_STATE, new value 2
SwapBuffers was called.
State changed! Param EMU_STATE, new value 3
SwapBuffers was called.

All tested with Super Mario 64, Banjo-Tooie, and Super Smash Bros. Only Super Smash Bros. loaded at all and only on angrylion-plus/cxd4 when launching BizHawk with my discrete GPU as the preferred graphics device. It seems like any scene transition breaks it. Ex. Super Smash Bros. doesn't get to the main menu if I cancel the N64 startup logo early, but if I let the N64 startup logo play in full it'll never even get to the title screen.

My DE is KDE Plasma 6.3.2.

kimimaru4000 avatar Mar 06 '25 14:03 kimimaru4000

@kimimaru4000 I've rebased, could you try again now?

Morilli avatar Mar 06 '25 16:03 Morilli

What a world of difference! All the games are working great now and run at full speed on my machine with different combinations of settings :+1: Awesome work!

kimimaru4000 avatar Mar 06 '25 18:03 kimimaru4000

If it's not already, I would suggest allowing an option, or just having it always do it, to load the shaders before the game starts. I've been testing this build for the last few hours with OOTMM and noticed a bit of stuttering whenever I load into new areas, something that earlier versions of Bizhawk and PJ64 don't get. Earlier versions of Bizhawk I noticed have a "Texture Save Cache" option with GlideN64 which seems to be what is affecting it on those since I disabled it and started getting the stuttering. PJ64 has an option to store the compiled shaders which disabling that also yielded the stuttering I would get on this newest Bizhawk build.

XenoWars avatar Mar 06 '25 20:03 XenoWars

If it's not already, I would suggest allowing an option, or just having it always do it, to load the shaders before the game starts. I've been testing this build for the last few hours with OOTMM and noticed a bit of stuttering whenever I load into new areas, something that earlier versions of Bizhawk and PJ64 don't get. Earlier versions of Bizhawk I noticed have a "Texture Save Cache" option with GlideN64 which seems to be what is affecting it on those since I disabled it and started getting the stuttering. PJ64 has an option to store the compiled shaders which disabling that also yielded the stuttering I would get on this newest Bizhawk build.

Hm, while I don't currently expose shader cache or texture cache options, both of these should be enabled by default. I'm not sure what could be going wrong there.

Morilli avatar Mar 06 '25 21:03 Morilli

I've been testing this build for the last few hours with OOTMM and noticed a bit of stuttering whenever I load into new areas, something that earlier versions of Bizhawk and PJ64 don't get.

The culprit is most likely dual source blending... See: https://github.com/gonetz/GLideN64/issues/2749#issuecomment-1449257077

Jj0YzL5nvJ avatar Mar 07 '25 01:03 Jj0YzL5nvJ

What a world of difference! All the games are working great now and run at full speed on my machine with different combinations of settings 👍 Awesome work!

Ah okay I forgot to mention that Banjo-Tooie actually wasn't working well with GLideN64. There's a flickering duped render of the whole game on the bottom left. Also, no matter the video backend I can't get the game to recognize the controller whereas the other games are working fine.

https://github.com/user-attachments/assets/a6a96841-4510-47b5-b7e5-38ff0f7b73ba

But overall much more progress after the rebase.

kimimaru4000 avatar Mar 07 '25 01:03 kimimaru4000

Also, no matter the video backend I can't get the game to recognize the controller whereas the other games are working fine.

This is somewhat expected. That's one of the anti-piracy measures in BT. Someone needs to make sure the save type is set to the correct 2Kb EEPROM for the game.

flagrama avatar Mar 07 '25 02:03 flagrama

Someone needs to make sure the save type is set to the correct 2Kb EEPROM for the game.

Looks like the mupen64plus.ini needs to be included somewhere as a rom database to let the core get proper rom information like eeprom size. I generally want to prevent the core from reading random disk files to try and keep behavior deterministic, but maybe this file is fine if it's included as part of bizhawk assets.

There's a flickering duped render of the whole game on the bottom left.

That's some weird display issue with GLideN64 that also happens in donkey kong 64. You can see that the actual video output that is rendered is different from what is displayed in bizhawk (which is pulled using the ReadScreen2 function) by commenting out the SDL_WINDOW_HIDDEN flag in SDL2OpenGLContext:

index 79aa505c0..e8a67111a 100644
--- a/src/BizHawk.Bizware.Graphics/OpenGL/SDL2OpenGLContext.cs
+++ b/src/BizHawk.Bizware.Graphics/OpenGL/SDL2OpenGLContext.cs
@@ -205,7 +205,7 @@ namespace BizHawk.Bizware.Graphics
                        SetAttributes(majorVersion, minorVersion, coreProfile, shareContext: true);

                        _sdlWindow = SDL_CreateWindow(null, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height,
-                               SDL_WindowFlags.SDL_WINDOW_OPENGL | SDL_WindowFlags.SDL_WINDOW_HIDDEN);
+                               SDL_WindowFlags.SDL_WINDOW_OPENGL);
                        if (_sdlWindow == IntPtr.Zero)
                        {
                                throw new($"Could not create SDL Window! SDL Error: {SDL_GetError()}");

Interestingly, while the direct rendered output looks correct for DK64 it still flickers for Banjo-Tooie. There might be some flag or setting that could be toggled that fixes that.

Morilli avatar Mar 07 '25 03:03 Morilli

I tested Banjo-Tooie a bit more and I'm still not sure what the problem is. I have tested the same core and gliden64 dlls with the offficial mupen64plus-ui-console program and everything displays fine there. I've also played around with some threading stuff, not using the ReadScreen2 function and tried some config settings, none of which fixed the issue.

The fact that other programs work fine using the exact same dlls tells me that the problem must be somewhere inside bizhawk itself or connected to the entire initialization structure (sdl, thread, managed / unmanaged). Maybe it's also undefined behavior somewhere causing these differences, I can't tell yet.

Morilli avatar Mar 08 '25 21:03 Morilli

btw I'd like to get this in sometime soon (after 2.11.1? assuming we'll manage to release that soon). I'd like to fork mupen64plus into the TASEmulators repo @vadosnaprimer so we have a proper submodule origin and should probably clean up the commit history a bit, although I don't see this getting merged in a non-squash way so it probably doesn't matter too much.

Based on short testing on my ubuntu VM this unfortunately seems to deadlock on linux again without preemptive threading, not sure what to do about that without figuring out the underlying cause. @YoshiRulz any way we could change the threading mode based on the loaded core as a workaround? Don't know what else to do right now.

Morilli avatar Nov 03 '25 17:11 Morilli

The MONO_THREADS_SUSPEND env var? I doubt changing that during execution would have any effect. You would have to set it and then figure out how to reproduce, debug, and fix the hang.

YoshiRulz avatar Nov 03 '25 18:11 YoshiRulz

I've looked into this a bit more by setting MONO_SLEEP_ABORT_LIMIT, and it looks like when the freeze happens it's due to mono waiting on the core thread, which is in state 0x105 (async suspend requested). As far as I understood from reading the docs, this means mono thinks the thread is in gc unsafe mode, aka executing managed code and is therefore waiting on the thread to reach a safepoint in order to perform gc.

The problem here is that the thread is actually executing native code, so it will never reach such a safepoint and mono waits indefinitely. I belive the thread is the one started by new Thread(RunEmulator) {IsBackground = true};, where RunEmulator is just calling a native function that never returns. If we could get mono to interpret this thread's state correctly then the issue would probably be resolved, but I don't know how to do that. I've experimented a bit with changing the unmanaged function declaration but that doesn't seem to have helped.

Morilli avatar Nov 05 '25 23:11 Morilli

a native function that never returns

Sounds like the real problem. Can it return or call back into managed code periodically?

Or maybe it shouldn't have IsBackground = true. On master, this isn't a background thread: https://github.com/TASEmulators/BizHawk/blob/692cceb8283a9c6a59ce2b0c202bfcb543292af3/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/NativeApi/mupen64plusCoreApi.cs#L570 This one is, but I'm not seeing any unmanaged calls there, it looks like it should finish (become idle?) during the [CoreConstructor]: https://github.com/TASEmulators/BizHawk/blob/692cceb8283a9c6a59ce2b0c202bfcb543292af3/src/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs#L214

YoshiRulz avatar Nov 06 '25 02:11 YoshiRulz

a native function that never returns

Sounds like the real problem. Can it return or call back into managed code periodically?

This thread is the main emulation thread for mupen, so it will only return once the core has stopped. Mupen basically wants a main emulation thread that runs continuously and has communication functions that are called from a different thread that allows for pausing, frame advancing, save stating, stopping etc.

maybe it shouldn't have IsBackground = true

I tried that but it doesn't seem to have changed anything, the thread is still in the same state when gc happens.

Maybe we could work-around this by creating the emulation thread in an unmanaged function? Although I really don't understand why this should be necessary.

Morilli avatar Nov 06 '25 13:11 Morilli

Is there a way to force RSP to switch to paraLLEl or to "disable" HLE from being an option when the Video Plugin selected is either angrylion-plus or paraLLEl?

Alternatively, is there a way to prevent progressing when "OK" is selected by popping out a warning such as "The RSP Plugin will not work with the Video Plugin, please change to paraLLEl or cxd4"?

Spikestuff avatar Nov 06 '25 14:11 Spikestuff