Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
141 user(s) are online (100 user(s) are browsing Forums)

Members: 1
Guests: 140

MickJT, more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
sdl12-compat
Not too shy to talk
Not too shy to talk


See User information
Hello

For those familiar with the current Qemu problem with SDL1 and sm502 Qemu, I decided to make a sdl12-compat port. Currently it is a pure copilation with no changes for AOS4.
In general it can be useful not only for Qemu

https://www.phoronix.com/news/sdl12-compat-1.2.66

git: https://github.com/libsdl-org/sdl12-compat


There are some problems that I, with my level of knowledge, can't do anything more about and fix on AOS4.

Has anyone tried or is there any sdl12-compat port on AOS4 ?

How it works here:
https://streamable.com/6xicgh


Threads problem:


https://streamable.com/4k0nld

Thank you for your help

Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@smarkusg

Some more information for others would be helpful, as I understood you compiled sdl12-Compat partially for AmigaOs4.1.

On the first video you show E-UAE with sdl12-compat ,or only in the second video where it breaks?

Maybe it would also be useful to include the crash log so you could see exactly what the problem is.

I don't know if I understood correctly, SDL12Compat is a SDL1 and 2 merge? If so it would be a good thing to port SDL12-Compat for AmigaOs4.1 in general because you don't have to care about SDL1 and SDL2 separately anymore.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: sdl12-compat
Not too shy to talk
Not too shy to talk


See User information
@Maijestro

>On the first video you show E-UAE with sdl12-compat ,or only in the second video where it breaks?

It works. I just gave a short video of what it uses - SDL2.

here is a longer video

https://streamable.com/ids9b1


>I don't know if I understood correctly, SDL12Compat is a SDL1 and 2 merge? If so it would be a good thing to port SDL12-Compat for AmigaOs4.1 in general because you don't have to care about SDL1 and SDL2 separately anymore.

Yes. It's helpful for older programs and it's clear that there won't be a port to SDL2.

I asked if anyone has tried this before so as not to do it a second time. If someone has tried it, they may have found a solution to a few problems.

Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@smarkusg

I still don't get it why they port SDL12-Compat. Is it about E-UAE and CPU G4 (Qemu) or does this version of SDL in general run a bit better under AmigaOs4.1?

What advantages would we have with SDL12-Compat that we don't have with SDL1? Don't be angry with me, I just want to understand

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@Maijestro

https://github.com/libsdl-org/sdl12-compat
...
This code is a compatibility layer; it provides a binary and source compatible API for programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes. If you are writing new code, please target SDL 2.0 directly and do not use this layer.
...

AFAIK looks like a wrapper for SDL1 to use SDL2 (if I'm not mistaken)

Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@smarkusg

So you are testing E-UAE? Is that built using newlib or clib2? Can you do readelf -d on binary?

And which C library sdl12-compat is using?

Maybe you could install debug variant of the SDL2 shared object over normal .so and use sashimi to collect serial logs. Actually, it should work even if you make a local SOBJS directory in application dir and copy debug shared object there with a proper name (no _debug).

Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@jabiruloQuote:
jabirulo wrote:@Maijestro

AFAIK looks like a wrapper for SDL1 to use SDL2 (if I'm not mistaken)


Ok I see, then this port would be really useful for AmigaOs4.1 as long as it is compatible with SDL1. Since SDL2 includes many improvements that were not available with SDL1.

@smarkusg

You should stick to Capehill as he is very experienced in SDL1/2 porting for AmigaOs4.1.

@Capehill

Maybe you can port it yourself, you are very experienced and it should not be a big problem for you. It would be very useful for Qemu (software rendering) and also for real AmigasNG I think because of the SDL2 improvements provided in this wrapper.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: sdl12-compat
Not too shy to talk
Not too shy to talk


See User information
@Capehill

sdl12-compat is a static library with me.

readelf -./src/uae


Dynamic section at offset 0x366060 contains 20 entries
:
  
Tag        Type                         Name/Value
 0x00000001 
(NEEDED)                     Shared library: [libz.so.1]
 
0x00000001 (NEEDED)                     Shared library: [libdl.so]
 
0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
 
0x00000001 (NEEDED)                     Shared library: [libgcc.so]
 
0x00000001 (NEEDED)                     Shared library: [libc.so]
 
0x00000004 (HASH)                       0x1000128
 0x00000005 
(STRTAB)                     0x1000ef4
 0x00000006 
(SYMTAB)                     0x1000594
 0x0000000a 
(STRSZ)                      1376 (bytes)
 
0x0000000b (SYMENT)                     16 (bytes)
 
0x00000015 (DEBUG)                      0x0
 0x00000003 
(PLTGOT)                     0x131f000
 0x00000002 
(PLTRELSZ)                   1392 (bytes)
 
0x00000014 (PLTREL)                     RELA
 0x00000017 
(JMPREL)                     0x1001478
 0x00000007 
(RELA)                       0x1001454
 0x00000008 
(RELASZ)                     1428 (bytes)
 
0x00000009 (RELAENT)                    12 (bytes)
 
0x6000000e (Operating System specific6000000e)        0x2
 0x00000000 
(NULL)                       0x0


File: ./libSDL.a(SDL12_compat.c.obj)

There is no dynamic section in this file.


uae config 

  
$ ./configure CFLAGS=-O2 -mcrt=newlib ....



E-UAE running with no configuration and no rom - just like in the second video of this thread.

Serial log with libSD2 debug
[OS4_OpenLibraryOpening 'AmigaInput.library' version 51 succeeded (address 0x695D5018)
[
OS4_GetInterfaceGetting interface for libbase 0x695D5018 succeeded (address 0x640AE700)
[
AMIGAINPUT_InitEnumDevices returned 0
[AMIGAINPUT_InitFound 0 joysticks
[SDL_DestroyMutexDestroying mutex 0x6FFAAC80
[AMIGAINPUT_CloseLibraryCalled
[OS4_DropInterfaceDropping interface 0x640AE700
[OS4_CloseLibraryClosing library 0x695D5018
[SDL_DestroyMutexDestroying mutex 0x6FFAACA0
[SDL_DestroyMutexDestroying mutex 0x6FFAAC20
[OS4_FreeCursorCalled 0x62347508
[OS4_VideoQuitCalled
[OS4_FreeCursorCalled 0x6234DDF0
[OS4_QuitModesCalled
[OS4_UnlockPubScreenUnlocking public screen 0x6912B388
[OS4_DeleteDeviceCalled
[OS4_FreeSystemResourcesCalled
[OS4_DropInterfaceDropping interface 0x6FF451E0
[OS4_FreeSystemResourcesClosing input.device
[OS4_FreeSystemResourcesFreeing IORequest
[OS4_FreeSystemResourcesFreeing MsgPort
[OS4_FreeSystemResourcesFreeing memory pool
[OS4_FreeSystemResourcesReplying app messages
[OS4_FreeSystemResourcesFreeing app message port
[OS4_FreeSystemResourcesFreeing user port
[OS4_UnregisterApplicationUnregistered application with id 6
[SDL_SemPostSignalling task 0x636744F0 for semaphore 0x62346B40
[SDL_SemPostSemaphore 0x62346B40 value 1
[SDL_SYS_WaitThreadWaiting for 'SDLTimer'
[SDL_SemWaitTimeoutSemaphore 0x62346B40 got signal 0x8000
[OS4_ExitThreadCalled from task 0x636744F0finalData 0x660FB950
[OS4_ExitThreadRemoving node 0x660FB950 from children list
[
OS4_ExitThreadSignalling waiters
[OS4_TimerDestroyDestroying timer 0x660FB960 for task 0x636744F0
[OS4_TimerCleanupFreeing timer request 0x65F9C8B0
[OS4_TimerCleanupFreeing timer port 0x65F9EB00
[OS4_ExitThreadExiting
[SDL_SYS_WaitThreadSome child thread terminated
[SDL_SYS_WaitThreadThread 'SDLTimer' doesn't exist
[SDL_DestroySemaphore] Destroying semaphore 0x62346B40
[SDL_DestroyMutex] Destroying mutex 0x6FFAAB60



This test https://github.com/libsdl-org/sdl12-co ... blob/main/test/testlock.c

makes a similar mistake
"- testlock work, but at some point it crash badly -->
"SDL thread (null) (0x4eb97e88)""




Thanks for your help and advice


Edited by smarkusg on 2023/9/24 20:22:56
Edited by smarkusg on 2023/9/24 20:23:56
Edited by smarkusg on 2023/9/24 20:24:40
Edited by smarkusg on 2023/9/24 20:36:46
Go to top
Re: sdl12-compat
Not too shy to talk
Not too shy to talk


See User information
@Maijestro

>I just want to understand

Simply put:
1. Library SDL1 :
"The 1.2 branch of SDL is deprecated. While we occasionally collect fixes in revision control, there has not been a formal release since 2012, and we have no intention to do future releases, either."
2. SDL2 is said to have better output device interoperability, improved audio support, better video performance. At least it should be
"This sdl12-compat project allows for old, out-of-date games and other applications relying on the old SDL 1.2 interface to in turn run via the modern SDL2 library"
3. Useful for Qemu Pegasos 2 where there is a problem with sm502 and SDL1 at G4.

Go to top
Re: sdl12-compat
Not too shy to talk
Not too shy to talk


See User information
@Capehill

The current status of sdl12 works - there is a problem with the mouse getting stuck in the window when switching from full screen and a window minimisation problem.
I used this library only myself for testing - but I know it was useful for another person too.

@Capehill if you had the opportunity and time could you take a look at it ?

Thank you

Go to top
Re: sdl12-compat
Home away from home
Home away from home


See User information
We would really need an SDL2 output for MPlayer, also it would be really useful to Steffen Hauser for his upcoming games too

Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@smarkusgQuote:
smarkusg wrote:@Maijestro

>I just want to understand

Simply put:
1. Library SDL1 :
"The 1.2 branch of SDL is deprecated. While we occasionally collect fixes in revision control, there has not been a formal release since 2012, and we have no intention to do future releases, either."
2. SDL2 is said to have better output device interoperability, improved audio support, better video performance. At least it should be
"This sdl12-compat project allows for old, out-of-date games and other applications relying on the old SDL 1.2 interface to in turn run via the modern SDL2 library"
3. Useful for Qemu Pegasos 2 where there is a problem with sm502 and SDL1 at G4.


So this sdl12-compat would be useful for everyone and offer the best compatibility with sdl1.x/sdl2 and is very modern. Older programs like Mplayer and all the sdl1.x stuff could benefit from this.

Maybe we should all work together and make this project happen, since you've already started it maybe someone could help with bug fixes.

Under MacOs, sdl12-compat is already used as the standard for SDL output and if possible we should do the same for AmigaOs4.1.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@smarkusgQuote:
smarkusg wrote:@Capehill

The current status of sdl12 works - there is a problem with the mouse getting stuck in the window when switching from full screen and a window minimisation problem.
I used this library only myself for testing - but I know it was useful for another person too.


Could you perhaps demonstrate what the problem is at the moment?

It might be helpful for others looking at it. Otherwise, you can also send me the test version and I will test it and try to include a detailed description.

@all

SDL12-compat would bring many improvements under AmigaOs4.1, all current SDL1.x ports/programs/tool/games would benefit from it.


Edited by Maijestro on 2023/11/6 17:52:05
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: sdl12-compat
Not too shy to talk
Not too shy to talk


See User information
@Maijestro

For the time being, a number of things need to be improved that are known to have problems. Thank you for your commitment.

Here you have a sample program... as you can see the mouse is stuck in the window. Minimalisation works , you still need to force SDL2 to scale the image.
Surely it works because I saw in DOSBOX that sdl12 using SDL2 can do it.

https://streamable.com/jiwgyn

Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@smarkusgQuote:
smarkusg wrote:@Maijestro
Here you have a sample program... as you can see the mouse is stuck in the window. Minimalisation works , you still need to force SDL2 to scale the image.
Surely it works because I saw in DOSBOX that sdl12 using SDL2 can do it.


Yes, I see the problem, the mouse cursor stays in the running SDL application and can no longer be removed from the application.

@all @Capehill

Does anyone have an idea why the mouse cursor cannot be removed from the running SDL window?

To improve things we need an SDL professional and as far as I know we only have one in the AmigaOs4.1 scene who could help...

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@Maijestro

SDL has a possibility to grab mouse inside some window so grabbing may be intended from application's side. I hope there was a smaller example than MPlayer to check. But if you can point me to the relevant version of its source code, I can try to take a look.

Go to top
Re: sdl12-compat
Just can't stay away
Just can't stay away


See User information
@Capehill

It's really very nice of you, as you can see in the video, smarkusg has already made some progress with this port, but with your help we should be able to make the whole thing available for AmigaOs4.1 sooner or later. It's not an SDL2 replacement, but definitely an SDL1.x supplement and as already described, all older SDL1.x applications would benefit from it, so we should at least test it and find out if that's actually true.

@smarkusg

Can you please link to the current source with all the work you have done on the current sdl-compat port that Capehill can look at?

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: sdl12-compat
Home away from home
Home away from home


See User information
@Capehill

As Markus explain, we mostly have two big issues with "MPlayer SDLcompact" .. and one of this is related to the mouse pointer
An help would be great for sure, if needed of course we can do any stress test for you

Go to top
Re: sdl12-compat
Not too shy to talk
Not too shy to talk


See User information
@Maijestro
Quote:
@smarkusg

Can you please link to the current source with all the work you have done on the current sdl-compat port that Capehill can look at?


Of course. I sent a PM to @Capehill.
@samo79 also wrote how we could possibly help check or pass on a test version if a corenspondence was not needed with me.

Go to top
Re: sdl12-compat
Home away from home
Home away from home


See User information
@smarkusg

You may just pass him an MPlayer test binary compiled with SDLcompact ... the two issues still pretty self explained ...
Of course there might also be some other minor problems, but basically the problems were the ones we already reported

Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project