Author Topic: perfect vsync on lcd  (Read 6868 times)

hitchhikr (OP)

  • Posts: 69
perfect vsync on lcd
« on: April 30, 2010, 07:48:56 pm »
Here is an attempt to obtain smoother animation on the LCD screen by using the standard LCD controller, the examples should work with the TV out too, included is a version for the ILI9325 but as i can't test it i don't know if it works properly.

When displayed on the LCD, the pixels are padded to 32 bit wide (but still 16 bit data) and rotated also there's a non-interlaced mode possible which splits even and odd pixels into 2 pages (first one at 0, second at 320). Hardware double buffering may be possible but probably only by using a lower resolution like 160x240 or something (there's only a software one).

http://pagesperso-orange.fr/franck.charlet/vsync_dingoo.zip

EDIT: Somebody knows how to retrieve the LCD type from the OS ? (Since it looks like the LCD registers can't be read the ID can't be obtained be reading register 0).
« Last Edit: May 02, 2010, 02:14:17 pm by hitchhikr »

hitchhikr (OP)

  • Posts: 69
Re: perfect vsync on lcd
« Reply #1 on: May 01, 2010, 11:18:41 am »
Fixed the diagonals so the sync should now be perfect.
« Last Edit: May 01, 2010, 11:24:35 am by hitchhikr »

santino

  • Guest
Re: perfect vsync on lcd
« Reply #2 on: May 01, 2010, 11:27:20 am »
Its stuttering 2 to 3 times a go. Im on 9331.
And after killing your app with select + start, screen is flickering and dingoo doesnt respond to keys anymore...

Hellsing1

  • Guest
Re: perfect vsync on lcd
« Reply #3 on: May 01, 2010, 11:27:51 am »
Tried on the 9325 and it crashes the machine.

I get a vertical coloured bar scrolling from right to left then when you hit start it crashes.
« Last Edit: May 01, 2010, 11:37:17 am by Hellsing1 »

hitchhikr (OP)

  • Posts: 69
Re: perfect vsync on lcd
« Reply #4 on: May 01, 2010, 11:50:46 am »
Uploaded a newer one which may fix the problem but it's hard to tell because it's working perfectly here, what would be interesting is to test both .app files and report the differences between the two depending on your dingoo's screen.
« Last Edit: May 01, 2010, 11:52:22 am by hitchhikr »

santino

  • Guest
Re: perfect vsync on lcd
« Reply #5 on: May 01, 2010, 12:50:46 pm »
Both ones work. But I have 9331 lcdmodule and the 9331 stutters a bit now just 1 time a go, on exit Dingoo hangs, display flickers. Second one wokrs also stutters continiously on exit display flickers, dingoo runs normal and then hangs after some seconds.

hitchhikr (OP)

  • Posts: 69
Re: perfect vsync on lcd
« Reply #6 on: May 01, 2010, 01:09:35 pm »
Maybe it's a firmware issue ? I'm using v1.2.
What about the TV out ?

santino

  • Guest
Re: perfect vsync on lcd
« Reply #7 on: May 01, 2010, 01:15:55 pm »
Using V1.2 pof.
With TVout they both work better, no flickering after and no crash. But they need to run 1-2 times over screen before they run smoothly.
« Last Edit: May 01, 2010, 01:34:01 pm by santino »

Hellsing1

  • Guest
Re: perfect vsync on lcd
« Reply #8 on: May 01, 2010, 01:16:33 pm »
Using firmware 1.2 - 9325

Get vertical bar but crashes when try to enter a folder.

hitchhikr (OP)

  • Posts: 69
Re: perfect vsync on lcd
« Reply #9 on: May 01, 2010, 01:45:40 pm »
Uploaded yet another one.

I don't think i can do better about the small tearing appearing sometimes as the DMA transfer seems to overlap with the video ram during it's refresh.
It doesn't flicker or crash here when exiting so i don't know what's going on, the source is included anyway so if anyone knows how to fix that be my guest.

AFAIK, the LCD registers can't be read so the restored values are just a guess.

EDIT: i just noticed that it freezes at exit if USB isn't plugged, dunno why.

EDIT 2: Should be fixed now.
« Last Edit: May 01, 2010, 02:29:11 pm by hitchhikr »

Hellsing1

  • Guest
Re: perfect vsync on lcd
« Reply #10 on: May 01, 2010, 03:31:53 pm »
9325 LCD...

You have stopped the crashing but it is slowing the system down (as well as the emus).

hi-ban

  • Posts: 886
Re: perfect vsync on lcd
« Reply #11 on: May 01, 2010, 07:09:23 pm »
well... vsync always slows things down...

hitchhikr (OP)

  • Posts: 69
Re: perfect vsync on lcd
« Reply #12 on: May 01, 2010, 07:50:26 pm »
Hellsing1: i think it was because i forgot to save/restore the pixel clock registers, i uploaded a newer one which may fix the problem, so the bar smooth with vsync_9325.app and stuttering with vsync_9331.app on your console, right ?

Hellsing1

  • Guest
Re: perfect vsync on lcd
« Reply #13 on: May 01, 2010, 09:27:28 pm »
Seems to working fine now.

hitchhikr (OP)

  • Posts: 69
Re: perfect vsync on lcd
« Reply #14 on: May 01, 2010, 10:25:44 pm »
Fixed an alignment problem that could happen sometimes with the lcd_desc structure.

i still would like to know if vsync_9325.app is running smooth on an ILI9325 screen (and vsync_9331.app should be stuttering on such screen).

hitchhikr (OP)

  • Posts: 69
Re: perfect vsync on lcd
« Reply #15 on: May 02, 2010, 02:17:01 pm »
Uploaded the first official release.

- Only one file now as it should be able to recognize the LCD type used by the console it's running on.
- LCD frequency now fixed at 51hz (which is close to PAL and shared between the 9331 & 9325).

Hopefully it'll run correctly on ILI9325 screens based consoles.

Hellsing1

  • Guest
Re: perfect vsync on lcd
« Reply #16 on: May 02, 2010, 03:50:43 pm »
Seems to be working fine on my 9325 Dingoo.

santino

  • Guest
Re: perfect vsync on lcd
« Reply #17 on: May 02, 2010, 05:12:41 pm »
Works on 9331, too. ;)

 

Post a new topic