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.

SDL2 software ports

Last updated on 3 days ago
R
retrofazaMember
Posted 2 months ago
I compiled a simple game using the SDL2 port recently released by Kalamatee for testing purposes. Currently, SDL2 is not yet fully functional, as it lacks sound and OpenGL. But this is already a big step forward, and I can't wait for the full version Smile

aha, Argo, mmartinka
T
terminillsNewbie
Posted 2 months ago
Nick’s been on a roll lately — hard to even keep track of all the stuff he’s knocked out recently.

Proper EFI boot support is working in the nightlies now

LLVM builds are running

GCC 15 support added

HEIC datatype implemented

LLaMA2 ported (yes, that LLaMA2!)

Bug fixes in Scout2 and FryingPan

Grub2 support updated

PCI IRQ routing enhancements

QuickPart (partitioning tool)

Real logger implemented

Revamp of the dev and translation sections on AROS.org

Pretty sure that's been since may.
aha, Argo, x-vision, deadwood
R
retrofazaMember
Posted 2 months ago
Yes, he's doing a great job. He started sometime in May and has been committing practically every day. I'm impressed.
amigamiaamigamiaAdmin
Posted 2 months ago

retrofaza wrote:

@retrofaza - I compiled a simple game using the SDL2 port recently released by Kalamatee for testing purposes. Currently, SDL2 is not yet fully functional, as it lacks sound and OpenGL. But this is already a big step forward, and I can't wait for the full version Smile



Wow that is an awesome news! I have tried to port SDL 2 to AROS in the past and also recently with arrival of GCC ver 10 but all attempts have failed. I am curious to see what was done to make it compile. Where did you get the lib from?
Templario, FancyPlanet
amigamiaamigamiaAdmin
Posted 2 months ago
R
retrofazaMember
Posted 2 months ago
@amigamia

These early SDL2 files are also already in the Deadwood repository. If you have a system built from source, just update it (system and contrib).
O
OlafSchMember
Posted 2 months ago
great project Smile

two questions... is it static or a dynmaic library? As I understand static.

Does it also work on 68k? Could someone compile a example so I could test it?
X
x-visionNewbie
Posted 2 months ago

terminills wrote:

@terminills - Nick’s been on a roll lately — hard to even keep track of all the stuff he’s knocked out recently.

Proper EFI boot support is working in the nightlies now

LLVM builds are running

GCC 15 support added

HEIC datatype implemented

LLaMA2 ported (yes, that LLaMA2!)

Bug fixes in Scout2 and FryingPan

Grub2 support updated

PCI IRQ routing enhancements

QuickPart (partitioning tool)

Real logger implemented

Revamp of the dev and translation sections on AROS.org

Pretty sure that's been since may.


I was going to say impressive, but it's more like jaw dropping

Is there any place where he publish or comment his news? his blog is not updated
T
terminillsNewbie
Posted 2 months ago

OlafSch wrote:

@OlafSch - great project Smile

two questions... is it static or a dynmaic library? As I understand static.

Does it also work on 68k? Could someone compile a example so I could test it?



Shared... Kalamatee doesn't do static unless it 100% makes sense.
O
OlafSchMember
Posted 2 months ago
I understand. Would be interesting to test it on 68k also
D
deadwoodAROS Dev
Posted 2 months ago
@All

I integrated latest changes from Kalamatee into my repository (that includes enabling GL support). If anyone would like to try porting SDL2 software with this BETA version please contact me via PM here or on Discord and I'll share SDK (headers + linker library).
Argo, retrofaza, Amiwell79, Farox
F
FaroxMember
Posted 2 months ago
@deadwood
I tested compiling a game...but have found segfault, to be sure didn't depend from the game i compiled a simple example (lazyfoo SDL2 lesson 1) and it segfault.

Attached is the shot of BT from lesson1
Don't know if you prefer to have this kind of report on this thread or PM or another thread.
Let me know.
Thanks
Edited by Farox on 13-08-2025 08:42, 2 months ago
You do not have access to view attachments
D
deadwoodAROS Dev
Posted 2 months ago
It's good to post it here so that all other developers benefit from it as well.

In this specific case, the bug was already solved in Intuition. Please make sure you update your installation with U1 update (or fetch fresh sources and re-build) Smile
F
FaroxMember
Posted 2 months ago
Ok i forgot to update the hosted 64 bit.
Now i compiled about 10 lessons of Lazyfoo about SDL2.
Lesson 1 to 6 working fine.
From lesson 7 to 10 it says that could not create a renderer, i attach a shot and the code of lesson 7 (but same code are inside the other lessons).

//Create window
      gWindow = SDL_CreateWindow( "SDL Tutorial", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN );
      if( gWindow == NULL )
      {
         printf( "Window could not be created! SDL Error: %sn", SDL_GetError() );
         success = false;
      }
      else
      {
         //Create renderer for window
         gRenderer = SDL_CreateRenderer( gWindow, -1, SDL_RENDERER_ACCELERATED );
         if( gRenderer == NULL )
         {
            printf( "Renderer could not be created! SDL Error: %sn", SDL_GetError() );
            success = false;
         }
         else
         {
            //Initialize renderer color
            SDL_SetRenderDrawColor( gRenderer, 0xFF, 0xFF, 0xFF, 0xFF );

            //Initialize PNG loading
            int imgFlags = IMG_INIT_PNG;
            if( !( IMG_Init( imgFlags ) & imgFlags ) )
            {
               printf( "SDL_image could not initialize! SDL_image Error: %sn", IMG_GetError() );
               success = false;
            }
         }

Don't know if at moment SDL_RENDERER_ACCELERATED is not supported.
Thanks
You do not have access to view attachments
R
retrofazaMember
Posted 2 months ago
try add SDL_WINDOW_OPENGL to SDL_CreateWindow
F
FaroxMember
Posted 2 months ago
Thanks replacing SDL_WINDOW_SHOWN with SDL_WINDOW_OPENGL make it work...
but only with a session of gdb enabled, without using gdb to run it segfault.
Attached a screenshot.
You do not have access to view attachments
R
retrofazaMember
Posted 2 months ago

Farox wrote:

@Farox - Thanks replacing SDL_WINDOW_SHOWN with SDL_WINDOW_OPENGL make it work...
but only with a session of gdb enabled, without using gdb to run it segfault.
Attached a screenshot.


I confirm that this example sometimes crashes for me too.

EDIT: Indeed, that was a problem with the stack
Edited by retrofaza on 14-08-2025 11:56, 1 month ago
T
terminillsNewbie
Posted 1 month ago
From kalamatee

makedir ENV:SDL2

setenv SAVE SDL2/GL_renderer 1

-> it will enable/use the GL renderer then

You also need to use more stack ... GL can be stack intensive depending on the drivers used

(thats why you get the crashing)
D
deadwoodAROS Dev
Posted 1 month ago
@Farox

Can you share your binary? I tried binary shared by @retrofaza and I can't get the crash.

FYI, as long as you request SDL_WINDOW_OPENGL the GL renderer will be selected automatically - you don't have to use that variable. Comment on the stack is valid. Be sure you have more than 512MB assigned to AROS and stack of 128k or higher when working with software rendering.

EDIT: starting from shell or from icon (stack 128k, removed CLI ToolType) worked for me 10x with @retrofaza's binary
Edited by deadwood on 14-08-2025 11:16, 1 month ago
F
FaroxMember
Posted 1 month ago
It was a problem of stack (for me only over of 240k worked).
Edited by Farox on 14-08-2025 15:38, 1 month ago
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: amigamia, terminills, deadwood, AMIGASYSTEM, ntromans, retrofaza, OlafSch, Farox, Deremon, x-vision