Author Topic: GCW-Zero IPU screen scaling implementation  (Read 20974 times)

Gab1975

  • Posts: 1165
Re: GCW-Zero IPU screen scaling implementation
« Reply #60 on: December 30, 2014, 01:22:24 pm »
Tomorrow it will be released!

Thanks... a very good news! ;) Tomorrow will be an excellent new year's eve! ;)

hi-ban

  • Posts: 886
Re: GCW-Zero IPU screen scaling implementation
« Reply #61 on: December 30, 2014, 08:23:08 pm »
slaanesh, i suppose you are aware of the guidelines for getting an app hosted in the repo.

I saw your last MAME release for the Dingoo, and i noticed it was bundled with preview images of all games.
For the GCW, i'd recommend to make it optional to add previews into the home directory folder ($HOME/.mame4all/previews/ or whatever the mame4all directory is) and then have the previews as a separate download.

That way, the opk file will be much smaller and there wont be any problems with copyrighted stuff.

surfi80

  • Posts: 252
Re: GCW-Zero IPU screen scaling implementation
« Reply #62 on: December 30, 2014, 10:05:03 pm »
Comrade is right, I already have the images ready
play with the best? die like the rest!

http://www.elotrolado.net/wiki/PS_VITA_Usuarios_EoL

slaanesh (OP)

  • Posts: 557
    • Slaanesh Dev
Re: GCW-Zero IPU screen scaling implementation
« Reply #63 on: January 12, 2015, 04:47:46 am »
Okay it's released.

Any chance of a kernel update to fix the screen-scaling issues?

slaanesh (OP)

  • Posts: 557
    • Slaanesh Dev
Re: GCW-Zero IPU screen scaling implementation
« Reply #64 on: January 15, 2015, 11:50:38 pm »
Also... I'm not sure how the scaling is implemented BUT would a "viewport" mode be doable?

ie.

* Define an arbitrary resolution (like already supported) surface but with options to be larger than the current max (640x480), say up to HD (this will need to happen for HDMI out anyway).
* Define a viewport (or window) on surface: an (X,Y) co-ordinate and width/height or maybe a rectangular box.
* Only the viewport is displayed, the "borders" are clipped.

Like the accelerated version of the Open Pandora's SDL. See the SDL_OMAP_BORDER_CUT mode:
http://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=sdl_omap.git;a=blob;f=README.OMAP;hb=HEAD

 
Also, I think the way that the scaling options using env variables makes sense. Perhaps the GCW-Zero implementation should be the same instead of using system files to determine functionality.

Anyway it's just a suggestion and understand totally if it's not going to change at all :)
« Last Edit: January 16, 2015, 02:33:00 am by slaanesh »

pcercuei

  • Posts: 1667
    • My devblog
Re: GCW-Zero IPU screen scaling implementation
« Reply #65 on: January 16, 2015, 08:54:11 am »
In theory it would be possible; you could request a large framebuffer from the video driver and only use a portion of it.
But SDL is clearly not designed for that so you would need to change the API.

What "system files" are you talking about?

slaanesh (OP)

  • Posts: 557
    • Slaanesh Dev
Re: GCW-Zero IPU screen scaling implementation
« Reply #66 on: January 16, 2015, 08:57:25 am »
In theory it would be possible; you could request a large framebuffer from the video driver and only use a portion of it.
But SDL is clearly not designed for that so you would need to change the API.

What "system files" are you talking about?

Like "/sys/devices/platform/jz-lcd.0/allow_downscaling" to activate re-scaling.

Have a look at the link above to see how the Pandora's SDL enhancements have been implemented. It's a fairly tidy way of doing it.

The viewport mode for the Pandora is done by setting SDL_OMAP_BORDER_CUT.

pcercuei

  • Posts: 1667
    • My devblog
Re: GCW-Zero IPU screen scaling implementation
« Reply #67 on: January 16, 2015, 09:01:47 am »
Well you're not supposed to touch those files directly. Instead, use X-OD-NeedsDownscaling=true in your OPK's metadata.

slaanesh (OP)

  • Posts: 557
    • Slaanesh Dev
Re: GCW-Zero IPU screen scaling implementation
« Reply #68 on: January 16, 2015, 09:04:49 am »
Well you're not supposed to touch those files directly. Instead, use X-OD-NeedsDownscaling=true in your OPK's metadata.
I'm touching them in my apps :)

I don't understand why the OPK is supposed to activate these through their metadata?
Shouldn't they be user controlled options via user programs? ie like env variables?

Reason being is that during development I don't use the OPKs at all, I'm ssh running a shell to test.

pcercuei

  • Posts: 1667
    • My devblog
Re: GCW-Zero IPU screen scaling implementation
« Reply #69 on: January 16, 2015, 11:34:39 am »
There is no point for an application to write the "/sys/devices/platform/jz-lcd.0/allow_downscaling" file. Either your program needs downscaling, or it does not; and this is not something that changes at runtime.

This is different for "/sys/devices/platform/jz-lcd.0/keep_aspect_ratio". It is possible to toggle between fullscreen and apect ratio using the combo Power+A, but some applications might want to have a menu option for that. Then it's fine to read/write the file, as long as you handle errors and don't crash/segfault if the file doesn't exist.

This cannot be done using environment variables, because then it would be specific to SDL1 applications, and you would have to re-set the video mode for the setting to be applied.

pcercuei

  • Posts: 1667
    • My devblog
Re: GCW-Zero IPU screen scaling implementation
« Reply #70 on: January 16, 2015, 10:22:49 pm »
Ok, IPU bug squashed (I think).

slaanesh (OP)

  • Posts: 557
    • Slaanesh Dev
Re: GCW-Zero IPU screen scaling implementation
« Reply #71 on: January 16, 2015, 10:23:45 pm »
Ok, IPU bug squashed (I think).
Is it a library update or a new kernel?

pcercuei

  • Posts: 1667
    • My devblog
Re: GCW-Zero IPU screen scaling implementation
« Reply #72 on: January 16, 2015, 10:36:38 pm »
New kernel.

slaanesh (OP)

  • Posts: 557
    • Slaanesh Dev
Re: GCW-Zero IPU screen scaling implementation
« Reply #73 on: February 03, 2015, 01:03:11 am »
Whilst we're at it, any chance of increasing the resolution limitation?

Some MAME games need more than 640x480. Outrunners is one, it needs 832x448.

Why not just go with HD resolution ie 1920x1080 as it would need to support that for HDMI output anyway?

pcercuei

  • Posts: 1667
    • My devblog
Re: GCW-Zero IPU screen scaling implementation
« Reply #74 on: February 03, 2015, 09:24:21 am »
We set the max to 640x480 because above that limit software rendering is very slow.
Later I tried to increase that limit to 800x600 but the kernel wouldn't boot. I guess we will try to increase that limit again when we have HDMI. But first we have to rewrite the entire video driver.

slaanesh (OP)

  • Posts: 557
    • Slaanesh Dev
Re: GCW-Zero IPU screen scaling implementation
« Reply #75 on: February 04, 2015, 10:41:09 pm »
We set the max to 640x480 because above that limit software rendering is very slow.
Later I tried to increase that limit to 800x600 but the kernel wouldn't boot. I guess we will try to increase that limit again when we have HDMI. But first we have to rewrite the entire video driver.

What do you mean it's slow? The speed would be the same, just the time taken to do the work would scale proportionally to the number of pixels being shifted.

pcercuei

  • Posts: 1667
    • My devblog
Re: GCW-Zero IPU screen scaling implementation
« Reply #76 on: February 05, 2015, 11:24:28 am »
I mean that the time required to render 320x240 = 76k pixels in software is four times less than the time needed to render 640x480 = 307k pixels, and an order of magnitude less than to render 1920x1080 = 2074k pixels.

We may enable high resolutions at some point but they will only be useful to the applications that use the GPU.

 

Post a new topic