GLBasic forum

Main forum => GLBasic - en => Topic started by: Ian Price on 2009-Nov-15

Title: Wiz - screen tearing
Post by: Ian Price on 2009-Nov-15
What's the best way to reduce/erradicate screen tearing on the Wiz? Many of the Wiz emulators have now eliminated it or reduced the problem significantly . What can we do in GLBasic to ease the problem?
Title: Re: Wiz - screen tearing
Post by: fjsantosb on 2009-Nov-15
Good point here.

Would be great to find something to solve / avoid this problem.

King Regards, fjsantos.
Title: Re: Wiz - screen tearing
Post by: kaotiklabs on 2009-Nov-15

Nowadays everybody is using the Pollux DPC Set app, from Notaz for tweaking the RAM timings.
It nearly reduces all the tearing. Maybe could be included on glbasic.

http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,8,154 (http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,8,154)

I hope a new firmware update will fix this, but GPH seems lately to be on holydays...
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Nov-17
Did anyone try these timings from notaz?
http://www.gp32x.com/board/index.php?showtopic=48038&pid=739137&mode=threaded&show=&st=#entry739137 (http://www.gp32x.com/board/index.php?showtopic=48038&pid=739137&mode=threaded&show=&st=#entry739137)

I'm curious how this might work out.
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Nov-17
Surely that's something that needs to be implemented from within GLB?

Would it not be possible to render 240x320 then rotate to 320x240 like has been suggested elsewhere on the GP32X forums? Would it really make a difference (other than in speed). Is this what you do with the iPhone/iPod Touch?

Realisticly is this something that can be/is worth getting sorted? Especially with the Pandora just around the corner, you're going to be busy getting GLB ready for that ;)
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Nov-17
The 240x320 solution is a great speed bottleneck. I did that once. If the above works I'll implement it, sure.
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-07
OK, I implemented the 240x320 screen rotation, and it's totally reducing the tearing now.
Please tell me if your games run too slow now. I'll try to provide you soe code to overclock the thing to say 600 MHz, which should pretty much fix the delay then. (Update online... in a few minutes)
Title: Re: Wiz - screen tearing
Post by: erico on 2009-Dec-07
yep I heard pandora support? pandora looks like a neat plataform... would be nice.
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-07
Cheers Gernot - I'll test it out tomorrow :)
Title: Re: Wiz - screen tearing
Post by: MrTAToad on 2009-Dec-08
Reports are that its now sorted :)
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-08
Had a chance to test this now and it does remove screen tearing, but it also slows down the Wiz game by nearly 50% (I was getting a steady 60FPS in one app. - it's now down to 33FPS).

If you can't get the speed up significantly, I think I'd rather have the tearing :(

Sorry to be a pain.
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-09
No problem. I think I have 2 methods to improve that. First, I try to use single buffering now (because I wait for vblank anyway) and 2nd is to overclock to 600 MHz. Might be worth a try.
I know the tearing issue was a pain and that's why I decided to go the tearing rather than the slow route. I hope I can improve it to get stable 60 FPS, though.
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-12
I made an update. It's quite fast now and no tearing. What do you think?
Title: Re: Wiz - screen tearing
Post by: trucidare on 2009-Dec-12
there is an update that kills screen tearing. check gp2x.de
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-12
I can't seen any difference here tbh Gernot :(

The screen tearing is gone, but my game still runs at around 33FPS.

Not only that, but when you exit the game, the GPH menu is rotated (with a row of pixel crap at the bottom) and the Wiz is unusable. :(

[EDIT] Honestly Gernot, it's not really worth you wasting your time on this issue. The Wiz was fecked from day one by GPH. Trying to sort out their mess is more hassle than it's worth. Just revert back to the tearing - it's not that bad so as to make a game unplayable. At the current speeds (approx. 50%), I can't even say that. Reading the advice on GP32x there really isn't anything that can be done quickly or easily. Maybe Trucidare's post might help, but if the likes of Exophase etc. can't solve the speed issue, then there likely isn't a readily available and/or quick solution.

Here's a WIP screenie of the game I'm running on Wiz

(http://www.iprice.remakes.org/my_stuff/santamania.PNG)

Nothing too complex. Even with lots of snow it ran at 60FPS.
Title: Re: Wiz - screen tearing
Post by: fjsantosb on 2009-Dec-12
Your game looks really great!
True old school graphics!

King Regards, fjsantos.
Title: Re: Wiz - screen tearing
Post by: Hatonastick on 2009-Dec-12
Quote from: Ian Price on 2009-Dec-12
Here's a WIP screenie of the game I'm running on Wiz

(http://www.iprice.remakes.org/my_stuff/santamania.PNG)

Nothing too complex. Even with lots of snow it ran at 60FPS.
Mate, I always love your work. :)

So, where's the iPod version?  =D
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-13
Excellent grphics. I'll add an inline command so you can switch to what you need. I default to the quicker one then.
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-13
Thanks fjsantos, hatonastick and Gernot :)
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-15
OK, I flipped the loop and now it's faster. I get 200 FPS when I'm in tearing mode, and 151 FPS when I'm in the smooth mode. (Just drawing the FPS, nothing more)
I've implemented a method to toggle for you. I'm just waiting until I can wait for vblank to make it even smoother. Who needs > 60 FPS.
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-15
Sounds good to me :)
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-15
I made a quick update w/o the vblank. You can try and see if it fits you.
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-15
At work at the mo, but will try later.

Fingers crossed :D
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-15
Sorry for the double post, but this deserves to be more than an edit to the post above.

This seems to be working pretty well now gernot :)

I'm getting 55FPS with no tearing, although I could probably optimise to get a full 60FPS :D

There is a slightly odd "jumping" to the scrolling, but it's more acceptable than the tearing. Maybe that "vblank" as you call it might help with this.

Good job gernot :)
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-20
Gernot - does this help you at all? - http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,23,271
Title: Re: Wiz - screen tearing
Post by: Hatonastick on 2009-Dec-21
He may know about it if the 'KungPhoo' mentioned is Gernot's KungPhoo. :)

Edit:  Sorry, I sound like I'm being a smarta**.  I didn't mean it like that.
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-21
oh. Did I improve SDL now? :D
Title: Re: Wiz - screen tearing
Post by: Hatonastick on 2009-Dec-21
So that's another Kungphoo is it? :)  I could have sworn that used to be your ID on Retro Remakes, which is why I thought it was you.  Of course there's a few billion other people in the world so chances that a forum ID might be used by more than one person is probably fairly high.   :S
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-21
Nope, same KungPhoo. He's laughing at the credit I presume. 
Title: Re: Wiz - screen tearing
Post by: Hatonastick on 2009-Dec-22
Ah ok, sorry I must have left my sense of humour in my other body.  Totally went over my head.

Actually I'm not sure why I commented in the first place.  It's not like I've added anything to the conversation.  Sorry about the attempted thread-jack mate.
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-24
Just to let you know Gernot that my SantaMania game is being hit hard on the Wiz - it's playable, but not enjoyable. It runs perfectly on GP2X.
Title: Re: Wiz - screen tearing
Post by: Kitty Hello on 2009-Dec-30
it's slower than on the GP2X? Now that's very strange.
Did you try the hack to set the screen to 320x240 mode (with tearing)?
Title: Re: Wiz - screen tearing
Post by: Ian Price on 2009-Dec-30
The hack made absolutely no noticeable difference :( Unless I'm doing something wrong (which IS very possible).

There really is a significant difference between performance on my F200 and Wiz. So much so that I'm not prepared to release the Wiz version as it is.