I just did this port. During it I realised that there was quit a lot of endian byte swapping needed since object code in byte arrays was dumped from a little-endian machine (probably x86 of course). Then, I saw the good work of: https://forum.hyperion-entertainment.com/viewtopic.php?p=54334, which, in turn, came from the Wii port since that machine is also apparently big-endian.
All in all, I took the link in that forum thread and made a few tweaks.
- IMPORTANT: Drop this binary into the location where all the DAT files are located, otherwise your computer will crash (at least, mine does). This is because of hard "return 1" being used instead of freeing up resources first. I don't have plans to fix this, but could do in the future. - For this version, you can supply an option "-accelerated" from invocation from the shell to ask it to try to invoke the SDL Renderer using accelerated renderer. For me, this just freezes my machine. SOFTWARE renderer works and that is the default - Also, you can provide an option "-printerr" which will force the output of SDL error messages to be printed to stdout. By default I turned this off.
This is my dropbox link. I don't know how these new dropbox things work, so let me know if the link does not work:
Firstly unpacked it , and have only binary. So tried to run it as it. It says that i have no .dat file, and then happy lockup the system, that about things you already noted in your post as IMPORTANT, so that is known .. Maybe worth to upload your sources somewhere , maybe some of us will deal with proper cleaning of resources.
Then, find out necessary dat files (i grab them just from morphos port there: https://www.morphos-storage.net/?id=1688897) , and then things runs and works ! See (press open in new tab for fullsize):
The only moment which i can see, is that while it only loads up 50% of cpu (which also not quite small for simple game, but that of course not your fault, but the game itself), and the game itself didn't feels "very fast". It's all ok, but not 60 FPS that fo sure.
Through that surely ready for proper os4depot release, just not forget to add data files and some tasty icon :)
ps. I see game use lmgui engine , that right ? If so , you then seems use software build of lmgui ? Why i ask, is because Andrea have already GL4ES based buildof lmguie engine, which works quite well already, so maybe you can use that one as well (to have 2 versions, software one, and hardware one).
ps2. Quote:
- For this version, you can supply an option "-accelerated" from invocation from the shell to ask it to try to invoke the SDL Renderer using accelerated renderer. F
For me it freezes too. Through i heard sound, and have no crash visually, it seems like some sort of intuition dead lock. Do you use latest SDL2 from os4depot, right ?
I just tried all the SDL2 renderers now with :
setenv SDL_RENDER_DRIVER "software" : OK, works setenv SDL_RENDER_DRIVER "compositing" : deadlock setenv SDL_RENDER_DRIVER "opengl" : OK, works setenv SDL_RENDER_DRIVER "opengles2" : works, but rendering glitches (blinking).
So it all looks like this : compositing mode broken completely and ogles2 produce "blinking". Seems something to take a look for Capehill into SDL2 (at least about compositing).
Redirection to NIL: doesn't help because assert probably causes abort() with bitmap lock. Game code should be fixed. Of course there can be other issues but this one is obvious.
See the TODOS and offer porting feedback since I am new to it. Sorry, but there is no decent icon, just a default info file.
....
Only before I uploaded to the depot/aminet did I use the latest SDL. I noticed a much smaller binary, and it defaulted to linear filtering which made it slow. I added the information to the IMPORTANT section, saying you can turn off that smoothing. It still crashed with accelerated. I can try the suggestions @capehill mentioned later.
....
Maybe I should set up a github for this code so you guys can suggest improvements and, in any case, I want to update the core code to the latest released version of spacecadetpinball anyway. This one is a few months old.
If liberty means anything at all, it means the right to tell people what they do not want to hear. George Orwell.
This one is updated to the latest core code from the original repository, smoother graphics, an icon, and this time should not crash when there is no required DAT file.
If liberty means anything at all, it means the right to tell people what they do not want to hear. George Orwell.
This one is updated to the latest core code from the original repository, smoother graphics, an icon, and this time should not crash when there is no required DAT file.
Tested : Moving of the ball are pretty slow. And cpu loading not 50% as before but 95. But that not very important if only ball moves fast but it sadly just really slow.
Also now on running i have in onsole such output : SDL ERROR: That operation is not supported.
Are you sure you build it all with -03 and without debug enabled ? And SLD2 with which you lin were non-debug one ?
ps. And seems compositing renderer now wors.. But give no differences in speed at all :( same slow.
That's really strange. For me it is the opposite. Linear filtering works fine and it is a lot faster. Optimizations are enabled and the output error messages were in the previous version also, I just did not put in the printerr option this time which suppresses them.
If liberty means anything at all, it means the right to tell people what they do not want to hear. George Orwell.
I just uploaded a new version in the queue on OS4Depot. The only thing is that I have suppressed the SDL error output (since users don't want to see that), devs may want to - I actually had this option in the first version but took it out before.
This time I compile with DNDEBUG if it makes a difference and was already using -O3.
From my end, I am getting lots of CPU usage, but no more than the first version and smoothing plays quite quickly.
This time there is no forced software rendering. When I updated to the latest core code and compiled with only endian changes applied, the game just worked. using "compositing" and was faster than before.
If liberty means anything at all, it means the right to tell people what they do not want to hear. George Orwell.
- Compositing mode is playable. - SW rendering without linear filtering is playable. Filtering slows down quite a lot. - MiniGL renderer I cannot test at the moment, waiting for NovaBridge... - OGLES2 renderer flickers. I need to open a proper Mantis ticket for flickering issue, as it is visible also on some SDL2 test programs. Oh, I forgot to test the impact of batching on this, it changes the symptoms with test programs.