Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
104 user(s) are online (86 user(s) are browsing Forums)

Members: 0
Guests: 104

more...

Support us!

Headlines

 
  Register To Post  

(1) 2 3 4 ... 18 »
SDL1 open issues
Just can't stay away
Just can't stay away


See User information
Here https://github.com/adtools/os4sdl/issues

Are these issues still relevant? Some links seem unfortunately non-working so it might be difficult to check each one..

Go to top
Re: SDL1 open issues
Quite a regular
Quite a regular


See User information
i read about those issues; don't know if are relevant for some games

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


See User information
@AmigaBlitter

Gotta try SGrab test at least..

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


See User information
@Capehill

I opened issues #16 and #17 that are still valid. Clarification (documentation) is required about the build (options, native build or using cross-compilation, used config file, ...).

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


See User information
Continuing from:

http://www.amigans.net/modules/xforum ... id=108972#forumpost108972

@kas1e

My fork was based on this version: https://github.com/adtools/os4sdl

Also Marlon has started to collect various Amiga ports here: https://github.com/amigaports/

I don't know if anybody has done any OS4 work on SDL1 during the last 2 years.

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


See User information
@Capehill

Commented on my bugs:

#4 - (SGrab snapshot) - Fixed (at least i can't trigger it anymore)
#10 - (Alt hotkey) - Still there (duplicated bug item in SDL2 tracker)
#15 - (8pp screens on 32Bit WB) - Still there

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


See User information
@Capehill
Quote:

My fork was based on this version: https://github.com/adtools/os4sdl


Then its latest one. I see that before your commits there was last one from me, and if i remember right since then no one add anything, so your one is the latest with all latest commits, that good :)

Btw, composition code autodetects somehow, and when it available uses, and when not not uses, or, i need to specify something like SDL_OS4_COMPOSITE on init stage ?

Quote:

Also Marlon has started to collect various Amiga ports here:
https://github.com/amigaports/


As i see there is only initall 68k port commit, so currently no use for us.

Btw, to add to Raziels's post, maybe (if you will have any time for), you can add that os4 iconify functionality about which i wrote in #9 ? Such functionality will be good to have and for SDL1 and for SDL2.

Idea is just to have some sdl flag which we can call like SDL_AOS4_ICONIFY or whatever, and activate it with SDL_INIT() , which, when SDL app in the window mode, will attach iconify button, and when user will press on it call SDL_WM_Iconify function which will do all dirty work for us.

Currently all sdl based window apps can't be iconified, so if we can have it for sdl1 and for sdl2 that can be good. I am ready for any tests in any time, if you in interest in and have time for :)

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
+1 for iconification support in both SDL1 and SDL2

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


See User information
@kas1e

Oh, i like that iconification idea...ad me to that

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


See User information
@kas1e

Hmm.. Seems that I forgot to reply. Compositing fork checks graphics.library 53. Then it knows it can use CompositeTags.

http://www.amigans.net/modules/xforum ... id=100287#forumpost100287

First problem with SDL1 is that for unknown reason it only allows HWSURFACEs in fullscreen mode. Should be fixed.

Next problem is that many games and emulators don't really "blit". They "plot" pixels. At worst CPU is writing VRAM one pixel at time and then people say, "it's slow".

Third problem is that almost all SDL games are statically linked - so much for quick tests & profits. But I believe I have now ranted enough about this.

Once again, if your app is not blitting HWSURFACEs, then don't expect any speedups.

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


See User information
@Capehill
Is it worth to post BZs about SDL1 issues ? We may found issue with a bit distored mouse pointer in the grafx2. I.e. cursor fine till main area of programm not under amiga cursor, but once we move it over, then shiny cursor a bit distored. Like, maybe not full area clears, or something.

If you in interest , i can provide more info about , etc

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
Will continue here to not deral other topics if you doesnt mind:

Quote:

Yeah, please open a ticket so that thing don't get forgotten. I know that there is no active work on SDL1 but who knows...


Once i was about to create a ticket about grafx2 issue with distorted cursor, with images from win32 and os4, to show how good it looks on win32, and how distored on os4, i realize interesting stuff, which may have give an idea to where to look maybe:

if i run grafx2 on os4, see distored cursor , then press prnscr button on which i attach making a screenshot via sgrab, and check resulted screenshot, then, on screenshow cursor looks just fine ! Like this:

Taken by screengrab:

Resized Image
(press open in new tab for full size)

But in reality, it looks like this:

Resized Image
(press open in new tab for full size)

Dunno, i remember such kind of problems like visually you see one thing, but on screenhot different, when PIP or compoiting was involved. I tryied to disable compositing: all same.. Its like didn't hide fully original amiga cursor, and it overwrite programm's cursor.


Edited by kas1e on 2018/1/13 11:03:59
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 checked grafx2 source here: http://pulkomandy.tk/projects/GrafX2/ ... tlab/src/sdlscreen.c#L101

Cursor width is defined against SDL specs I would say. Instead of 1, it should be 8 (bits). https://www.libsdl.org/release/SDL-1.2 ... html/sdlcreatecursor.html

Maybe it doesn't solve the issue but worth checking.

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


See User information
@Capehill
Swap 1,1 on 8,8, and it kind of make it better, but still have distortion inside. Less that before, but still it here (and only when we make app active, once we move our cursor away, we can see how cursor placed to the bounds of window in the app, start to be non-distored and good looking, its only when amiga cursor over the program's window its distored).

Tested win32 version btw, there is no such distortion with the same code..

ps. Thanks for taking time on issue :)

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
Made some more experiments, and found that they specially did that 1 pixel transparent cursor. As they write before in comment, that is trick "Showingthe SDL 1 pixel transparent cursor allows us to get absolute mouse coordinates, this means we can use tablet in fullscreen mode."

Then, their code looks like:

SDL_FreeCursor(cur);
 
cur SDL_CreateCursor(&cursorData, &cursorData1,1,0,0);

 if (
cur != NULL)
  {
    
SDL_SetCursor(cur);
    
SDL_ShowCursor(SDL_ENABLE); // show the SDL 1 pixel transparent cursor
  
}
  else
  {
     
failed to create the 1 pixel transparent cursor
    SDL_ShowCursor
(SDL_DISABLE); // Hide the SDL mouse cursor, we use our own internal one
  
}
}


Once i comment out part with SDL_SetCursor(cur); and SDL_ShowCursor(SDL_ENABLE); , and keep SDL_ShowCursor(SDL_DISABLE); (so to hide sdl mouse cursor , and user internal one), then all start to works as should, no distortion, all is fine.

What mean, imho, that something can be wrong with our SDL_SetCursor() and or SDL_ShowCursor() when it come to 1 pixel transpent 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
@kas1e

Please don't change height parameter. Code passes only one byte (8 bits of course) as cursor data. That's why 8 * 1 should be the correct dimension in this case, in my opinion.

There could be more issues in the backend side but I didn't check it yet. It should be easy to make a test case that opens only a window and sets cursor, to simplify testing.

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


See User information
@Capehill
Yep, trying only width as well, same.

Anyway, done simple test case with main code as in grafx, and while test case can be wrong , it show kind of same distortion as we have in the grafx.

I.e. it didn't show "the SDL 1 pixel transparent cursor" as intendent by code, but instead some garbled stuff of 16x16 area or so. On win32 that code works correctly,

#include <SDL/SDL.h>

int mousexmousey;
static 
SDL_Cursorcur NULL;
static 
uint8_t cursorData 0;


SDL_Surfaceinit_sdl(int widthint height)
{
    
SDL_Init(SDL_INIT_VIDEO);
    return 
SDL_SetVideoMode(widthheight0SDL_HWSURFACE SDL_DOUBLEBUF);
}

void exit_sdl(SDL_Surfacesurface)
{
    
SDL_FreeSurface(surface);
    
SDL_Quit();
}

// Chopped down even function
int events()
{
    
SDL_Event event;
    while(
SDL_PollEvent(&event))
    {
        switch(
event.type)
        {
            case 
SDL_MOUSEMOTION:
                
mousex event.motion.x;

                
mousey event.motion.y;
            break;


            case 
SDL_QUIT: return 0;
        }
    }
    return 
1;
}


int main()
{

    
SDL_Surface *surf init_sdl(640480);
    
SDL_FreeCursor(cur); 
    
cur SDL_CreateCursor(&cursorData, &cursorData1,1,0,0);

    while(
events())
    {
        if (
cur != NULL
        { 
            
SDL_SetCursor(cur); 
            
SDL_ShowCursor(SDL_ENABLE); // show the SDL 1 pixel transparent cursor 
        

        else 
        { 
            
//failed to create the 1 pixel transparent cursor 
            
SDL_ShowCursor(SDL_DISABLE); // Hide the SDL mouse cursor, we use our own internal one 
        

    }

    
exit_sdl(surf);
}


Compile as: pc-amigaos-gcc test.c -o test -lSDL -lpthread


Edited by kas1e on 2018/1/14 9:22:26
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

Seems that backend allocates too little memory for the sprite. According to this http://wiki.amigaos.net/wiki/Intuition_Pointer , there should be 32-bit dummy data before and after actual graphics. But code allocates only "before" part (4 extra bytes):

https://github.com/adtools/os4sdl/blob ... amigaos4/SDL_os4wm.c#L155

It could be fixed like this (didn't have chance to test yet):

cursor->Image = IExec->AllocVecTags(4 * (h + 2), AVT_ClearWithValue, 0, AVT_Type, MEMF_SHARED, TAG_DONE );

By the way, do we still have to allocate from CHIP memory or?

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


See User information
@Capehill
Quote:

It could be fixed like this (didn't have chance to test yet):

cursor->Image = IExec->AllocVecTags(4 * (h + 2), AVT_ClearWithValue, 0, AVT_Type, MEMF_SHARED, TAG_DONE );


Nope, didn't help sadly. Distortion change it looks, but still garbage here. Retested for sake of be sure again on win32 , and build it on mingw32 for now, there is no cursor (1pixel-transparent as intendent) and no garbage. So probably its indeed our sdl.

Quote:

By the way, do we still have to allocate from CHIP memory or?

Dunno, but as os4 works on classics too, maybe it relevant (?)

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
I made another test case, in which i just set CursorData to 0xaa (1010 1010 , so 4 dots), and mask to 0. So, it should just draw 4 dots over cursor. On win32 it is, but on aos4 it's draw garbage. There is:

#include <SDL/SDL.h> 

int mousexmousey

SDL_Surfaceinit_sdl(int widthint height

    
SDL_Init(SDL_INIT_VIDEO); 
    return 
SDL_SetVideoMode(widthheight0SDL_HWSURFACE SDL_DOUBLEBUF); 


void exit_sdl(SDL_Surfacesurface

    
SDL_FreeSurface(surface); 
    
SDL_Quit(); 


// Chopped down even function 
int events() 

    
SDL_Event event
    while(
SDL_PollEvent(&event)) 
    { 
        switch(
event.type
        { 
            case 
SDL_MOUSEMOTION
                
mousex event.motion.x

                
mousey event.motion.y
            break; 


            case 
SDL_QUIT: return 0
        } 
    } 
    return 
1





int main() 


    static 
SDL_Cursorcur NULL
     
    static 
uint8_t cursorData 0xaa// 4 dots. 
    
static uint8_t cursorMask 0// for transparent cursor 

    
SDL_Surface *surf init_sdl(640480); 
    
SDL_FreeCursor(cur);  
    
cur SDL_CreateCursor(&cursorData, &cursorMask1,1,0,0); 

    while(
events()) 
    { 
        if (
cur != NULL)  
        {  
            
SDL_SetCursor(cur);  
            
SDL_ShowCursor(SDL_ENABLE); // show the SDL 1 pixel transparent cursor  
        
}  
        else  
        {  
            
//failed to create the 1 pixel transparent cursor  
            
SDL_ShowCursor(SDL_DISABLE); // Hide the SDL mouse cursor, we use our own internal one  
        
}  
    } 

    
exit_sdl(surf); 
}


Same as before : ppc-amigaos-gcc test.c -o test -lSDL -lpthread


Edited by kas1e on 2018/1/14 19:52:30
Edited by kas1e on 2018/1/14 19:54:21
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
(1) 2 3 4 ... 18 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project