Closed CatsLover2006 closed 3 years ago
https://github.com/Arisotura/melonDS/runs/1367458542 @CatsLover2006 could you test Opengl?
I can. I'm installing libslurp as I type this.
I haven't tested DSi functionality, but this works. OpenGL works (in the firmware, at least). One issue: keyboard input doesn't work. Touch works fine, though. I don't know what causes that keyboard issue, but I'll look into using a controller when I can access one a fair bit later.
keyboard input doesn't work
did you bind keys?
I tried but it wouldn't bind any keys.
ah ok
Also one other thing to note: when using OpenGL 3D content doesn't show up. No triangles are rendered. 2D content works fine. That said, the software renderer has no issues handling this and I don't loose frames even though I'm on the second least powered system the latest version of macOS can run on (the least powerful is the same just without hyperthreading). (I spoke too soon with the no loosing frames comment)
Could you post the logs from the Terminal with OpenGL?
I used Mario Kart DS, best example. In the menus:
melonDS 0.9 http://melonds.kuribo64.net/ Audio output frequency: 48000 Hz OpenGL: renderer: Intel HD Graphics 4000 OpenGL Engine OpenGL: version: 4.1 INTEL-14.7.8 ARM9 BIOS loaded ARM7 BIOS loaded Resetting JIT block cache... done resetting jit mem done resetting jit mem MAC: 00:16:56:83:31:F9 FW: WIFI CRC16 = GOOD FW: AP1 CRC16 = GOOD FW: AP2 CRC16 = GOOD FW: AP3 CRC16 = GOOD FW: USER0 CRC16 = GOOD FW: USER1 CRC16 = GOOD Game code: AMCE ROM CRC32: 49E436D8 ROM entry: 02000000 00000005 !! bad ROM size 25562150 (expected 33554432) rounded to 33554432 Cart ID: 00001FC2 Re-encrypting cart secure area ARM9: offset=00004000 entry=02000800 RAM=02000000 size=000E7534 ARM7: offset=00141600 entry=02380000 RAM=02380000 size=000289A4 remapping SWRAM Secure area decryption OK remapping DTCM 3000000 3004000 ffffffff ffffffff Game is now booting Save file: /Users/chancelp/Google Drive/Roms/Mario Kart DS.sav remapping DTCM ffffffff ffffffff 3000000 3004000 PU: region 0 = 04000033 : enabled, 04000000-08000000 PU: region 1 = 0200002D : enabled, 02000000-02800000 PU: region 2 = 027E0021 : enabled, 027E0000-02800000 PU: region 3 = 08000035 : enabled, 08000000-10000000 PU: region 4 = 027E001B : enabled, 027E0000-027E4000 PU: region 5 = 0100002F : enabled, 01000000-02000000 PU: region 6 = FFFF001D : enabled, FFFF0000-FFFF8000 PU: region 7 = 027FF017 : enabled, 027FF000-02800000 remapping DTCM 27e0000 27e4000 ffffffff ffffffff PU: region 1 = 0200002B : enabled, 02000000-02400000 PU: region 2 = 023E0021 : enabled, 023E0000-02400000 unknown ARM9 IO write32 04001060 00000000 01FFFE54 unknown ARM9 IO write32 04001064 00000000 01FFFE54 unknown ARM9 IO write32 04001068 00000000 01FFFE54 WIFI OFF
When selecting a player, the character doesn't appear on the top screen. Switching to software renderer and back, I get these lines:
OpenGL: renderer: Intel HD Graphics 4000 OpenGL Engine OpenGL: version: 4.1 INTEL-14.7.8 QThread::start: Thread termination error (No such process)
I'm thinking that last line is the culprit.
Does it crash when you do it?
It doesn't. I don't know why.
I think it should happen. https://github.com/Arisotura/melonDS/blob/master/src/GPU3D_Soft.cpp#L74 https://github.com/Arisotura/melonDS/blob/master/src/frontend/qt_sdl/Platform.cpp#L200
I'm not exactly sure about why OpenGL seems to have the issues, will need more testing.
It should crash?
Nope, it's just that that happens when you close melonDS. I looked into it a bit more and it says that when a thread is terminated (which I'm pretty sure should happen because the SW renderer thread is terminated when switching to OpenGL) that usually happens.
Also one other thing to note: the app crashes when I launch a game with the JIT on. Honestly, with the amount of CPU is most computers now, I think that it's somewhat unnecessary on Macs (I have no performance issues without it on this Mac and again it's the second least powerful that can run the latest version of macOS), leaving it off by default and calling it an "experimental feature" on Mac is probably all that needs to be done.
Try disabling fastmem, that's a known issue and in my to-do list.
Fastmem was the issue. Also that QThread error is causing something, it's pretty clear to me now. I got the error without switching.
I get the QThread error on Linux whilst switching from SW to OpenGL, and disabling Use seperate thread for the SW renderer. When do you get the error when not doing any of those things?
I get the error every now and again when starting the OpenGL thread.
Also, I think I found the culprit after I tried building from source code. When I build from source, cmake
worked fine but then when I ran make
, I got this error message: /Users/chancelp/melonDS/src/OpenGLSupport.h:26:10: fatal error: 'GL/gl.h' file not found
This might be the culprit.
Don't build from master. Instead build from my PR - https://github.com/WaluigiWare64/melonDS/tree/platform/macos-support Also follow the instructions in the README - https://github.com/WaluigiWare64/melonDS/blob/platform/macos-support/README.md
I still get the same GL/gl.h
missing error
Do you have Homebrew installed, as in the README. Installing Homebrew automatically installs the XCode Command Line Tools, which should have the OpenGL headers.
EDIT - are you sure you did it from my fork? The GL/gl.h
error can't even be there as I have a #ifdef
to include different header on macOS?
I do have Homebrew installed. I'm on macOS Catalina though, so OpenGL is deprecated.
EDIT - I am sure I did it from your fork as I literally copied and pasted the code from the README. I looked at the *.h file and the #ifdef
wasn't there.
I meant that you have to clone my fork's platform/macos-support
branch and build with that.
Compiled from source, still nothing. Random question relating to GPU support: would Metal support be possible or no?
Maybe, if someone wrote a Metal renderer. Also what is the command you used to clone? As is builds fine on my VM and on the Github Actions CI.
I just took the latest code, downloaded as a zip, and overwrote files. It built just fine, but still the same OpenGL error. Sorry for the confusion.
Still the OpenGL glitch. IDK what's going on at this point.
Random question relating to GPU support: would Metal support be possible or no?
if you mean Vulkan support and MoltenVK maybe some day
Metal is for Apple devices (OpenGL is deprecated)
MelonDS appears to have been trying to keep everything cross platform, so a platform-specific Metal renderer would be an odd addition. Vulkan sounds much more likely to me, and I think it'd be a better option as well. Though, even that would be quite a long term inclusion since the OpenGL renderer still has its fair share of issues that need to be addressed first.
I’m pretty sure that OpenGL is already gone in iOS.
allegedly it's still there on Catalina
ANGLE seems to be working on Metal support - https://github.com/google/angle
@CatsLover2006 can you try this? The QThread error should be gone.
@CatsLover2006 could you send a screenshot of Mario Kart DS (since you seem to already have it) in the race?
Here's what Mario Kart DS looks like on the character select. And here's what it looks like in-race. Not sure if this also applies, but when I relaunch the app with OpenGL on, the old frame still is present.
Debugging idea: wireframe view?
I can report that controller inputs work.
One other thing: connecting to Wiimmfi results in error code 23917. Not sure if this is related.
Random question: 32 bit components in use? If so that's the big issue.
@CatsLover2006 thanks for the pictures. It's certainly odd that no 3D is drawn at all. Also Wiimmfi says 23917 is "Wiimmfi access denied". Could you delete the connection and create it again, this time without changing the settings, and then try to get online? If it tells you that the Nintendo WFC has shut down, that means it's connecting to the internet.
I know. I think this is an issue with Wiimmfi though, I'm getting this issue with all but my actual 3DS and Wii (including my Wii U's vWii). EDIT: Connection tests return "successful" EDIT 2: Changing settings to default returns WFC shut down
Thanks. At least wifi is working :P
@CatsLover2006 could you test OpenGL with the latest artifact?
OpenGL with latest code is still not working.
Did you clone my branch or did you download from artifacts?
Where are they? I can't find them.
Need I say more? If need be I can help test builds (I own a MacBook)