Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
37 user(s) are online (30 user(s) are browsing Forums)

Members: 0
Guests: 37

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 3 4 (5) 6 7 8 ... 18 »
Re: SDL1 open issues
Just can't stay away
Just can't stay away


See User information
@kas1e

Well, isn't it strange. Either ITimer opening fails or somebody writes NULL over it. SDL1 doesn't do much checking. I will try to add some debug and push the changes into some branch. (Also SDL1 doesn't call CloseDevice for its timer requests.)

I will also rename some functions because now there is almost symbol collision with os4timer_init and os4timer_Init...

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


See User information
@Capehill
I can be wrong, but you already do so?:) I mean os4timer_Init are from adtools version, in your one it is already removed and called os4timer_init. Its just for me when i grab adtools version of sdl_os4timer.c (which have os4timer_Init), i gad to change it.

Btw, i thinking about different ogl renders, and imho inbuild everything in are good idea. And just add more flags to sdl_init. I.e SDL_OPENGL = minigl. SDL_GL4ES = gl4es, SDL_OGLES2 = ogles2. Imho easy enough. And refactoring probably can be something like:
sdl_os4ogl_common.c - there all code which can be shared.
Sdl_os4minigl_* - for all minigl files
Sdl_os4gl4es_* and Sdl_ogles2_* - for gl4es and ogles.

And no need to worry about configuring, just all at once.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@capehill
I see your new branch, will try it now

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

Flags sound ok.

Naming things is the hardest part in programming. My advice is that try to be consistent with whatever style you choose. Luckily it should be simple to rename files in Git :)

Configure script would need checks / switches for gl4es and ogles2?

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


See User information
@Capehill
Good news, itimer_fix branch just works!

I then retested to be sure: i downloaded again master branch, and rebuild it from scratch, and linked against that libsdl.a : crasehes. Then linked against itimer_fix's libsdl.a : no crash.

There is debug output if it will have any interst:

Quote:

[os4timer_GetTicks] ITimer NULL
[os4timer_initialize] timer = 0x6FF51050
[os4timer_initialize] ITimer = 0x6FF9D400
[os4timer_Init] Initializing timer for thread 0x6D44D1D0
[os4timer_Init] Done
[os4video_Available] Probing Picasso96API.library
[os4video_Available] Success
[os4video_CreateDevice] Creating OS4 video device
[os4video_CreateDevice] Compositing should be possible, gfx version 54
[os4video_CreateDevice] Device created
[SDL_SYS_JoystickInit] ENUM RETURNED: 0
[SDL_SYS_JoystickInit] Found 0 joysticks
[os4video_SetVideoMode] Requesting new video mode 640x480x32
[os4video_SetVideoMode] Requested flags: ANYFORMAT OPENGL RESIZEABLE
[os4video_SetVideoMode] Current mode 0x0x32
[os4video_SetVideoMode] Current mode flags
[os4video_SetVideoMode] Current hwdata 0x00000000
[os4video_SetVideoMode] Creating new display
[os4video_SetVideoMode] Deleting old display
[os4video_SetVideoMode] Calling CreateDisplay
[os4video_CreateDisplay] Creating a 640x480x32 display
[os4video_CreateDisplay] Window mode
[os4video_CreateDisplay] Screen depth:32 pixel format:6
[getBestWindowPosition] Visible screen: (0,0)/(1440x900)
[openSDLwindow] Trying to open window at (395,194) of size (640x480)
[os4video_SetVideoMode] New display created
[os4video_SetVideoMode] Obtained flags: ANYFORMAT OPENGL RESIZEABLE
[os4timer_Init] Initializing timer for thread 0x6AE4A1F0
[os4timer_Init] Done
[os4timer_Destroy] Freeing timer for thread 0x6AE4A1F0
[os4video_VideoQuit] In VideoQuit, this = 0x6C4515E0
[os4video_VideoQuit] DeleteCurrentDisplay
[os4video_DeleteCurrentDisplay] Closing window
[os4video_VideoQuit] Checking pubscreen
[os4video_FreeHWSurface] Freeing HW surface 0x674CCDF0
[os4timer_Destroy] Freeing timer for thread 0x6D44D1D0
[os4timer_quit] Called


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
Ah, some light finally: we can see that GetTicks was called by something before ITimer was initialized!

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


See User information
@Capehill
Quote:

Configure script would need checks / switches for gl4es and ogles2?


From SDL1 side, as far as i see it, only needs "includes". So, for GL4ES and for OGLES2 includes are different of couse. For GL4ES i at moment do not know how to reliazse SDK , as GL directory already holded by minigl, so probably it should be something like GL4ES. And for ogles2 its OGLES2.

We can add configure flags like :

--enable-minigl
--enable-gl4es
--enable-ogles2

So to build only files need, or all of them.

Through, as it in our hands to make releaes, then, why worry, we can just add no flags, and build everything by default :) But sure, more configure options better, just more time consuming :)

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

I'm still interested what was the game that managed to call SDL_GetTicks before timer initialization? Do you have a source code link?

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


See User information
@Capehill
It was 2 of which i try. Both have same issues.
First one: Cadog , source code here: http://www.martin.st/software/cadog/cadog-gl.src.tar.gz

Second one: LettersFall, source code here:
http://kas1e.mikendezign.com/aos4/gl4 ... ersfall-src_beta2.99a.zip

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

Right, thanks. At least LettersFall has a clear bug, it calls SDL_GetTicks() in Game constructor that it calls before SDL_Init() which is against the documentation. https://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlinit.html

Case closed.

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


See User information
@Capehill
Yeah, seems many games do so.
I also see you merge branches 1.2.15 and itimer-fix : good !
But question is: is there any flag in SDL , to avoid build "debug prinfs" ? I mean, you probably remember that issues with slow Grafx2 startup because of too much debug prinfs. So to just be able to build SDL without debug prinfs at all.

I also seeing today sdl2 source code more close (those ones about opengl), we probably can follow exactly the same theme naming.

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

There is only a preprocessor flag which is a little bit unfortunate from usage point of view. SDL1 isn't currently stable / tested enough that I would disable those. Usually there isn't debug enabled in busy places though, they are more related to resource handling.

What about adding an ENV parameter for debug? I'm not too eager to build a separate debug libraries either.

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


See User information
@Capehil
I just mean that we can have -DDEBUG options added when we internally want to build debug versions (only for us). And then, when no -DDEBUG option added, then no debug compiled in (and those will be released version).

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

We can add a makefile switch, sure.

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


See User information
@Capehill
Btw, did you aware of any issues with SDL_GetVideoInfo() + SDL_ListModes() combo when OpenGL in use ?

I just found lately in 2 games and 1 game-engine, that once those functions in use, it always give problems.

So i just cut from one of them code to reproduce it, and made a little test case from it, there is:

#include <SDL/SDL.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
            if (
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE)<0) {
                
fprintf(stderr,"%s\n",SDL_GetError());
                exit(
1);
            }

            
SDL_Rect **modes NULL;
            
modes SDL_ListModes(NULLSDL_OPENGL SDL_FULLSCREEN);
            if (
modes == (SDL_Rect**)0) {
                
printf("No fullscreen modes available!\n");
            } else if (
modes == (SDL_Rect**)-1) {
                
// all resolutions available
            
} else {
                
printf("Available fullscreen resolutions:\n");
                for (
int i 0modes[i]; i++) {
                    if (
i==|| modes[i]->w!=modes[i-1]->|| modes[i]->h!=modes[i]->h)
                        
printf("\t%dx%d\n",modes[i]->w,modes[i]->h);
                }
            }
            
SDL_Quit();
            exit(
0); 
}


On os4 it give us "No fullscreen modes available!"

On Win32 compiling the same source code example give that:

Quote:

C:\MinGW\WORK>test.exe
Available fullscreen resolutions:
1366x768
1360x768
1280x768
1024x768
800x600
640x480

C:\MinGW\WORK>


Probably it can be just only about SDL_ListModes() (as in example above, i didn't use SDL_GetVideoInfo() ).

If you have any interst in fix it, that will help a lot !

Thanks !

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

Somebody else had issues earlier: http://amigaworld.net/modules/news/ar ... toryid=7665&start=0#97124

I can investigate it some day, not familiar with the code at the moment. It uses p96 stuff so could do some refactoring, at least.

By the way, got HWSURFACEs working on window mode too. Beret is now 2x faster on Sam440 :)

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


See User information
@Capehill
Quote:

Somebody else had issues earlier: http://amigaworld.net/modules/news/ar ... toryid=7665&start=0#97124


Right ! At least its not only me :)

Quote:

I can investigate it some day, not familiar with the code at the moment. It uses p96 stuff so could do some refactoring, at least.


Thanks ! Probably my test case will be of good use for tests ?

Quote:

By the way, got HWSURFACEs working on window mode too. Beret is now 2x faster on Sam440 :)


Yeah ! Is it with compositing code or "just" working hwsurface ?

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

Also opaque blits should work (BltBitMapTags used).

Only issue is that if your WB is 32-bit and game is 16-bit, then colour conversion slows drawing.

Your test case should be enough for now...

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


See User information
@Capehill

Tested list-fix branch:

Quote:

9/0.NO NAME:> test
Available fullscreen resolutions:
1920x1200
1600x1200
1440x900
1024x768
1280x720
800x600
640x480


Thanks a bunch :)

Will test it on games now.

Through, i noticed that you use BMA_BYTESPERROW and BMA_BASEADDRESS, which was added to graphics.library in 10.8.2017, so that one probably not released and in beta currently, which mean that you probably can't release 1.2.15 till some new update of os4 will happens :)


EDIT1: tested on game which use SDL_GetVideoInfo + SDL_ListModes() for fullscreen and for window modes : works in both modes !


Edited by kas1e on 2018/3/13 19:27:40
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL1 open issues
Home away from home
Home away from home


See User information
@Capehill
Maybe its me, but can latest changes (hwsurface, and co), being somehow related to issue i have now: when i build some game with gl4es added over adtools version of SDL1, all looks correct:

Resized Image

When i build that game with that gl4es added over list-fix version of SDL, i have that:

Resized Image


Code of game not changed of course, just in link string only swap for tests on -lSDL_adtools_gl4es on -lSDL_listfix_gl4es.

What is missed on second screenshot, its whole things which on runing "fade in", so probably some alpha used, or something.

Through, need to add, that MiniGL version works. What can mean that maybe i should add something new when add gl4es in compare with previous variant ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
« 1 2 3 4 (5) 6 7 8 ... 18 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project