Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
112 user(s) are online (108 user(s) are browsing Forums)

Members: 0
Guests: 112

more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 14 15 16 (17) 18 »
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

Yes, it should be possible. You need the Intuition window pointer first. Then, call aglCreateContext and pass the window pointer. Now you should have a GL context which you can make current, draw, swap the buffers and destroy later (before window closing, probably). And in case window pointer changes it has to be refreshed.

There might be some conflicts if app calls SDL_Flip or similar. These probably should be deactivated.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
Ah so, we still need to create context by OGLES2, and SDL1 didn't create one for us as it happens with SDL2 ..

Did i understand right, that with SDL1, when we create a window with :

Screen SDL_SetVideoModeWidthHeightCreationParams.BitsSDL_Flags );


Where one of flags SDL_OPENGL; then we do create MiniGL context by the SDL1 source code.

But now, if we want to draw by ogles2 to sdl1 window, we should _not_ create window with SDL_OpenGL, so to avoid creating of MiniGL context, but instead, we create non-opengl window, and then get the intuition window pointer, and then aglCreateContext and then aglMakeCurrent ?


PS. Btw, how can i get Intuition window pointer from SDL_Surface *Screen ? I see we do have some SDL_PrivateVideoData field which store window pointer among others, but how to get it from screen created by SDL_SetVideoMode ? I.e. i have now:

LOGLES2 IExec->OpenLibrary("ogles2.library"0);
    if(!
LOGLES2) {
        
printf("LIBGL: Warning, cannot open ogles2 Library!\n");
        return;
    }
    
IOGLES2 = (struct OGLES2IFace *)IExec->GetInterface(LOGLES2"main"1NULL); 
    if(!
IOGLES2) {
        
printf("LIBGL: Warning, cannot openogles2 Interface!\n");
        
IExec->CloseLibrary(LOGLES2);
        
LOGLES2 NULL;
    }


..
blablablbal Init SDL without SDL_OpenGL flag to void minigl..

Screen SDL_SetVideoModeWidthHeightCreationParams.BitsSDL_Flags );

    
struct TagItem contextparams[] =
    {
            {
OGLES2_CCT_WINDOW,(ULONG)Screen->win},
            {
OGLES2_CCT_DEPTH,16},
            {
OGLES2_CCT_STENCIL,8},
            {
OGLES2_CCT_VSYNC,0},
            {
OGLES2_CCT_SINGLE_GET_ERROR_MODE,1},
            {
OGLES2_CCT_RESIZE_VIEWPORTTRUE},
            {
TAG_DONE,0}
    };
        
    
void *ogles_context IOGLES2->aglCreateContext2(&errCode,contextparams);

      if (
ogles_context)
    {
        
IOGLES2->aglMakeCurrent(ogles_context);
        
    }


And this "win" i not sure from where take. SDL_Surface structure seems do not contain it so it should be some private field or something , like maybe Screen->private_data->win ?


Edited by kas1e on 2022/9/22 13:54:34
Edited by kas1e on 2022/9/22 14:02:42
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

You probably should skip SDL_OPENGL flag in this scenario.

Try using SDL_GetWMInfo() to get window pointer.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Rigth, so i just did rigth before context-creation this:

SDL_SysWMinfo wmi = { };
    
SDL_GetWMInfo(&wmi);


And then: {OGLES2_CCT_WINDOW,(ULONG)wmi.window}, works.

I also while waiting your answer already tested by using the same hack which i did for GL4ES (so to open ogles2 context instead,etc) and this works too.

Throuhg, by "works" i mean, no crash, and i can see that shaders are about to be compiled, but, i still have black screen, few GLSL shader program failed to link and GL_INVALID_OPERATION 176.

I will create relevant topic about all this to not flood this one.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
I would like to briefly describe a problem I noticed that I thought was caused by Qemu, but it is not.

I have compared SDL under AmigaOs4.1 Pegasos 2 and AmigaOs4.1 AmigaOneXe, under AmigaOs4.1 Pegasos 2 there are many problems with SDL output that do not exist under AmigaOs4.1 for AmigaOneXe.

Both emulations are almost identical and I use the same CPU G4 7447/7457. I am now sure that it can't be a problem of the Qemu emulations, but that there must be differences internally in the SDL version of AmigaOs4.1 Peg2 and AmigaOneXe.

An example with Xrick from os4Depot:

AmigaOs4.1 AmigaOneXe:

Resized Image

Resized Image

AmigaOs4.1 Pegasos 2:

Resized Image

Resized Image

I don't know what differences there are between the Pegasos 2 version of AmigaOs4.1 and the AmigaOneXe version of SDL that cause this problem.

If it is not too much trouble, could we fix this problem?

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: SDL1 open issues
Not too shy to talk
Not too shy to talk


See User information
@Maijestro

The most interesting thing is... press on Pegasos 2 qemu xrick F1.
It switches from full screen to window and works perfectly.

https://ibb.co/X5st7qs

xrick from os4depot: http://os4depot.net/?function=showfil ... e=game/platform/xrick.lha

serial debug from pegasos2

thread_initPrimary thread is 0x63D4DC60
[os4video_AvailableProbing Picasso96API.library
[os4video_AvailableSuccess
[os4video_CreateDeviceCreating OS4 video device
[os4video_CreateDeviceDevice created
[SDL_SYS_CreateThreadCreating child thread 0x66730FF8 with args 0x66731330
[SDL_SYS_CreateThreadChild creation returned 0x651FB640
[RunThreadIn RunThreadme 0x651FB640args 0x66731330thread object 0x66730FF8
[os4video_ListModesListing modes for format 16 bit
[os4video_ListModesRGBA MasksF8007E01F0
[os4video_MakeResArray11 video modes (allocating a 136 array
[
os4video_FillModeArrayAdded mode 320x256
[os4video_FillModeArrayAdded mode 640x480
[os4video_FillModeArrayAdded mode 800x600
[os4video_FillModeArrayAdded mode 1024x768
[os4video_FillModeArrayAdded mode 1280x720
[os4video_FillModeArrayAdded mode 1280x800
[os4video_FillModeArrayAdded mode 1280x960
[os4video_FillModeArrayAdded mode 1280x1024
[os4video_FillModeArrayAdded mode 1440x900
[os4video_FillModeArrayAdded mode 1600x900
[os4video_FillModeArrayAdded mode 1680x1050
[os4video_ListModesListing modes for format 8 bit
[os4video_FindModeWanted 640x480:8
GOT
:
[
os4video_FindModeMode0x00021000
[os4video_FindModeWidth0
[os4video_FindModeHeight0
[os4video_FindModeFmt 0 bits 0
[os4video_ListModesdisplayID 21000
[os4video_ListModesmode 0
[os4video_ListModesNo mode
[os4video_ListModesListing modes for format 8 bit
[os4video_FindModeWanted 640x480:8
GOT
:
[
os4video_FindModeMode0x00021000
[os4video_FindModeWidth0
[os4video_FindModeHeight0
[os4video_FindModeFmt 0 bits 0
[os4video_ListModesdisplayID 21000
[os4video_ListModesmode 0
[os4video_ListModesNo mode
[os4video_ListModesListing modes for format 16 bit
[os4video_FindModeWanted 640x480:16
GOT
:
[
os4video_FindModeMode0x50001100
[os4video_FindModeWidth640
[os4video_FindModeHeight480
[os4video_FindModeFmt 4 bits 16
[os4video_ListModesdisplayID 50001100
[os4video_ListModesmode 4
[os4video_MakeResArray11 video modes (allocating a 136 array
[
os4video_FillModeArrayAdded mode 320x256
[os4video_FillModeArrayAdded mode 640x480
[os4video_FillModeArrayAdded mode 800x600
[os4video_FillModeArrayAdded mode 1024x768
[os4video_FillModeArrayAdded mode 1280x720
[os4video_FillModeArrayAdded mode 1280x800
[os4video_FillModeArrayAdded mode 1280x960
[os4video_FillModeArrayAdded mode 1280x1024
[os4video_FillModeArrayAdded mode 1440x900
[os4video_FillModeArrayAdded mode 1600x900
[os4video_FillModeArrayAdded mode 1680x1050
[os4video_ListModesListing modes for format 15 bit
[os4video_FindModeWanted 640x480:15
GOT
:
[
os4video_FindModeMode0x50001100
[os4video_FindModeWidth640
[os4video_FindModeHeight480
[os4video_FindModeFmt 4 bits 16
[os4video_ListModesdisplayID 50001100
[os4video_ListModesmode 4
[os4video_ListModesReturning prebuild array
[
os4video_ListModesListing modes for format 32 bit
[os4video_FindModeWanted 640x480:32
GOT
:
[
os4video_FindModeMode0xFFFFFFFF
[os4video_FindModeWidth0
[os4video_FindModeHeight0
[os4video_FindModeFmt 0 bits 0
[os4video_ListModesdisplayID FFFFFFFF
[os4video_ListModesmode 0
[os4video_ListModesNo mode
[os4video_ListModesListing modes for format 24 bit
[os4video_FindModeWanted 640x480:24
GOT
:
[
os4video_FindModeMode0xFFFFFFFF
[os4video_FindModeWidth0
[os4video_FindModeHeight0
[os4video_FindModeFmt 0 bits 0
[os4video_ListModesdisplayID FFFFFFFF
[os4video_ListModesmode 0
[os4video_ListModesNo mode
[os4video_ListModesListing modes for format 8 bit
[os4video_FindModeWanted 640x480:8
GOT
:
[
os4video_FindModeMode0x00021000
[os4video_FindModeWidth0
[os4video_FindModeHeight0
[os4video_FindModeFmt 0 bits 0
[os4video_ListModesdisplayID 21000
[os4video_ListModesmode 0
[os4video_ListModesNo mode
[os4video_ListModesListing modes for format 8 bit
[os4video_FindModeWanted 640x480:8
GOT
:
[
os4video_FindModeMode0x00021000
[os4video_FindModeWidth0
[os4video_FindModeHeight0
[os4video_FindModeFmt 0 bits 0
[os4video_ListModesdisplayID 21000
[os4video_ListModesmode 0
[os4video_ListModesNo mode
[os4video_ListModesListing modes for format 16 bit
[os4video_FindModeWanted 640x480:16
GOT
:
[
os4video_FindModeMode0x50001100
[os4video_FindModeWidth640
[os4video_FindModeHeight480
[os4video_FindModeFmt 4 bits 16
[os4video_ListModesdisplayID 50001100
[os4video_ListModesmode 4
[os4video_ListModesReturning prebuild array
[
os4video_SetVideoModeRequesting new video mode 1680x1050x16
[os4video_SetVideoModeRequested flagsHWSURFACE FULLSCREEN 
[os4video_SetVideoModeCurrent mode 0x0x16
[os4video_SetVideoModeCurrent mode flags 
[os4video_SetVideoModeCurrent hwdata 0x00000000
[os4video_SetVideoModeCreating new display
[os4video_SetVideoModeDeleting old display
[os4video_SetVideoModeCalling CreateDisplay
[os4video_CreateDisplayCreating a 1680x1050x16 display
[os4video_CreateDisplayFullscreen
[os4video_FindModeWanted 1680x1050:16
GOT
:
[
os4video_FindModeMode0x50091100
[os4video_FindModeWidth1680
[os4video_FindModeHeight1050
[os4video_FindModeFmt 4 bits 16
[os4video_OpenScreenScreen opened
[os4video_CreateDisplayUnsupported modeswitching to off-screen rendering
[os4video_CreateDisplayScreen pixel format:4
[os4video_CreateDisplayAllocating a 1680x1050x16 offscreen buffer
[os4video_CreateDisplayOffscreen buffer format:0000000A
[os4video_CreateDisplayTrying to open window
[os4video_CreateDisplayDone
[os4video_SetVideoMode] New display created
[os4video_SetVideoModeObtained flagsFULLSCREEN 
[SDL_SYS_CreateThreadCreating child thread 0x66732340 with args 0x66732678
[SDL_SYS_CreateThreadChild creation returned 0x67AF9980
[RunThreadIn RunThreadme 0x67AF9980args 0x66732678thread object 0x66732340
[os4video_SetVideoModeRequesting new video mode 640x400x8
[os4video_SetVideoModeRequested flagsHWSURFACE HWPALETTE 
[os4video_SetVideoModeCurrent mode 320x200x16
[os4video_SetVideoModeCurrent mode flags FULLSCREEN 
[os4video_SetVideoModeCurrent hwdata 0x63B88028
[os4video_SetVideoModeCreating new display
[os4video_SetVideoModeDeleting old display
[os4video_DeleteCurrentDisplayClosing window
[os4video_DeleteCurrentDisplayChecking screen buffers
[os4video_DeleteCurrentDisplayClosing screen
[os4video_SetVideoModeCalling CreateDisplay
[os4video_CreateDisplayCreating a 640x400x8 display
[os4video_CreateDisplayWindow mode
[os4video_FindModeWanted 640x400:8
GOT
:
[
os4video_FindModeMode0x00021000
[os4video_FindModeWidth0
[os4video_FindModeHeight0
[os4video_FindModeFmt 0 bits 0
[os4video_CreateDisplayScreen pixel format:4
[os4video_CreateDisplayAllocating a 640x400x8 offscreen buffer
[os4video_CreateDisplayOffscreen buffer format:00000001
[os4video_CreateDisplayTrying to open window
[os4video_CreateDisplayDone
[os4video_SetVideoMode] New display created
[os4video_SetVideoModeObtained flagsHWSURFACE HWPALETTE 
[os4video_SetColorsLoading colors 0 to 255
[os4video_SetColorsWindowed
[os4video_SetColorsUsing color format 16 bppmasks 0x0000F8000x000007E00x0000001F
[os4video_SetColorsLittle endian screen format
[os4video_SetColorsDone
[os4video_SetColorsLoading colors 0 to 255
[os4video_SetColorsWindowed
[os4video_SetColorsUsing color format 16 bppmasks 0x0000F8000x000007E00x0000001F
[os4video_SetColorsLittle endian screen format
[os4video_SetColorsDone

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Maijestro

Was there some kind of byte swap support in northbridge? Perhaps it does something wrong.

looks like you 4 bytes swaped with next 4 bytes.
(8bit GFX mode only way you get correct colors)

Perhaps its swapping 8bytes instead of swapping typical 4 bytes. Pixel 1,2,3,4,5,6,7,8 resvered as 8,7,6,5,4,3,2,1

whats expected is 1,2,3,4,1,2,3,4 revered as 4,3,2,1,4,3,2,1

If writes directly into bitmap buffer instead of using WritePixelArray, strange things can happen.

Odd things can happen with JIT, for example two 32bit instruction can be combined to from a 64bit instruction, maybe assumption is not always right. A reserved 64bit operation, vs 2 x revered 32bit operations won’t actually produce the same result.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@LiveForIt

This does not explain why SDL works under Qemu AmigaOneXe but not with Qemu under Pegasos 2 AmigaOs4.1

The emulations are the same, we use exactly the same emulated graphics card Silicon Motion and CPU on both emulations under AmigaOs4.1.

Only marginally with SDL2 there are no more the problems under both machines. So something must have been changed in SDL2 to make it work.

Unless @Balaton did something different with the Qemu AmigaOneXe that makes SDL1 run under AmigaOs4.1, but I can't imagine that.


Edited by Maijestro on 2023/8/27 11:06:11
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
XRick port is from 2004 (19 years!) and it has been statically linked to whatever libSDL.a existed at time. In order to investigate, probably a newer build should be made so that nobody goes out to hunt potentially non-existing bugs.

Go to top
Re: SDL1 open issues
Not too shy to talk
Not too shy to talk


See User information
@Capehill

Generally with all new SDL1 based programs there is the same problem on QEMU/Pegasos. Older programs surprisingly sometimes work.
xrick is one such example. After switching from fullscreen it starts to work. It will be difficult to check because they are, as you wrote, statically compiled.

There is another example described by Falke_34 on the forum amiga-news.de . There is the game "Project Secret Maryo Chronicles". Same problem with SDL1 but after changing from 16bpp to 32bpp in preferences.ini everything works fine.

https://www.amiga-news.de/de/forum/thread.php?id=36497&BoardID=1

Support for SDL1 is long gone because this library is too old. The problem will probably never be solved.... if it is SDL's fault.

If you have some quick program compiled test program with SDL1 with some DEBUG to test it then post, will test - @ Maijestro will surely do it too.

Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@CapehillQuote:
Capehill wrote:XRick port is from 2004 (19 years!) and it has been statically linked to whatever libSDL.a existed at time. In order to investigate, probably a newer build should be made so that nobody goes out to hunt potentially non-existing bugs.


It was only one example of many and should only point it out.

Pingus, MegaMario, Mplayer many SDL demos etc. also here are exactly the same problems with SDL1 under QEMU Pegasos 2 AmigaOs4.1 @smarkusg and also I would support you in debugging.

The SDL expert is you and we depend on your help, if we can test or debug something and they can explain how it is done, we will help to get the problem under control.

You are doing a really great job with SDL and without your support this problem will always be a problem.

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


See User information
@Maijestro

So, XRick is using 8bpp in HWSURFACE mode. For some reason this doesn't work on Pegasos(QEMU) in 16-bit mode (?). And possibly window size can have some impact? (for example zoom option in XRick)

Can somebody test XRick on a real Pegasos in 16-bit mode? If somebody already did, then sorry, I have missed that information.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Quote:

Can somebody test XRick on a real Pegasos in 16-bit mode? If somebody already did, then sorry, I have missed that information


I can test on real pegasos2, just which version: the old one, or the new one ?:)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Not too shy to talk
Not too shy to talk


See User information
@kas1e

If you can, check on the old one. I know it can be a problem, but if you can use a Silicon Motion graphics card.
I can build a version under 1.2.16 because I have xrick sources on hand.

I've also seen xrick under SDL2 but something is with the sound... but that's another topic.


thanks for your help

Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1eQuote:
kas1e wrote:@Capehill
Quote:

Can somebody test XRick on a real Pegasos in 16-bit mode? If somebody already did, then sorry, I have missed that information


I can test on real pegasos2, just which version: the old one, or the new one ?:)


Please test the old version of Os4Depot on your real Pegasos 2 with 16 bit screen output, this version does not work under Qemu Pegasos2.

@smarkusg

On real Pegasos 2 there is no Silicon Motion graphics card, this chip was originally installed in the sam460.

But what we could do is additionally test it on a real sam460 with Silicon Motion chipset.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: SDL1 open issues
Not too shy to talk
Not too shy to talk


See User information
@Maijestro

Yes you are right. My mistake.
Sorry.

Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@all
Tested old XRick from os4depot on real pegasos2 on both 32bit modes and 16 bit modes on my AGP Radeon9250 card : no issues. All shown correctly. For sake of tests i check with each test via Ranger that i do have 16bit and 32bit modes on the XRick screen, and yeah, old Xrick works fine on real peg2 with radeon9250 both 32 and 16 bits output.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Not too shy to talk
Not too shy to talk


See User information
@kas1e
thank you for your time.

The last thing I can think of is to check Qemu Pegasos 2 G4 with radeon card via passthrough.
I think @MartinW had this configuration. From what I've seen he has become the happy owner of an X5000. Chances are he won't currently have the time or inclination to check it out.

Just as a reminder to those who don't read all posts :
Qemu AmigaOneXe cpu G4 SM502 - SDL works fine.
Qemu Pegasos 2 cpu G3 SM502 - SDL works fine.

Go to top
Re: SDL1 open issues
Not too shy to talk
Not too shy to talk


See User information
It's a bit less about time or inclination and more about the fact the X5000 parts were built into the case that the Qemu emulated machine was living in so they are currently just individual parts on my workbench pending me buying a new case and PSU to house them which needs to wait for the cash and for building work at home to be finised, so probably October?

After that I really don't mind testing things again.


Amiga x5040 ı 16GB ı RX580
GB-A1000 060@100,
A1200 PiStorm32-Lite CM4
Go to top
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1eQuote:
kas1e wrote:@all
Tested old XRick from os4depot on real pegasos2 on both 32bit modes and 16 bit modes on my AGP Radeon9250 card : no issues. All shown correctly. For sake of tests i check with each test via Ranger that i do have 16bit and 32bit modes on the XRick screen, and yeah, old Xrick works fine on real peg2 with radeon9250 both 32 and 16 bits output.


Since was almost to be expected, thank you for their time and test in real conditions.

@all

Let's summarize briefly:

We have 3 emulations under Qemu that we can use AmigaOnXe, Same460 and Pegasos 2.

Pegasos 2 emulation problems with SDL1 G4 CPU 7447/7457 (G3 CPU works with SDL1)
AmigOneXe emulation no problems with SDL1 G4 CPU 7447/7457
Sam460-emulation no problems with SDL1 CPU PowerPC460ex

Since we have already run the test on real hardware (Pegasos 2), this does not seem to be due to the Silicon Motion chipset or the 16-bit output, since it works under real hardware with a graphics card and in the AmigaOneXe emulation with SDL1.

We can also exclude the G4 CPU 7447/7457, same result AmigaOneXe SDL1 works, Pegasos 2 SDL1 does not work.

Apparently something within the Pegasos 2 emulation must cause SDL1 to become unusable. It is a big mystery....


Edited by Maijestro on 2023/8/29 16:24:10
Edited by Maijestro on 2023/8/29 16:25:33
Edited by Maijestro on 2023/8/29 16:27:16
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top

  Register To Post
« 1 ... 14 15 16 (17) 18 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project