Gambatte 0.5.0-wip2 released

Announce new emulators, discuss which games run best under each emulator, and much much more.

Moderator: General Mods

Post Reply
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

any plans to support standard Wide-Boy64 or Game Boy Player borders? or would that be something found in n64 or gamecube emulator? I've always been confused on matters like this.
[quote="byuu"]Seriously, what kind of asshole makes an old-school 2D emulator that requires a Core 2 to get full speed? [i]>:([/i] [/quote]
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

New release.

It contains a few important bug fixes, such as MBC2 ROMs not getting any SRAM in 0.4.0. It also contains some major audio/video timing improvements, as well as improvements and additions to platform-specific audio/video engines (particularly on win32).

The verbose log:

Code: Select all

libgambatte:
    - Fix HqXx filter pitch.
    - Fix mbc2 not getting a rambank.
    - Make sure to reset passed pointers when deleted. Fixes potential crash
      when loading ROM during OAM busy.
common:
    - Substantially improved rate estimation averaging.
    - RateEst: Add a convenient way of filtering measures that extend beyond
      a buffer time, and are as such probably invalid.
    - RateEst: Allow using a custom timestamp in feed().
    - RateEst: Keep a queue of the last ~100 msec worth of samples and
      duration, and filter out collective samples that give a pre-estimate
      that seems way off.
    - Replace "Game Boy / Game Boy Color emulator" with "Game Boy Color
      emulator" for now to avoid misleading anyone on the current status.
gambatte_qt:
    - Disable BlitterWidget updates (paintEvents) while not paused.
    - Allow BlitterWidgets to opt in to get paintEvents while unpaused. Do so
      for QGLBlitter since it may need to clear buffers afterwards.
    - QGLBlitter: Try to blit right after sync in the case of single buffering.
    - Up default audio buffer latency to 100 ms (some common system audio
      servers require a lot of buffering to work well).
    - Adaptively skip BlitterWidget syncs if audio buffer is low, in a manner
      that should minimize wasted skips in sync to vblank situation, and tries
      to be non-disturbing. This replaces frame time halving, and blitter
      specific rescueing.
    - Clear display buffers in DirectDrawBlitter and Direct3DBlitter in
      exclusive mode, since blits don't necessarily cover the entire buffers.
    - DirectDrawBlitter: Make sure that a minimum amount of time has passed
      between calls to WaitForVerticalBlank, since it can return in the same
      vblank period twice on a fast system.
    - DirectDrawBlitter: Support vsync for refresh rate ~= 2x frame rate.
    - DirectDrawBlitter: Refactor somewhat and get rid of a couple minor
      potential bugs.
    - DirectDrawBlitter: Some tweaks to get updates closer to sync time in
      certain situations.
    - DirectDrawBlitter: Some tweaks to better support DONOTWAIT.
    - DirectDrawBlitter: Make only updating during vblank while page flipping
      optional.
    - Direct3DBlitter: Some tweaks to get updates closer to sync time in
      certain situations.
    - Filter out very short frame times in frame time estimation.
    - Don't adjust frame time during turbo, but rather skip BlitterWidget
      syncs to speed up, which avoids vsync limits without disabling vsync.
    - DirectDrawBlitter: Add triple buffering option.
    - Direct3DBlitter: Use D3DSWAPEFFECT_DISCARD in non-exclusive mode.
    - Direct3DBlitter: Allow triple buffering and vblank-only updates in
      non-excusive mode.
    - Rename "Page flipping" in Direct3D and DirectDraw blitters to
      "Exclusive full screen".
    - Pause audio on win32 titlebar clicks/drags to avoid looping audio due to
      underruns from blocked timerEvents.
    - Use wildcards for platform detection to avoid being unnecessarily
      compiler/architecture specific. Fixes bug 2377772.
    - Rewrite most of DirectSoundEngine, supporting primary buffer option,
      making it more robust, correct and hopefully cleaner. Only use part of
      the primary buffer if the desired buffer size is lower than the
      primary buffer size.
    - Direct3DBlitter and DirectDrawBlitter: Force blocking updates when sync
      to vblank is enabled. Some updates only block if there's a prior
      unfinished update in progress. This screws up frame time estimation in
      turn screwing up vsync. To fix this we do a double update (and extra blit)
      if close to a frame time period has passed since the last update when
      sync to vblank is enabled. I really should have noticed this earlier as
      it pretty much breaks vsync adaption completely.
    - Direct3DBlitter: Use the D3DCREATE_FPU_PRESERVE flag when creating
      device. Omitting this flag can screw up floating point calculations in
      other parts of the code. For instance WASAPI cursor timestamps get
      utterly screwed up here.
    - Direct3DBlitter: It appears that managed textures are updated before
      they are unlocked, which screws up redraws, making things appear choppy
      in some situations. Use a default memory texture and a system memory
      texture and the UpdateTexure method instead.
    - DirectSoundEngine: Make use of the sample period limit feature of
      RateEst, rather than duplicating the feature.
    - Add polling WASAPI engine with exclusive mode support. Latency and rate
      estimation is generally better than DirectSound, and in exclusive mode
      there is less blocking as well as exclusive mode being better than
      shared mode in the other areas too.
    - WasapiEngine: Add device selection.
    - WasapiEngine: Add static isUsable() method. Only listed if isUsable().
      Default engine if isUsable().
    - WasapiEngine: Use default device if there's only one device available,
      since we don't show the combobox anyway.
    - DirectSoundEngine: Provide the integrated read and status get write
      method optimization.
    - XvBlitter: Set NosystemBackground attribute rather than OpaquePaintEvent.
      Reimplement paintEngine to return NULL as suggested by Qt docs.
    - X11Blitter: Reimplement paintEngine to return NULL.
    - AlsaEngine: Make use of sample period limit feature of RateEst. Don't
      increase estimated sample rate on underrun.
    - OssEngine: Make use of sample period limit feature of RateEst. Don't
      increase estimated sample rate on underrun.
    - Esc exits fullscreen on macx.
    - Drop OpenAL from default macx binary.
    - Add some useful but commented build flags for macx to .pro files.
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

Thanks sinamas!
I bring the trouble.
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

sweet. Congrats on the new release.
[quote="byuu"]Seriously, what kind of asshole makes an old-school 2D emulator that requires a Core 2 to get full speed? [i]>:([/i] [/quote]
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

sinamas: I think I found a bug.

r228. Wario Blast: Featuring Bomberman, Final Boss Mad Bomber (Code: 8513, or in reverse 3158):
Image
Image

Mad Bomber's arms seem to partially disappear whenever it lets out a missile.

I don't recall this happening in the original game, although my brother is currently borrowing my copy so I can't verify it on the original, to see if it's RTO or not.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

Nach wrote:sinamas: I think I found a bug.
It happens on both my CGB and DMG-08. Many games get that when the sprite limit is exceeded. I actually had to hack the ROM image to get it to run on my flash cart, as it depends on MBC1 behavior that conflicts with the MBC5-ish behavior of my flash cart.

About progress:
This has been an extremely busy semester for me, so work on Gambatte has been minimal. I _have_ been able to do some basic DMG testing, which indicates that the DMG and CGB differ in a few core areas, but are otherwise very, very similar. Unfortunately a lot of my tests depend on some of that CGB-specific behavior, so they need to be reworked to be meaningful for the DMG. I'll see if I can get some more done this summer.
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

Good to hear an update, can't wait for an eventual new release!
I bring the trouble.
crocomire
Hazed
Posts: 70
Joined: Sun Dec 12, 2004 6:27 am
Location: Brazil
Contact:

Post by crocomire »

I found a "sprite bug" similar in Metroid II...
The same happened on BGB, only in VBA it appear "correct": The energy ball is behind of Samus sprite.

Image

Some suggestions for the future releases:

- Save emulator window position and/or center it in the screen.
- Option of choose the paths to the saves (sav and gps), palettes, snapshots.
- and...
kick wrote:- The DMG palette scheme editor should have 4 layers for customization
Gambatte is a fantastic emulator. Great work sinamas!
THE LAST METROID IS IN CAPTIVITY.
THE GALAXY IS AT PEACE...
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

crocomire wrote:I found a "sprite bug" similar in Metroid II...
Looks normal to me. On the DMG sprites further to the left have priority. Since both Samus and the ball are composed of several sprites, which ones appear on top will depend on Samus' horizontal position.
Thanks for the feedback.
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

Yeah. I'd have to fire my Gameboy up, but I'm pretty sure that's actual game behavior.

Just think of it as a very crude attempt at transparency.
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

still it's not bad to pool these real hardware shortcomings as known issues so people don't wonder or report them twice.
[quote="byuu"]Seriously, what kind of asshole makes an old-school 2D emulator that requires a Core 2 to get full speed? [i]>:([/i] [/quote]
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Thing is, they seem to be noticeable on Gambatte than on real hardware.

Probably an optical illusion caused by a bigger viewing screen.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Rashidi
Trooper
Posts: 515
Joined: Fri Aug 18, 2006 2:45 pm

Post by Rashidi »

Nach wrote:Thing is, they seem to be noticeable on Gambatte than on real hardware.

Probably an optical illusion caused by a bigger viewing screen.
is that trully possible to emulating optical illusion from real hardware? (saves NTSC 'illusions')
crocomire
Hazed
Posts: 70
Joined: Sun Dec 12, 2004 6:27 am
Location: Brazil
Contact:

Post by crocomire »

Sorry, it's really a false bug... :roll:

http://www.youtube.com/watch?v=Kf4rqsV3qYU
The author of this video used a real SGB, and the same thing happened ...
THE LAST METROID IS IN CAPTIVITY.
THE GALAXY IS AT PEACE...
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

Rashidi wrote:
Nach wrote:Thing is, they seem to be noticeable on Gambatte than on real hardware.

Probably an optical illusion caused by a bigger viewing screen.
is that trully possible to emulating optical illusion from real hardware? (saves NTSC 'illusions')
NTSC artifacting isn't an optical illusion. It's not even related to the concept of an optical illusion.



And no, it's not possible to emulate an optical illusion caused by bigger/smaller screens. Except by playing in a small window. Then you'd get DIFFERENT optical illusions.

Nintendo actually made explicit reference to that optical illusion in the ads for the GameBoy Pocket. http://www.youtube.com/watch?v=f8-DKakDoVI

The smaller frame around the display had the side effect of making the display itself appear bigger, even though it's exactly the same size.
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

sinamas wrote:About progress:
I _have_ been able to do some basic DMG testing, which indicates that the DMG and CGB differ in a few core areas, but are otherwise very, very similar. Unfortunately a lot of my tests depend on some of that CGB-specific behavior, so they need to be reworked to be meaningful for the DMG. I'll see if I can get some more work done.
Still waiting for an updated (Qt 4.5.1) build.
[i]Have a nice kick in da nutz[/i] @~@* c//
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

kick wrote:
sinamas wrote:About progress:
I _have_ been able to do some basic DMG testing, which indicates that the DMG and CGB differ in a few core areas, but are otherwise very, very similar. Unfortunately a lot of my tests depend on some of that CGB-specific behavior, so they need to be reworked to be meaningful for the DMG. I'll see if I can get some more done this summer.
Still waiting for an updated (Qt 4.5.1) build.
Lay off the hallucinogens. Summer hasn't started yet in Norway.
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

Audio buffering / latency in Gambatte
----------------------------------------------

Just tried the Linux .deb package of Gambatte-Qt with OSS 4.1 on a really old PC with a SoundMAX AC97 onboard chip.

I've set the audio latency all the way down to 4ms and surprisingly, there's no difference in the sound quality - no pops,crackles,slowdown or stuttering. Sounds too good to be true.

On Windows the sound begins to crackle when the latency is set to a value of 10ms or below (as expected).

Makes me wonder if the Linux version of Gambatte is using hardware buffers for the audio output.

There's an interesting quirk when using hardware buffers with these onboard chips - you can set the latency all the way down to 1ms and it will still 'work',but the real latency you'll get is a fixed value of > 200ms.

Try it with JACK (Linux) , ASIO4ALL (Windows) or even OpenAL. The only way to get lower latencies with these chips is to switch to software buffering.
Last edited by kick on Thu May 21, 2009 6:54 pm, edited 3 times in total.
[i]Have a nice kick in da nutz[/i] @~@* c//
doktor_kris
Lurker
Posts: 102
Joined: Sat Feb 25, 2006 7:47 pm
Contact:

Post by doktor_kris »

sinamas wrote:Lay off the hallucinogens. Summer hasn't started yet in Norway.
Sant nok, men unn deg tid til bading og kos! Kan liksom ikke bare være inne når om varmen steker ute, vettu.
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

doktor_kris wrote:
sinamas wrote:Lay off the hallucinogens. Summer hasn't started yet in Norway.
Sant nok, men unn deg tid til bading og kos! Kan liksom ikke bare være inne når om varmen steker ute, vettu.
What

(except nok. I know that's norweigian money. :p)
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

adventure_of_link wrote:
doktor_kris wrote:
sinamas wrote:Lay off the hallucinogens. Summer hasn't started yet in Norway.
Sant nok, men unn deg tid til bading og kos! Kan liksom ikke bare være inne når om varmen steker ute, vettu.
What

(except nok. I know that's norweigian money. :p)
Only when capitalized. :roll:
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
Thristian
Hazed
Posts: 76
Joined: Tue Feb 07, 2006 11:02 am

Post by Thristian »

adventure_of_link wrote:
doktor_kris wrote:Sant nok, men unn deg tid til bading og kos! Kan liksom ikke bare være inne når om varmen steker ute, vettu.
What
Google says:
Sant NOK, but except the time to dip and enjoy! Can not just be like when the heat is beating down on the outside, y'know.
But except the time to dip and enjoy, couldn't have said it better myself.
Fras
Hazed
Posts: 54
Joined: Tue Jan 16, 2007 5:32 pm

Post by Fras »

But except the time to dip and enjoy
Hah. : P

I get it fairly well, except for that 'kos'.
Bodkins Odds

Post by Bodkins Odds »

Does Gambatte emulate the game link cable? And if not then could it be made to?
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

Hi, how do I change the GBC palette VBA-M (rev. 899 x64) uses to match Gambatte's?

gbPalette=FF7FB5568C310000FF7FB5568C310000FF7FB5568C310000FF7FB5568C310000FF7FB5568C310000FF7FB5568C310000A4
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
Post Reply