Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

SDL 2.0 for AROS

Last updated on 2 years ago
amigamiaamigamiaAdmin
Posted 4 years ago
Hello Arosians,

Does anyone know if SDL 2.0 is being ported to AROS ABIv0 or v1?
I'd like to start using it to develop a new(old) video game that I have been trying to create for a while now. I want to use the process to learn more about video game development, AROS, C++ development and at the same time do the work once to port the game to other platforms.

The idea here is to develop the game with the tools available in AROS such as lunapaint, milky tracker, etc. The second part of the idea is to develop the game for AROS only first and then port it to other platforms.

The seed of this video game came many years ago when I was a high school student and due to life events, never sat down play with it. All I have is an idea and a splash image hand drawn.

The name of the video game is "Tommy Bacheroz" but I have since changed the name to "Tommy Buckaroo" to make it more internationally readable. Bacheroz is an anglicized word from "Bacherozzo" which is slang for "Bug" in Italian.
C
cavemannSoftware Dev
Posted 4 years ago
I would like to see SDL2 ported too. I know that BSzilli helped to port it to Morphos, but he hasn't been very active on Aros lately. The code is available if you want to try and port it, but probably not a piece of cake.

I don't think that Abi1 even has SDL1 ported yet. And I don't think that anyone would port SDL2 to Abi0, since it's not being updated much anymore.

Buckaroo, Bugs, haha sounds interesting, good luck Smile
D
deadwoodAROS Dev
Posted 4 years ago
Well ABIv0 is the stable version so this is actually were people should port stuff. Waiting for ABIv1 is... well... while(true);

Yet another test.

@amigamia

If you want to learn C++ than I suggest using some tutorials on C++11. A number of nice things have been added that change a lot how you program with standard library. I think our compiler supports C++11.
amigamiaamigamiaAdmin
Posted 4 years ago
Hi deadwood,

I actually have been learning C++ for quite a while through university's classes (Completing my BS in CS soon). I just never used it in a real project and the job I am doesn't allow me to use it every day. I wanted to use the opportunity to learn game programming while applying what I have learned over the years. Yes C++11 is the standard I am using.

SDL looks like the best option so far but I have been looking at Love2D as well. AROS has 0.8.0 ported by Bszili Smile
C
cavemannSoftware Dev
Posted 4 years ago
@ deadwood

"I think our compiler supports C++11."

The default compiler on abi0 native (4.6.4) is not c++11 compatible (hint, hint). But it does accept -std=c++0x. And I'm not sure, but maybe it will accept -std=c++1l for some features.
Edited by cavemann on 12-08-2020 14:15, 4 years ago
D
deadwoodAROS Dev
Posted 4 years ago
Actually I'm planning to update GCC to 6.5.0 as part of ABIv0 refresh. Hopefully this will give enough C++ support.
C
cavemannSoftware Dev
Posted 4 years ago
Very nice... expect more ports Smile
amigamiaamigamiaAdmin
Posted 4 years ago
Indeed very good news. Thanks for your support deadwood.
amigamiaamigamiaAdmin
Posted 3 years ago
Hi deadwood, how is the progress going with GCC 6.5?
amigamiaamigamiaAdmin
Posted 2 years ago
Hi All,

We now have GCC 6.3.0 native in AROS and I am giving this a shot to compile SDL 2.0. Received a "Please insert volume "empty"" but clicking on cancel, seemed to have continued until the error in the attached image.
Edited by amigamia on 15-06-2022 16:20, 2 years ago
You do not have access to view attachments
C
cavemannSoftware Dev
Posted 2 years ago
Deadwood has released 6.5.0. It will probably be on the next version of Aros-One. I would upgrade because of some fixes. Also try spoofing linux and see what happens.
amigamiaamigamiaAdmin
Posted 2 years ago

cavemann wrote:

@cavemann - Deadwood has released 6.5.0. It will probably be on the next version of Aros-One. I would upgrade because of some fixes. Also try spoofing linux and see what happens.


That's great! I must have missed that thread on AROS-Exec. I am patiently waiting for AROS One 1.8 until then, I'll keep toyin around it but I am not sure what you mean by spoofing linux. I mean, I know what spoofing means but how to trick AROS into thinking it is linux, I am not sure how to do that.

The files I am using as source are located here: https://github.com/AmigaPorts/SDL-2.0
Edited by amigamia on 18-06-2022 08:46, 2 years ago
C
cavemannSoftware Dev
Posted 2 years ago
Thanks for the link. Imo that changes things. Instead of using configure, it might be better to use the Amiga makefile. The problem of course is that you would have to deal with the endian issues. Not an easy task. Good luck!!!
amigamiaamigamiaAdmin
Posted 2 years ago
I think I just managed to compile SDL 2.0 library for AROS after a few changes and switches between configure and the make file. This is compiled using the Makefile.minimal settings. Still need to test it though.
Edited by amigamia on 18-07-2022 15:14, 2 years ago
You do not have access to view attachments
M
magoriumSoftware Dev
Posted 2 years ago
That would be very nice if you managed to get that going amigamia Smile

After having taken a quick look it indeed shouldn't be too difficult after seeing the os4 parts and bits. but i simply haven't had the time to try it myself.

Thank you sofar ! Like
amigamiaamigamiaAdmin
Posted 2 years ago
Hmmm, I have the libSDL2.a that compiled earlier and placed it in /Development/lib. I also created a new folder called SDL2 in /Development/include/SDL2 and copied the .h files from the source archive

I created a Makefile according to https://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/cli/index.php

I know it's finding the correct library (libSDL2.a) because if I rename it I get a different error.

However, it can seem to find the SDL_Quit. SDL_Init, and a bunch of other SDL_****xx functions. (See screenshot)

The source file 01_hello_SDL.cpp has been modified to include the SDL2/SDL.h

Any idea?
Edited by amigamia on 20-07-2022 12:30, 2 years ago
You do not have access to view attachments
M
magoriumSoftware Dev
Posted 2 years ago
Well, the routines as mentioned in your screenshot are definitely part of SDL.c.

Have you tried the nm tool (might have full platform arch included in the name) to see what symbol-names are exported in your SDL.a archive ?

Your test-program tries to locate the symbols in the SDL library that you've created but seem unable to find/locate them.

There can be a bit of gcc voodoo involved (e.g. parameters/options that I don't know about) to get those symbols visible as intended.

Have you followed the amigaos4 makefile when you created/build your SDL lib ? (as that probably is your best bet with regards to 'being similar to AROS'Wink.
Edited by magorium on 21-07-2022 10:41, 2 years ago
amigamiaamigamiaAdmin
Posted 2 years ago
Well I tried different things. What worked first was to run a slightly modified Makefile.minimal to match the correct Includes and gcc
make -f Makefile.minimal


This generated a libSDL.a file but I get the same issue when compiling against this library.

I also was able to run the configure by tricking it into thinking it's a linux box with the following command:

./configure --build=i386 --host=i386-unknwon-linux --disable-video-opengl --disable-video-x11 --disable-video-rpi --disable-pulseaudio --disable-esd


This goes all the way to the end. In the process it asks for an empty volume and an opt as well but clicking on cancel makes it continue. See the attached for the end result of that.

This generates the default Makefile and if I issue the following command with no switches, it reads the Makefile that was just generated


However, it complains about the platform
You do not have access to view attachments
amigamiaamigamiaAdmin
Posted 2 years ago
Found online that I can use

make -j$(nproc)
to bypass the issue with the platform but goes into all sorts of other errors (See attached). So, I decided to give the Makefile.minimal a shot and that one worked after some modifications. Generates the LibSDL.a
You do not have access to view attachments
amigamiaamigamiaAdmin
Posted 2 years ago
I issued the
nm libSDL2.a > lib.txt
and I cannot find just SDL_Init for example. I can find SDL_Init_REAL which is strange but maybe that'll work??
You do not have access to view attachments
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Users who participated in discussion: cavemann, amigamia, magorium, deadwood, MiDWaN
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 8
Members Online 0

Total Members: 265
Newest Member: metaneutrons
Member Polls
Should AROSWorld continue with AROS-Exec files (SMF based)?
Yes44 %
44% [12 Votes]
No26 %
26% [7 Votes]
Not sure30 %
30% [8 Votes]