Closed 5schatten closed 5 years ago
This appears to be a crash report for "Virtua Fighter 2 (Europe) (Rev A) (Made in EU)"
Can you test the same game in Mednafen 1.21.2. Does it crash in that specific version as well ?
Well I haven't tested it with mednafen 1.21.2 or else but the game runs fine with commit 564a1463c082d9f7cdf9c95a1746b4077c5e4ffb
If you check out https://forum.fobby.net/index.php?t=msg&goto=4414& there are some reports about Virtua Fighter 2 but nothing special.
Well, it could either be a real error in the upstream emulator (especially with it being the PAL version of the game) and this has maybe even been fixed in a later version, so if/when we get to the later versions this might go away.
Alternatively even though the SCU code is now very similar between the LibRetro core and Mednafen, I absolutely could have missed something during the merge. Definitely would be helpful to have my work peer reviewed.
I see if I can run further tests so any known good stuff that runs fine with the latest commits?
I mostly tested things were working with US version of Daytona USA - Championship Circuit Edition
I tested several europe game versions and none of them worked. https://pastebin.com/3LWt9ahw
I'll try your US version later but if eu games won't work it's quite a problem ;-)
EDIT: Daytona USA - US version also fails for me https://pastebin.com/gwienNkd
I have no idea then. This code is nearly identical to the Mednafen code in that file. Maybe it's a Linux thing ?
Well did nobody test this changes on Linux before they were merged?
I just encountered the same issue on Linux x86_64 (literally 10 minutes ago! Strange coincidence...)
There's a weird typedef issue going on. Take a look at this:
The recent commits have changed nothing here, but it now seems that DSP_INSTR_BASE_UIPT
and DSP_INSTR_RECOVER_TCAST
are set incorrectly. If you manually force the following:
//#if (defined(__x86_64__) && defined(__code_model_small__) && !defined(__PIC__) && !defined(__pic__)) || SIZEOF_VOID_P <= 4
// #define DSP_INSTR_BASE_UIPT 0
// #define DSP_INSTR_RECOVER_TCAST uint32
//#else
#define DSP_INSTR_BASE_UIPT ((uintptr_t)DSP_Init)
#define DSP_INSTR_RECOVER_TCAST int32
//#endif
...then the core builds and seems to run without issues.
I do not understand the exact problem here (I certainly can't see why DSP_INSTR_RECOVER_TCAST should be signed), nor do I have enough time to go through all the code, but perhaps this will help with debugging...?
Thanks @jdgleaver "SIZEOF_VOID_P" triggered a memory - it was code I removed during the merge but seems to have been added downstream to fix this issue without any comment to indicate it's importance. In real mednafen it's part of configure script - so if this fix works I'll probably put that in our makefile.
Ah, nice - thanks for working out a fix so quickly! Certainly does look like something that should go in the makefile.
Uncommented legacy code is a misery to deal with... The fact you managed to merge all these changes with only one tiny bug is a pretty fantastic achievement!
Hi @5schatten - can you build #136 and see if it works?
@hiddenasbestos I've tested the latest commit + your patch/PR and it works for me. https://pastebin.com/0bAWEUD3
Great. I've updated the patch PR to apply to the makefile, rather than that one file - should avoid future problems merging that file, and also instances of SIZEOF_VOID_P used elsewhere in future.
@hiddenasbestos patch v2 also works fine :-)
Commit: https://github.com/libretro/beetle-saturn-libretro/commit/c726c623b9df052ae457ff75bbb231d46b97dfc7
Retroarch log: https://pastebin.com/tkGhwHpB
Package: https://github.com/5schatten/LibreELEC.tv/blob/libreelec-9.x-rr/packages/5schatten/emulation-lr-cores/lr-beetle-saturn/package.mk