• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

Author Topic: ReGBA, GBA emulator version 1.45.5 (hardware scaling)  (Read 167320 times)

Seph817

  • Posts: 127
Re: ReGBA, GBA emulator [alpha 5]
« Reply #80 on: October 02, 2013, 09:44:42 am »
Has there been any work on a scaler that keeps the aspect ratio? Other than that this emulator is awesome! I'm near the end of Golden Sun and it's been running great. I had a couple of freezes but, I save all the time. I lost saves a lot at first but, it was just a dirty rom. I've got a bunch of games lined up to play. Thanks a lot!

pcercuei

  • Posts: 1698
    • My devblog
Re: ReGBA, GBA emulator [alpha 5]
« Reply #81 on: October 02, 2013, 01:24:01 pm »
It doesn't seem like you could drop a frame in the audio at the same time as the video, a skipped frame is impossible to notice, a skip in the audio might be more noticeable though.
That's exactly the opposite, actually.

johnnyonflame

  • Posts: 219
Re: ReGBA, GBA emulator [alpha 5]
« Reply #82 on: October 02, 2013, 05:20:21 pm »
The GBA outputs at a frame rate of 59.73. Weird, I know, but this caused problems in alphas 1 and 2 where the image would be output at a frame rate of 60 to the GCW and after 5 minutes of gameplay the sound would be 4096/11025ths of a second too late and wrap back horribly to the start, glitching and clipping. Alphas 3 and later actually skip a frame every 230 to resynchronise with the sound.

So there you go, the story of why the "this game is running fine" FPS is 59 instead of 60 :)

Huh, how peculiar that the GBA has a refresh rate of 59.73Hz, that's quite the idiosyncrasy. That's a good solution to the sound synchronization issue though.
It doesn't seem like you could drop a frame in the audio at the same time as the video, a skipped frame is impossible to notice, a skip in the audio might be more noticeable though.

You can "skip" a couple samples here and there, but a full 16ms (one frame) of audio is pretty noticeable.
I do find it easier to notice skipped video frames tho.

Nebuleon

  • Guest
Re: ReGBA, GBA emulator [alpha 5]
« Reply #83 on: October 03, 2013, 03:44:41 am »
Has there been any work on a scaler that keeps the aspect ratio? Other than that this emulator is awesome! I'm near the end of Golden Sun and it's been running great. I had a couple of freezes but, I save all the time. I lost saves a lot at first but, it was just a dirty rom. I've got a bunch of games lined up to play. Thanks a lot!
I have to say that the 1.33x1.33x scaler is like, the single most requested thing in the thread. Which is pretty good, because preserving the aspect ratio while blowing up the image sometimes looks better.

pcercuei made the 1.33x1.5x scaler for ReGBA; it is specifically made for those dimensions, and his code is very highly optimised in a way that is not very readable to me [link]. With enough effort, I'm sure I'd be able to trace it in my head and rework the scaling so it does the same thing in height as it does in width, but it would be faster for pcercuei. I will see what I can do about it during the rest of the week.

Seph817

  • Posts: 127
Re: ReGBA, GBA emulator [alpha 5]
« Reply #84 on: October 03, 2013, 07:13:18 am »
That's great! You and pcercuei and JohnnyonFlame and everybody else have done some excellent work so far. Thanks.

pcercuei

  • Posts: 1698
    • My devblog
Re: ReGBA, GBA emulator [alpha 5]
« Reply #85 on: October 03, 2013, 11:49:14 am »
pcercuei made the 1.33x1.5x scaler for ReGBA; it is specifically made for those dimensions, and his code is very highly optimised in a way that is not very readable to me [link]. With enough effort, I'm sure I'd be able to trace it in my head and rework the scaling so it does the same thing in height as it does in width, but it would be faster for pcercuei. I will see what I can do about it during the rest of the week.
The fullscreen scaling algorithm works by converting grids of 6x2 pixels to grids of 8x3 in each loop. This is already a quite complex algorithm: it's fast because it does 32-bit I/O and no registers are swapped to memory during the process. A 1.33x1.33x algorithm with 32-bit I/O would have to convert grids of 6x3 to 8x4, which is already a whole lot more complex...

Atlantis_Risen

  • Posts: 535
Re: ReGBA, GBA emulator [alpha 5]
« Reply #86 on: October 03, 2013, 01:12:14 pm »
I'm cool with the 1:1 shrunk down screen, it's nice and sharp. I just pretend mentally that I'm using a GB Micro.

Thraka

  • Posts: 51
Re: ReGBA, GBA emulator [alpha 5]
« Reply #87 on: October 05, 2013, 08:12:41 am »
Wow thanks so much for this!!

Nebuleon

  • Guest
Re: ReGBA, GBA emulator [alpha 5]
« Reply #88 on: October 06, 2013, 03:10:27 am »
ReGBA alpha 6 is available.

Download: https://dl.dropboxusercontent.com/u/106475413/gcw-zero/regba-alpha-6.opk

New in this build:
  • A manual frameskip option. If you're on the Dingoo A320 and are playing a game whose FPS varies a lot, you may want to give the emulator a fixed frameskip to reduce visual jitter. On the GCW Zero, this option can reduce CPU usage and improve battery life. 30 FPS is half the CPU usage of 60 FPS, but any more frameskip is already in vain.

    The default value of the frameskip option is "Automatic". The FPS given by a manual frameskip value is indicated in parentheses.
  • A full-screen scaler that preserves the aspect ratio of the image. To use it, find the "Image scaling" setting in the menu and change its value to "Aspect".

The last commit that went into this build is commit a7658b6: "Dingoo A320: There are now 3 choices for screen scaling. Remove the two hotkeys. Use the menu instead.".
« Last Edit: October 06, 2013, 03:17:16 am by Nebuleon »

Seph817

  • Posts: 127
Re: ReGBA, GBA emulator [alpha 6]
« Reply #89 on: October 06, 2013, 10:38:35 am »
It's working perfectly! Whoever fixed the aspect ratio did some fast work. Thanks!

Burb

  • Posts: 37
Re: ReGBA, GBA emulator [alpha 6]
« Reply #90 on: October 06, 2013, 03:33:03 pm »
Yup, awesome work.

I hadn't updated since pre-alpha 1, but certain pokemon games that requires a specific save type (128K?) now appear to work, they didn't before.

Nebuleon

  • Guest
Re: ReGBA, GBA emulator [alpha 6]
« Reply #91 on: October 06, 2013, 05:19:49 pm »
It's working perfectly! Whoever fixed the aspect ratio did some fast work. Thanks!
That was me this time, but I had pcercuei's 1.33x1.5x scaler to help me. :)

RupeeClock

  • Posts: 234
Re: ReGBA, GBA emulator [alpha 6]
« Reply #92 on: October 06, 2013, 06:37:40 pm »
The aspect screen scaler looks great, thanks for adding it.  ;D

Atlantis_Risen

  • Posts: 535
Re: ReGBA, GBA emulator [alpha 6]
« Reply #93 on: October 06, 2013, 09:56:51 pm »
you don't find the upscaled graphics to be blurry?  The 1:1 pixel option seems much sharper to me.

MikeyAK

  • Posts: 13
Re: ReGBA, GBA emulator [alpha 6]
« Reply #94 on: October 06, 2013, 09:59:02 pm »
Pleeeeease release rebindable buttons, please please please??? I want to play Donkey Kong and Mario with the B and X buttons instead of the A and B, it's so much more comfortable.

Awakened

  • Posts: 96
Re: ReGBA, GBA emulator [alpha 6]
« Reply #95 on: October 06, 2013, 10:28:22 pm »
you don't find the upscaled graphics to be blurry?  The 1:1 pixel option seems much sharper to me.
I wonder how blurry it is (I still don't have a system to try this out on). Is it like bilinear filtering? Ideally (IMHO) you'd use something like the pixellate shader with the scaling so you get nice even pixels with minimal blurring. Here's an example of it off vs. on in Megaman X scaled up to 1080p with 4:3 aspect ratio correction:



I'm not sure if would look as good at the Zero's res or if it's even fast enough to run fullspeed with that kind of filter. In RetroArch it seems to be one of the easier shaders to run, but it might not be so easy to implement in other emulators. You can look at the cg version of that shader here to get an idea of how it works.

RupeeClock

  • Posts: 234
Re: ReGBA, GBA emulator [alpha 6]
« Reply #96 on: October 06, 2013, 11:50:21 pm »
you don't find the upscaled graphics to be blurry?  The 1:1 pixel option seems much sharper to me.

A little blurry sure, but that comes with non-integer scaling.
Once in motion though it's not bad.

Pleeeeease release rebindable buttons, please please please??? I want to play Donkey Kong and Mario with the B and X buttons instead of the A and B, it's so much more comfortable.

I'm still interested in this too.
Actually if you had a simple option in the primitive menu to toggle GCW B/A = GBA B/A to GCW X/B to GBA B/A, that would suffice for now.

On another note, the X button isn't doing anything right now. It might do well to map the fast forward button to that, if you can't map both autofire A and B.

hi-ban

  • Posts: 889
Re: ReGBA, GBA emulator [alpha 6]
« Reply #97 on: October 06, 2013, 11:56:12 pm »
Upscaled graphics are always kinda "blurry" if you want to mantain a consistent scaling in a low-res screen.

In ReGBA, the aspect ratio scaler (1.33x) needs to convert every 3 pixels to 4 pixels. There are two ways of doing this, using a software scaler:

Convert 3 pixels into 4 by creating pixels which are the average of their neighbour pixels (interpolation). This makes the image look a bit blurry, but mantains the proportions consistently.

The other option is to use the "nearest neighbour" method, which just duplicates a pixel each 3 pixels. This looks crisp, but it makes the image look distorted, especially in low-res screens.

Here is an example when scaling a simple shape with diagonal lines:

« Last Edit: October 07, 2013, 12:27:28 am by hi-ban »

Atlantis_Risen

  • Posts: 535
Re: ReGBA, GBA emulator [alpha 6]
« Reply #98 on: October 07, 2013, 12:48:15 am »
I guess the slight blurriness is normal, just a personal preference that I like the 1:1 pixels.

Deagle275

  • Posts: 110
Re: ReGBA, GBA emulator [alpha 6]
« Reply #99 on: October 07, 2013, 11:22:18 pm »
I guess the slight blurriness is normal, just a "personal" preference that I like the 1:1 pixels.
What , you thought you were the only one :P