-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some wrapped functions for Arkos Tracker 2 #71
Conversation
Some of the functions in the generated files got re-ordered - I think you should force the locale to "C" somehow when sorting the functions in rebuild_wrappers.py. |
@@ -485,7 +485,7 @@ DATAB(_XInitDisplayLock_fn, 4) | |||
// _XInitDynamicIM | |||
// _XInitDynamicOM | |||
//GO(XInitExtension | |||
//GO(XInitImage | |||
GO(XInitImage, iFp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XImage contains callback. I'll add the handling of them. It may try to execute ARM code in X86 world if the program directly use the function pointer inside the XImage (with macro for example) insteadof using the regular funciton.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure enough, when I try to load a song file I get
Unimplemented Opcode E5 00 40 A0 E1 60 40 84
which looks suspiciously like ARM instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it working now with may latest commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, so maybe it isn't this specific function that's causing the crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it crashes with the same unimplemented opcode?
I think I know the cause of the issue: the function Also, just to be sure, the "Ctrl+L" shortcut or File|Open menu just gives me a "cannot open file" error, with no dialog to choose a file. I need to drag'n drop a file into the app to open it. Do you have the same behavour? |
The file open dialog seems to work fine for me. I'm using libfreetype, libstdc++ and libgcc_s from Debian buster, maybe that could affect it. Using gdb, it seems that the Unimplemented Opcode error is from trying to execute my_sighandler for the segfault as x86 code, so it was a result, not a cause, of the crash. Maybe you could try writing my_sighandler so it can be executed both as ARM and x86, by having a jump instruction to another part of the function in one architecture that is a no-op in another? |
Well, the Pandora on which I do most of my testing is pretty limited, with an old Linux among other things... Still, I have managed to fix the crash at loading. I had to rework entirely the TLS (Thread Local Storage) handling. It's much cleaner now, and should work better in numerous software... (On Pandora I didn't got any sound while playing, but I guess it's the ALSA driver on the pandora that is a bit too old for all this). |
It works fine now. I tried loading some of the MODs from TuxKart, and they loaded, but what it loaded I probably wouldn't call music... That's probably a bug in Arkos Tracker - it's still alpha software at the moment. |
I changed my config for Alsa, setting only 22050Hz and a 2048 bytes buffer (the Pandora don't handle smaller ones), and loading a "native" -channel soung: it workd fine, and music was ok. |
With these patches, Arkos Tracker now works.
It seems to runs fine, with nothing obviously broken.