• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

Author Topic: Faster downscaling for the RS-90 ?  (Read 4127 times)

gameblabla (OP)

  • Posts: 1451
Faster downscaling for the RS-90 ?
« on: December 28, 2019, 07:12:41 pm »
So while i ported Cannonball to the RS-90, i noticed how it would draw frames pixels per pixels like so  :
https://github.com/gameblabla/Cannonball-C/blob/master/sdl/rendersw.c#L200

Now what i usually do is just simply render it natively to another surface and downscale it again.
However, this is wasteful (especially in this case) and i believe that i could simply skip pixels as we are drawing them.

So how would you other devs do it ? Oh and yeah, Steward has not shared his source for PocketSNES & picodrive so i can't look at it anyway...

Another solution would be to render it as YUV420 and have the IPU downscale it but it's not supported yet for the RS-90.
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

pcercuei

  • Posts: 1720
    • My devblog
Re: Faster downscaling for the RS-90 ?
« Reply #1 on: December 29, 2019, 06:55:11 pm »
Your Render_draw_frame() function already renders from a 8-bit paletted buffer (Render_rgb) to a 16-bit one (Render_screen_pixels), if you add another conversion step to downscale, it's going to eat up a lot of CPU time.

What you can do, is convert from 8-bit paletted to 16-bit and downscale in one single pass.

If you take a 3x3 pixel block as source:
Code: [Select]
[NW] [N] [NE]
[W]  [C] [E]
[SW] [S] [SE]

You want to convert it to a 2x2 block like this:
Code: [Select]
[avg(pal(NW),pal(N),pal(W),pal(C))]   [avg(pal(N),pal(NE),pal(C),pal(E))]
[avg(pal(W),pal(C),pal(SW),pal(S))]   [avg(pal(C),pal(E),pal(S),pal(SE))]

where avg() is the average of the 4 values, and pal() is the 16-bit color you get from the palette at the offset of the value of the source pixel.

gameblabla (OP)

  • Posts: 1451
Re: Faster downscaling for the RS-90 ?
« Reply #2 on: January 02, 2020, 04:12:18 am »
Thanks pcerceui, sadly i'm unfamiliar with the idea of pixel blocks like these lol...

I'll see what i can do about it.
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

pcercuei

  • Posts: 1720
    • My devblog
Re: Faster downscaling for the RS-90 ?
« Reply #3 on: January 02, 2020, 01:12:15 pm »
Thanks pcerceui, sadly i'm unfamiliar with the idea of pixel blocks like these lol...
a 3x3 block of pixels is just 3 pixels of one line, then 3 pixels of the line below it, then 3 pixels of the one second below it.

Re: Faster downscaling for the RS-90 ?
« Reply #4 on: January 04, 2020, 04:37:31 pm »
i don't really know, if that is working, or if it is necessary at all.
i had a chat with gameblabla saying, that opentyrian would look poopy on the rs90 screen.
and hey, since WG&C reviewed the rs90 2020 version with the FBA Emulator in it, would it not be nicer, to make an arcade emulator for more Arcade Machines than just Outrun? Because gameblabla said FBA Could be possible, even more possible than Mame

gameblabla (OP)

  • Posts: 1451
Re: Faster downscaling for the RS-90 ?
« Reply #5 on: January 05, 2020, 01:21:40 am »
Yes, i said that regardless of what you are doing, downscaling 320x200 to 240x160 won't look as good.
But if i was arguing that it wasn't necessary, i wouldn't have bothered with the RS-90 at all trust me...

Quote
a 3x3 block of pixels is just 3 pixels of one line, then 3 pixels of the line below it, then 3 pixels of the one second below it.
Oh right, that makes more sense now that i think about it.

Well i guess i just need to come up with something like it. Thanks
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

Re: Faster downscaling for the RS-90 ?
« Reply #6 on: January 05, 2020, 10:06:34 am »
i know but would it not be cool, to make an Arcade Machine enulator for more than just outrun.
Here is the WG&C Video of the Stock Firmware Emulating FBA GAmes:
https://www.youtube.com/watch?v=UqhacVYHoWc&t=391s
there you have it, how fba would look on the rs90

gameblabla (OP)

  • Posts: 1451
Re: Faster downscaling for the RS-90 ?
« Reply #7 on: January 06, 2020, 07:30:05 am »
i know but would it not be cool, to make an Arcade Machine enulator for more than just outrun.
Here is the WG&C Video of the Stock Firmware Emulating FBA GAmes:
https://www.youtube.com/watch?v=UqhacVYHoWc&t=391s
there you have it, how fba would look on the rs90
I am well aware of the existence of FBA. i'm also aware that it would run slower than Outrun would with its native support.
If you really want me to port FBA for your RS-90 then i'll have to ask you to pay me a small fee, because i'm getting tired of requests like these constantly without getting anything in return.

⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

Re: Faster downscaling for the RS-90 ?
« Reply #8 on: January 06, 2020, 03:17:43 pm »
trust me, i am not the only one with this wish.

You said this as an alternative for anyone, who requested MAME on the RS90.
Evidence: https://boards.dingoonity.org/retrominirs-90/wish-list-apps-or-games-for-the-rs90/msg189539/#msg189539

but i can still offer you some other RS90 Stuff i have in mind, such as a Skin Pack for the RS90 Menu:
https://boards.dingoonity.org/retrominirs-90/os-skins-for-the-rs-90/


drowsnug

  • Posts: 20
Re: Faster downscaling for the RS-90 ?
« Reply #9 on: January 23, 2020, 01:25:46 pm »
Hey Guys, I've made a nicer downscaling to FCEUX.   and Snes9x4D  :)

Try below,

FCEUX
https://drive.google.com/open?id=1opVoo9tCirUkMllFRQEXUc12LGoJQzOl
(If you don't see anything, press START+SELECT, and change Video Option)

Snes9X4d
https://drive.google.com/open?id=1ZuLYaDCMqfzV5JlUFAnsnfJh82_vE90j


gameblabla (OP)

  • Posts: 1451
Re: Faster downscaling for the RS-90 ?
« Reply #10 on: January 23, 2020, 04:14:02 pm »
Hey Guys, I've made a nicer downscaling to FCEUX.   and Snes9x4D  :)

Try below,

FCEUX
https://drive.google.com/open?id=1opVoo9tCirUkMllFRQEXUc12LGoJQzOl
(If you don't see anything, press START+SELECT, and change Video Option)

Snes9X4d
https://drive.google.com/open?id=1ZuLYaDCMqfzV5JlUFAnsnfJh82_vE90j
It would be nice to have the source code for these as well, especially given that i worked on the RS-90 port of FCEUX and i doubt this build was properly profiled, thus running slower...
⚠ WARNING ⚠
If you are using any of my forks, emulators or ports, you are being influenced by propaganda !

jhonp

  • Posts: 27
Re: Faster downscaling for the RS-90 ?
« Reply #11 on: January 23, 2020, 09:33:57 pm »
Hey Guys, I've made a nicer downscaling to FCEUX.   and Snes9x4D  :)

Try below,

FCEUX
https://drive.google.com/open?id=1opVoo9tCirUkMllFRQEXUc12LGoJQzOl
(If you don't see anything, press START+SELECT, and change Video Option)

Snes9X4d
https://drive.google.com/open?id=1ZuLYaDCMqfzV5JlUFAnsnfJh82_vE90j
nice job, perfect.

drowsnug

  • Posts: 20
Re: Faster downscaling for the RS-90 ?
« Reply #12 on: January 23, 2020, 10:17:35 pm »
hi, gameblabla,
The source cide is here,
https://drive.google.com/open?id=1pxt7v7b3NvYcUtC50RzgpWGNaS4DaLr2

pls chack scaler.cpp.
My downscale functions looks nicer, but not faster.

If you like it, you can merge my function freely.

Great Crippler

  • Posts: 175
Re: Faster downscaling for the RS-90 ?
« Reply #13 on: January 24, 2020, 06:53:57 pm »
SNES9X port. I almost missed that. That's a big deal to me. So thanks much. Is the source code for that one present?

Andij89

  • Posts: 3
Re: Faster downscaling for the RS-90 ?
« Reply #14 on: January 24, 2020, 09:58:15 pm »
Hey Guys, I've made a nicer downscaling to FCEUX.   and Snes9x4D  :)

Try below,

FCEUX
https://drive.google.com/open?id=1opVoo9tCirUkMllFRQEXUc12LGoJQzOl
(If you don't see anything, press START+SELECT, and change Video Option)

Snes9X4d
https://drive.google.com/open?id=1ZuLYaDCMqfzV5JlUFAnsnfJh82_vE90j
Very good work, the fceux runs around 55 fps without audio obviously and that of snes the same
Congratulations on your work.

PhenomX

  • Posts: 45
Re: Faster downscaling for the RS-90 ?
« Reply #15 on: January 25, 2020, 02:14:36 am »
Drowsnug, brutal, nes and snes look and work great, congratulations, great work  ;D

drowsnug

  • Posts: 20
Re: Faster downscaling for the RS-90 ?
« Reply #16 on: January 27, 2020, 09:02:56 am »
SNES9X port. I almost missed that. That's a big deal to me. So thanks much. Is the source code for that one present?

I uploaded Snes9x4D source code below.
https://github.com/drowsnug95/snes9x4d-rzx50

and I modified Menu screen and KeyRemapping menu, try latest version,
https://drive.google.com/open?id=1ZuLYaDCMqfzV5JlUFAnsnfJh82_vE90j

Great Crippler

  • Posts: 175
Re: Faster downscaling for the RS-90 ?
« Reply #17 on: January 28, 2020, 01:05:14 am »
SNES9X port. I almost missed that. That's a big deal to me. So thanks much. Is the source code for that one present?

I uploaded Snes9x4D source code below.
https://github.com/drowsnug95/snes9x4d-rzx50

and I modified Menu screen and KeyRemapping menu, try latest version,
https://drive.google.com/open?id=1ZuLYaDCMqfzV5JlUFAnsnfJh82_vE90j


Very Nice. Thanks :)

 

Post a new topic