03/23/2021 (Tue) 02:54:51
In theory, the Allegro library should work like SDL does. By that I mean the program (OpenSonic here) doesn't care what backend you're using. I can run SDL programs fine in the tty framebuffer and in X. Should be able to do the same here but it doesn't work, even after I rebuilt the library with the missing backend (fbcon). In fact, none of their simple example programs work, they just bomb with:
> Unable to set graphic mode
> Framebuffer resolution not available
And that's actually progress, because before I wasn't even getting that, the program was just crashing with no output at all. I of course ran gdb on the core file, but it was crashing in different places in the library, and that was pointless anyway since rebuilding the library was the solution.
But now these error messages are bogus. My /dev/fb0 runs at 640x480, and the example code (I read it, it's not long) tries to set that mode. Well it can't possibly fail to do nothing, so something else is fucked.
But looking through their docs, I found this (docs/build/linux.txt):
> Unless you have specific needs, we recommend the X version. The Linux console port is not enabled by default. It never worked that well and there is no real interest in it anymore. We may remove it in a future release.
So I'm getting the impression it's not worth my time to try an debug this any further, especially since on a few games use this library. I'll just use DGen (SDL) to play Sonic games on my tty at 640x480. The few games that don't work on that emulator work fine in RetroArch/PicoDrive, which also runs fine on my tty since it uses SDL.