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
mudlord88
Lurker
Posts: 115
Joined: Sat Nov 20, 2010 12:43 am

Re: Gambatte 0.4.1 released

Post by mudlord88 »

Write some good, high quality, maintainable code. Then optimize the parts that need it. Really, the world will thank you for it.


You do realize for emulation, thats not always the answer? Emulation is a case where you just can't dump ALL the paradigms you get for coding.

Exophase wrote:CPU cores written in assembly can have advantages that are difficult or impossible to generate from compiled code, like being able to directly use flags calculations. On a lot of platforms compilers are still pretty deficient in general.


So, you can shove your "let the compiler do it all" talk.
DataPath
Lurker
Posts: 128
Joined: Wed Jul 28, 2004 1:35 am
Contact:

Re: Gambatte 0.4.1 released

Post by DataPath »

kode54 wrote:I have no trouble with code built using Visual Studio 2010 running on XP. Older should be of no consequence these days anyway.


QFT. The problems that Rashidi is referring to are probably SDK-related. My employer builds all kinds of projects on MSVC for running on a non-windows real-time OS.

mudlord88 wrote:You do realize for emulation, thats not always the answer? Emulation is a case where you just can't dump ALL the paradigms you get for coding.


I'm not talking about "paradigms" and "agile" and crap like that. Even in emulation, probably over 90% of the code you write is not even remotely performance-sensitive. So writing 100% of your code in highly-tuned assembly is idiotic.

Well-organized, documented assembly can, to those familiar with the language, be just as readable and maintainable as C. If that's really what you're comfortable with, then fine - you're doing it because you love it, not because you're a trained software engineering developing a high quality deliverable. But don't expect a lot of people to be submitting patches adding hot new features. And when you tire of the project and move on, the legacy you've left won't be worth much.
mudlord88
Lurker
Posts: 115
Joined: Sat Nov 20, 2010 12:43 am

Re: Gambatte 0.4.1 released

Post by mudlord88 »

Even in emulation, probably over 90% of the code you write is not even remotely performance-sensitive.


So a dynamic recompiler is not performance sensitive?

So writing 100% of your code in highly-tuned assembly is idiotic.


How is it idiotic? If a dev wants to do that, fine, but calling it idiocy....well I have to wonder why you are so slanderous.

If that's really what you're comfortable with, then fine - you're doing it because you love it, not because you're a trained software engineering developing a high quality deliverable.


So making a product in ASM is inferior. What about SNES games then? By your logic, they are inferior then.
Thristian
Hazed
Posts: 76
Joined: Tue Feb 07, 2006 11:02 am

Re: Gambatte 0.4.1 released

Post by Thristian »

mudlord88 wrote:
Even in emulation, probably over 90% of the code you write is not even remotely performance-sensitive.

So a dynamic recompiler is not performance sensitive?

Ah, so you *are* trolling.
mudlord88
Lurker
Posts: 115
Joined: Sat Nov 20, 2010 12:43 am

Re: Gambatte 0.4.1 released

Post by mudlord88 »

No, I am pointing out how idiotic DataPath is making things.

For gaming, emulation etc. you just cant stick performance to the Man.
DataPath
Lurker
Posts: 128
Joined: Wed Jul 28, 2004 1:35 am
Contact:

Re: Gambatte 0.4.1 released

Post by DataPath »

mudlord88 wrote:No, I am pointing out how idiotic DataPath is making things.

For gaming, emulation etc. you just cant stick performance to the Man.


For graphics processing, you can't just stick performance to the Man. For numerical analysis packages, you can't just stick performance to the man. For kernel drivers, you can't just stick performance to the man.

But for the most part, performance-optimized code is extremely difficult to maintain. So you only optimize the critical portions - anything else is wasted effort.

Incidentally, what emulator has their dynarec coded in assembly? I looked through the sources for several emulators, and had a hard time finding any assembly at all, let alone an all-assembly dynarec.
franpa
Gecko snack
Posts: 2372
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Re: Gambatte 0.4.1 released

Post by franpa »

kode54 wrote:I have no trouble with code built using Visual Studio 2010 running on XP. Older should be of no consequence these days anyway.

I believe Visual Studio 2010 Service Pack 1 removes the legacy windows support from compiled programs.
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Re: Gambatte 0.4.1 released

Post by kode54 »

franpa wrote:
kode54 wrote:I have no trouble with code built using Visual Studio 2010 running on XP. Older should be of no consequence these days anyway.

I believe Visual Studio 2010 Service Pack 1 removes the legacy windows support from compiled programs.

That would explain why neither foobar2000 nor any of my components for it work on anything older than Vista. Oh, wait.

Edit: Wait, you said Service Pack 1. That does not exist yet. Therefore nobody can know whether it breaks OS compatibility. Which I doubt it would anyway, since there's really nothing in the C runtime module that would require Vista or newer, and compiler service packs don't usually include a newer Platform SDK, another possible avenue for breaking compatibility.
Thristian
Hazed
Posts: 76
Joined: Tue Feb 07, 2006 11:02 am

Re: Gambatte 0.4.1 released

Post by Thristian »

I tried to build Gambatte today, based on the latest source in the SVN repository (Mon Oct 27 23:41:57 2008, "silly ifdef typo") on Ubuntu 10.10 with GCC 4.4.4. I couldn't (immediately) get the Qt version to build, but I got the SDL one going after applying this patch.

Is there a more up-to-date repository anywhere? Has anyone gotten Gambatte's Qt inteface working with modern Linux distros?

EDIT:Seems my 'download latest version' script must have burped or something. Apparently the last commit was only 10 months ago, not two years. I'll try again.
Last edited by Thristian on Fri Dec 31, 2010 12:52 pm, edited 1 time in total.
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Re: Gambatte 0.4.1 released

Post by sinamas »

Last I checked, latest public revision is r243 Sun Apr 4 16:17:40 2010 UTC.

http://gambatte.svn.sourceforge.net/vie ... vision=243

Both gambatte_sdl, and gambatte_qt build just fine here on Debian gcc version 4.4.5.
That patch does nothing as gambatte_sdl.cpp already includes cstdio.
Thristian
Hazed
Posts: 76
Joined: Tue Feb 07, 2006 11:02 am

Re: Gambatte 0.4.1 released

Post by Thristian »

Looks like you replied while I was editing. My apologies; the actual latest version works quite nicely.
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Re: Gambatte 0.4.1 released

Post by sinamas »

FitzRoy wrote:I have a bug report:

World Cup USA 94
*bouncing ball on language select screen goes transparent on the top flags. (might happen on HW but can't test)
*field graphics are all jumbled up. (really doubt this happens on real HW)

Fixed (not yet commited to public SVN). Crappy guesswork on DMG hardware bugs is no longer needed when we can actually test stuff on hardware.


Gobo wrote:I just tried this nice gbc demo called Space Waste by Octarine, but I couldn't help but notice it's plagued with glitches, at least when played on emulators.

What I'd consider the most evident abnormality is the garbage frame flashing as the routines change accompanied with pitch bending. Still, let's not forget some Amiga demos from back in the day used to do the same and it was considered normal, so even if we're talking about completely different hardware, chances are that these may not imply anything.

Other glitches include what you see in the image belows. The left one shows a garbage line on the top, which happens on every emulator I tried. The right one shows a yellow horizontal line off by a few pixels, which happens only in certain emulators such as Gambatte (e.g glitch is not present in NO$GMB)

Image

I'd be interesting to see how good this demo performs on a real GameBoy, but right now I don't have the means of transferring the rom.

Any thoughts? thanks in advance 8)

All glitches happen on hardware.


Gobo wrote:Image

This is "Baby Felix Halloween". The 3 top screenshots show how Gambatte handles the menus; the lil Jack-o'-lantern selector and the characters are missing. The 3 bottom screenshots were taken with VBA-M and that's how said elements are supposed to look. There's also a difference in the colors of the letters, but since I can't for the love of me remember how they were displayed on my real GameBoy (now dead) I'll just leave that to speculation.

Regards.

Fixed (not yet commited to public SVN). The only reason this works on other emulators (and on hardware in a sense) is just dumb luck btw. It depends on initial values that are somewhat random. I had done an approximation to them to avoid including huge tables, but have now included a diff against a hardware dump to ensure that we get values that can definitely occur on hardware.
mudlord88
Lurker
Posts: 115
Joined: Sat Nov 20, 2010 12:43 am

Re: Gambatte 0.4.1 released

Post by mudlord88 »

Didn't you already have a hardware verified LUT to do this...or was that just for register initialization? :)
Would be nice if the GBC BIOS gets emulated..:)
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Re: Gambatte 0.4.1 released

Post by sinamas »

I had a LUT for OAM, IO, and HIRAM as well as CGB palettes, but not for WRAM and VRAM which were approximated based on a dump from a CGB. I've also dumped these for DMG now.
Gobo
Rookie
Posts: 16
Joined: Thu May 24, 2007 3:14 am

Re: Gambatte 0.4.1 released

Post by Gobo »

Great way to start the year 8)
MrX_Cuci

Re: Gambatte 0.4.1 released

Post by MrX_Cuci »

Can I use command line options with the Windows build (QT?) or do I need to compile the SDL version in order to use these options. I am trying to use it in a cabinet.

I probably don't know what I am doing, so don't blame me for it :)
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Re: Gambatte 0.4.1 released

Post by kick »

So when are we going to see the next release (0.4.2)?

It's been more than two years since the last update.

Can't wait for the stutter/lock-free A/V sync and the DMG improvements. The current version is unusable on Windows 7 (especially with Aero) :(

Looks like Gambatte v0.4.1 doesn't like the combination of a quad-core CPU and Windows 7 (horrible desyncs especially when the window loses focus or emulation is paused, sometimes the emulator hangs/does not respond).

Could you add options to allow pad/keyboard input and sound output in the background (even when the window loses focus)?

BUG: When using the Direct3D renderer, the image is a bit warped (the two triangles that compose the output image are not aligned properly)

FYI: Even BGB (the fast-but-accurate closed source S/GB/C emulator that was on hiatus for a long time) is back with a new release featuring greatly improved accuracy, bug fixes, multiple renderers and GBC bootrom emulation.

It's time for a new release of Gambatte a.k.a. "OpenSource strikes back" :D
Have a nice kick in da nutz @~@* c//
Gobo
Rookie
Posts: 16
Joined: Thu May 24, 2007 3:14 am

Re: Gambatte 0.4.1 released

Post by Gobo »

Good ol' 2x, 4x, 6x, 8x, etc scaling is something Gambatte desperately needs. The current options for fullscreen mode depend heavily on the chosen resolution which makes it quite impractical and even impossible to apply specific scaling factors.

E.g. there's no way to output an exact 320x288 image at 640x480 in fullscreen mode.

In any case, I can't wait for the new build to come out, this emulator is just amazing :)
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Re: Gambatte 0.4.1 released

Post by sinamas »

MrX_Cuci:
Qt version only supports ROM file argument.

kick:
I believe the (driver-specific) D3D bug is fixed in SVN already.
The other stuff sounds like buggy CPU timers or buggy audio/video drivers.
I'll see if I can get some compat testing done before the next release (although there's a limit to the amount of driver bugs I'm willing to work around).
Hint: Listing your hardware specs will increase the probability that this gets fixed.
Keyboard input while not focused probably won't happen. Gamepad input might.

Gobo:
Non-full screen scaling factors in full screen mode isn't something I care about, so don't get your hopes up on that one. There's always windowed mode :P
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Re: Gambatte 0.4.1 released

Post by kick »

sinamas wrote:The other stuff sounds like buggy CPU timers or buggy audio/video drivers.


More info about the 'other stuff':

Bug #1 (the freezing issue):

Try this: Load Kirby's Dreamland 2 (U) [!], complete one level and then load Tetris DX (U) [!]. The emulator should stop responding (white screen) just after the first info screen fades out. If this doesn't trigger the freeze bug for some reason, continue with Tetsis DX: play a game of Tetris in Marathon Mode, then load Kirby's Dreamland 2 again, play one level and load Tetris DX again. Repeat until the bug occurs.

Bug #2 ('mangled' graphics in Direct3D mode):

Strangely, this issue doesn't happen with BGB. Gambatte is the only GB emulator affected by this glitch.
Note: This is with an ATI card, using the latest drivers (Catalyst 11.2 - Feb 2011).

Bug #3 (control assignment issue):

There's no wait period when assigning GB controls to gamepad buttons and axes. It's almost impossible to assign the directional controls to an analog stick, for example. Just a slight movement of the stick is enough to set multiple/all controls to the same axis.

Keyboard input while not focused probably won't happen. Gamepad input might.


Gamepad input in the background would be a great addition (setting this option should also disable the auto-mute 'feature' when the window loses focus) :)
Have a nice kick in da nutz @~@* c//
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Re: Gambatte 0.4.1 released

Post by sinamas »

kick wrote:
sinamas wrote:The other stuff sounds like buggy CPU timers or buggy audio/video drivers.


More info about the 'other stuff':

Bug #1 (the freezing issue):

Try this: Load Kirby's Dreamland 2 (U) [!], complete one level and then load Tetris DX (U) [!]. The emulator should stop responding (white screen) just after the first info screen fades out. If this doesn't trigger the freeze bug for some reason, continue with Tetsis DX: play a game of Tetris in Marathon Mode, then load Kirby's Dreamland 2 again, play one level and load Tetris DX again. Repeat until the bug occurs.

Nice. I pulled it off on my first attempt. It had actually already been fixed (indirectly) in my local branch, but hasn't been commited to SVN yet. It's got nothing to do with quad cores or windows 7 (unfortunately).

kick wrote:Bug #2 ('mangled' graphics in Direct3D mode):

Strangely, this issue doesn't happen with BGB. Gambatte is the only GB emulator affected by this glitch.
Note: This is with an ATI card, using the latest drivers (Catalyst 11.2 - Feb 2011).

This is the one I referred to as probably already fixed in SVN. Which issue did you think I referred to?

kick wrote:Bug #3 (control assignment issue):

There's no wait period when assigning GB controls to gamepad buttons and axes. It's almost impossible to assign the directional controls to an analog stick, for example. Just a slight movement of the stick is enough to set multiple/all controls to the same axis.

I'll have a look at this.

kick wrote:
Keyboard input while not focused probably won't happen. Gamepad input might.


Gamepad input in the background would be a great addition (setting this option should also disable the auto-mute 'feature' when the window loses focus) :)

Auto-mute? I've only gotten that if I set audio engine to DirectSound and disable global buffer, IIRC. Any reason not to use WASAPI on windows 7?
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Re: Gambatte 0.4.1 released

Post by kick »

sinamas wrote:Auto-mute? I've only gotten that if I set audio engine to DirectSound and disable global buffer, IIRC. Any reason not to use WASAPI on windows 7?


Yeah, that's the setting I'm using at the moment (DirectSound, 96000Hz, Global buffer OFF)

I can't use WASAPI output with the kX Project drivers - exclusive mode doesn't work, shared mode works only with the low-quality AC3 output at 16bit / 48kHz. I use the WaveHQ output (24bit / 96kHz / 8ch) for [almost] everything.

Any plans for XAudio2 support ?
Have a nice kick in da nutz @~@* c//
grinvader
ZSNES Shake Shake Prinny
Posts: 5626
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: Gambatte 0.4.1 released

Post by grinvader »

GBC emulator
kick wrote:96kHz

obligatory chuckle

never mind me, please proceed right ahead
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)

Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Re: Gambatte 0.4.1 released

Post by kick »

@grinvader:

96kHz = direct output, bypasses the shitty resampling

If the card didn't do the double resampling at 48kHz, I'd use that seting instead :)
Last edited by kick on Sat Feb 26, 2011 5:38 pm, edited 2 times in total.
Have a nice kick in da nutz @~@* c//
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Re: Gambatte 0.4.1 released

Post by sinamas »

While the wave hq output may allow you to bypass the hardware DSP, using DirectSound instead of WASAPI means that you pass through an additional software DSP layer instead.

DirectSound in Vista/7 means additional buffering/latency and that less precise statistics are reported back to gambatte for audio/video timing.

I'm not convinced that XAudio2 has any benefit over DirectSound for streaming.

The only benefit of 96 kHz in gambatte is that it allows the resampling to take short cuts, since it has a longer transition band above 20 kHz to place noise in (yeah I put noise there as you're not gonna hear that anyway). It also means that using lower quality software resampling will be less noticeable, because the aliasing isn't as concentrated into the audible band.

24 bit has no benefit, as gambatte outputs 16 bit samples anyway.

Are you sure that only shared mode works with the AC97 output? Because that's not expected behavior. Exclusive mode allows even more precise statistics to be reported back to gambatte, but then of course gambatte hogs the device.

I don't think you should consider quality a major factor in which audio engine/output you use, as it's not going to be noticeable anyway. The "horrible desyncs", that you didn't bother to explain, may be related to your combination of audio settings and audio drivers.
Post Reply