SDL : experiencing a hang-up with checkkeys example

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

SDL : experiencing a hang-up with checkkeys example

Post by cosmito »

I compiled SDL with HAVE_INPUT_DEVICES=1 setting in the makefile to enable keyboard support.

When I execute the checkkeys example, it hangs.
For debugging, I put a "printf("#");" just before the SDL_WaitEvent(&event) call and I get two # characters before hanging...

Could someone test it, please?

My USB keyboard works well with the PS2 since I already used with it PS2IRC, uLaunchELF4.12 and RadShell.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Re: SDL : experiencing a hang-up with checkkeys example

Post by J.F. »

ptek wrote:I compiled SDL with HAVE_INPUT_DEVICES=1 setting in the makefile to enable keyboard support.

When I execute the checkkeys example, it hangs.
For debugging, I put a "printf("#");" just before the SDL_WaitEvent(&event) call and I get two # characters before hanging...

Could someone test it, please?

My USB keyboard works well with the PS2 since I already used with it PS2IRC, uLaunchELF4.12 and RadShell.
If you want someone to test this, you really should post some code. :)
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Re: SDL : experiencing a hang-up with checkkeys example

Post by cosmito »

J.F. wrote:If you want someone to test this, you really should post some code. :)
It's just the sdl supplied example checkkeys.c. It's located at the sdl's test folder.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Re: SDL : experiencing a hang-up with checkkeys example

Post by J.F. »

ptek wrote:
J.F. wrote:If you want someone to test this, you really should post some code. :)
It's just the sdl supplied example checkkeys.c. It's located at the sdl's test folder.
Oh, okay. I'll try to compile that and see how it works for me.
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

So JF, any luck? :)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

ptek wrote:So JF, any luck? :)
Thanks for reminding me... I almost forgot about this. :)

Okay... it dunna work... at all. When I run it from ps2client, it simply gives me a blank screen on the ps2, and nothing in the ps2client window in the way of prints. Ps2client resets the ps2 fine, so it isn't crashed, I just can't see any response from the test.

The ps2 does switch from the ps2link screen to some blank screen when you run checkkeys, so maybe there's an issue with gsKit. Any "quirks" in gsKit I need to know about when I build it?
diegox758
Posts: 13
Joined: Sun Mar 30, 2008 12:07 pm
Location: Brasil, Sao Paulo

Post by diegox758 »

Here my test, nope my UlaunchELF function and my modchip(who has the function to boot from mc0:/boot/boot.elf) doesn't function too, this is really disappointing new for the ps2 homebrewing
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

J.F. wrote:The ps2 does switch from the ps2link screen to some blank screen when you run checkkeys, so maybe there's an issue with gsKit.
Yes, same here. The black screen is a normal behaviour and the result of the SDL_Init(SDL_INIT_VIDEO).
J.F. wrote:Any "quirks" in gsKit I need to know about when I build it?
No, as far I know. If any other ELF that uses SDL you have compiled works fine visually and the gsKit examples as well, your build of gsKit and SDL must be ok.

You can also try this and report if the same happens to you :
ptek wrote:When I execute the checkkeys example, it hangs.
For debugging, I put a "printf("#");" just before the SDL_WaitEvent(&event) call and I get two # characters before hanging...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I don't get ANY of the printf's in the checkkeys example. I added extra printf's and I get nothing. The video does change which is after some printf's, so there's something wrong with printf on my toolchain. Any suggestion on that?

EDIT: Uh, under ps2link, where are the irx's loaded from? What irx's are needed for this test? I've gotten the dreamgl examples to work, and the ito test for the textures, so I know ps2link is working, and my toolchain compiles dreamgl and libito fine, so it's not totally farg'd.
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

J.F. wrote:I don't get ANY of the printf's in the checkkeys example. I added extra printf's and I get nothing. The video does change which is after some printf's, so there's something wrong with printf on my toolchain. Any suggestion on that?
Weird. Have you tried a simple hello world alike example, which only do printf?
J.F. wrote:EDIT: Uh, under ps2link, where are the irx's loaded from? What irx's are needed for this test? I've gotten the dreamgl examples to work, and the ito test for the textures, so I know ps2link is working, and my toolchain compiles dreamgl and libito fine, so it's not totally farg'd.
If I recall correctly, the ps2link I'm using have the irx embedded in the ELF. It's version 1.46 and a single ELF. How about yours ?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

ptek wrote:
J.F. wrote:I don't get ANY of the printf's in the checkkeys example. I added extra printf's and I get nothing. The video does change which is after some printf's, so there's something wrong with printf on my toolchain. Any suggestion on that?
Weird. Have you tried a simple hello world alike example, which only do printf?
J.F. wrote:EDIT: Uh, under ps2link, where are the irx's loaded from? What irx's are needed for this test? I've gotten the dreamgl examples to work, and the ito test for the textures, so I know ps2link is working, and my toolchain compiles dreamgl and libito fine, so it's not totally farg'd.
If I recall correctly, the ps2link I'm using have the irx embedded in the ELF. It's version 1.46 and a single ELF. How about yours ?
Even the testver from the SDL tests does nothing, but as I said above, the dreamgl and libito tests work fine. I can't get SDL to do anything as far as visible output goes. Weird.

I'm using ps2link v1.46 - it's a single elf file. I can't remember ever having this trouble before, but this is a new setup on Ubuntu where I used to use Fedora. I'm worried I might have missed something somewhere. In the process of recompiling all the misc junk, I ran into a few things that I posted in other threads, like my corrections to the libito tool for 64 bit OSes.

I think the primary issue is that there aren't any PS2 specific SDL samples. Makes it kinda hard to test if SDL is working or not. :)
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

J.F. wrote:I think the primary issue is that there aren't any PS2 specific SDL samples. Makes it kinda hard to test if SDL is working or not. :)
Why don't you compile the lsdldoom I'm mantaining ? ;)
Gte the source from http://svn2.assembla.com/svn/pedroduart ... dldoom_PS2
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

ptek wrote:
J.F. wrote:I think the primary issue is that there aren't any PS2 specific SDL samples. Makes it kinda hard to test if SDL is working or not. :)
Why don't you compile the lsdldoom I'm mantaining ? ;)
Gte the source from http://svn2.assembla.com/svn/pedroduart ... dldoom_PS2
Um... what's supposed to be in the romdisk directory? I put the shareware wad file. I get a 5.7MB elf file that does nothing at all. Just sits at the ps2link screen saying it's running host:DOOM.ELF.

EDIT: I think I might be having trouble compiling IOP stuff. All the EE stuff I compile works, but some of the IOP stuff I compile doesn't. I tried recompiling the latest ps2link, for example, and it just hangs.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Okay, there's definitely something whacked with the toolchain or gsKit - none of the gsKit examples work. Funny enough, all the libito and dreamgl examples work. Thinking it was perhaps a 4.x gcc issue, I deleted the whole toolchain and recompiled using gcc 3.4 (which used to be mandatory) - same problem. Given that SDL uses gskit, I don't think anything I do with gskit will work until I figure out why gskit isn't working. Has someone been making changes on gskit recently?
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

J.F. wrote:Um... what's supposed to be in the romdisk directory? I put the shareware wad file. I get a 5.7MB elf file that does nothing at all. Just sits at the ps2link screen saying it's running host:DOOM.ELF.
There you put the shareware wad and the boomlump.wad you can found on data directory, so even if your toolchain was ok it wouldn't work without this file. I must put a read-me along with the source files describing this ...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Ah! No wonder my file was not quite as big... I didn't have the boom wad file in the dir.
Post Reply