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 1 year ago
amigamiaamigamiaAdmin
Posted 1 year ago
That's fantastic work and thank you for all that! I agree with you, it was time to bring Janus-UAE up to date. I believe if we can manage to port SDL 2.0 to AROS, it is going to open a gate to a lot of new applications, games, etc. etc. but one thing that I noticed is the OS is still somewhat very unstable.

I recently managed to get AROS One 1.8 by Amigasystem on AROS-EXEC working (Supported Video, Wifi, and Audio) on a Dell Latitude D520. I struggled with the Wifi card but figured out what was the problem (will post an article in here soon). I am still experiencing occasional lock-ups, unexpected crashes, and annoyances such as a shell icon on the desktop showing multiple times after placing just one via "leave out" option.

It's frustrating and distracting when I am trying to focus on one particular problem/task and other things around go crashing.

In any case, it is still fun in trying to port a piece of software for the first time on a new OS like AROS Smile
M
MiDWaNNewbie
Posted 1 year ago

amigamia wrote:

@amigamia -

MiDWaN wrote:

@MiDWaN - Was there any more progress on this matter?

I would like to see if I can improve Janus-UAE on AROS, and one of the things would be moving it to SDL2 - but that requires the library first, of course Smile


Hello MiDWaN, welcome to AROSWorld!

I haven't made much progress unfortunately. It's on pause right now as I had to redo my virtual machines hosting AROS on them. However, I plan on picking it up again but I am no expert. I am doing it it as a learning experience as well as because no one else seems interested on porting SDL 2 to AROS.

I thought I would give it a shot. I was in contact with one of the AOS4 developers who suggested to use the MorphOS code because it's closer to AROS. I have the code here on this web site but I am going to put it on GitHub soon.

Would you be interested in collaborating?


Hi there!
No problem, I'd love to collaborate on this - I would probably have to look into it myself otherwise.

I just managed to get everything to compile (using SDL1) yesterday, after a lot of trial and error. The sources of Janus-UAE were a little stale for a few years, and things had changed in the meantime.
That means that the "fun" part is only starting, as the first requirement (and the pain in the butt) was making sure I have an environment that I can use to test new builds in (AROS itself, and a fool-proof way of building Janus-UAE). Well, now I have more than one (Ubuntu under Windows 11 with WSL2, Manjaro Linux) and I know more about the pitfalls of the process. Smile

In other words, no rush and no expectations from my side. Happy to help wherever I can!
My work on Janus-UAE is on Github, since I've made some modifications already (with plenty more expected to follow): https://github.co.../janus-uae
amigamiaamigamiaAdmin
Posted 1 year ago

MiDWaN wrote:

@MiDWaN - Was there any more progress on this matter?

I would like to see if I can improve Janus-UAE on AROS, and one of the things would be moving it to SDL2 - but that requires the library first, of course Smile


Hello MiDWaN, welcome to AROSWorld!

I haven't made much progress unfortunately. It's on pause right now as I had to redo my virtual machines hosting AROS on them. However, I plan on picking it up again but I am no expert. I am doing it it as a learning experience as well as because no one else seems interested on porting SDL 2 to AROS.

I thought I would give it a shot. I was in contact with one of the AOS4 developers who suggested to use the MorphOS code because it's closer to AROS. I have the code here on this web site but I am going to put it on GitHub soon.

Would you be interested in collaborating?
M
MiDWaNNewbie
Posted 1 year ago
Was there any more progress on this matter?

I would like to see if I can improve Janus-UAE on AROS, and one of the things would be moving it to SDL2 - but that requires the library first, of course Smile
M
magoriumSoftware Dev
Posted 2 years ago
Just to make sure we are on the same page: You are using the source-code that is found at the github link you posted earlier ?

I'm puzzled about the real suffix..... Unless i overlooked i did not see one of the macro's expand to add such suffix.

Note that creating a dynamic version of the library is something else then creating a static one.

Trying to compile as the library as linux library isn't the way to go there. You are better of trying to see what is inside the amigaos4 makefile and try to replicate that (minus the ppc specific parts ofc).

I wish i had more time on my hands so i could give it a shot myself. Cavemann/deadwood (or anyone else with a bit of c/make knowledge) not around ?
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
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
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
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 11:41, 2 years ago
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 13:30, 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
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 16:14, 2 years ago
You do not have access to view attachments
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

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 09:46, 2 years ago
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
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 17:20, 2 years ago
You do not have access to view attachments
amigamiaamigamiaAdmin
Posted 3 years ago
Hi deadwood, how is the progress going with GCC 6.5?
amigamiaamigamiaAdmin
Posted 3 years ago
Indeed very good news. Thanks for your support deadwood.
C
cavemannSoftware Dev
Posted 3 years ago
Very nice... expect more ports Smile
D
deadwoodAROS Dev
Posted 3 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.
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 11
Members Online 0

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