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
byuu

Post by byuu »

DancemasterGlenn wrote:In my 'nvidia settings' I have it set to 60, but everywhere else on my computer (screen resolution preferences in ubuntu and this emulator, at least) I've only got 50 and 94.
That drove me crazy. For a long while I kept trying to force modelines to get 60hz, because xrandr kept telling me I was running at 50hz. I knew that wasn't true, but it annoyed me.

Turns out it's something screwy the binary-blob nvidia driver does to enable twinview support ... so your refresh rates will appear absolutely wrong everywhere else. But you really are running at what nvidia-settings says you are. Gotta loved closed source software.
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

DancemasterGlenn wrote:
X11 is very unlikely to wait for vblank before blitting/buffer swapping. Without that you're generally bound to see some tearing.
I switched over to OpenGL and clicked the sync to vblank option, but I still seem to be getting tearing. I think that's supposed to happen, though... My only two frequencies I can set for my monitor are apparently 50Hz and 94Hz? Weird. In my 'nvidia settings' I have it set to 60, but everywhere else on my computer (screen resolution preferences in ubuntu and this emulator, at least) I've only got 50 and 94.

*shrug*

As to the fullscreen stuff, it must be something on my end, possibly a Qt bug as you said, I was pretty much only trying it for the sake of trying it, so no biggie.
Ubuntu has a fair share of bugs,even in the release version.
Looks like the monitor or videocard detection is flawed.
ex. I can't set anything higher than 1280x1024.can't get those OpenSource Radeon drivers working,just fglrx.No support for >85Hz refresh rates.

Try Kubuntu for a change.Even though it's less stable than the Gnome-based Ubuntu,the display detection is much better.
With Kubuntu,on first bootup the screen res defaults to 1792x1344 (now that's much better) and refresh rates >85Hz are available even with the fglrx driver.

Another thing to try is changing the monitor type in Ubuntu. It unlocked all hi-res modes (even those such as 2048x1536,2560x1600,...),except for the higher refresh rates.
[i]Have a nice kick in da nutz[/i] @~@* c//
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

byuu wrote:
DancemasterGlenn wrote:In my 'nvidia settings' I have it set to 60, but everywhere else on my computer (screen resolution preferences in ubuntu and this emulator, at least) I've only got 50 and 94.
That drove me crazy. For a long while I kept trying to force modelines to get 60hz, because xrandr kept telling me I was running at 50hz. I knew that wasn't true, but it annoyed me.

Turns out it's something screwy the binary-blob nvidia driver does to enable twinview support ... so your refresh rates will appear absolutely wrong everywhere else. But you really are running at what nvidia-settings says you are. Gotta loved closed source software.
Haha, good to know. Thank you byuu!

Also, honestly, I've tried kubuntu twice, and it freaks the shit out of me (wow, even I think that's really weird). there's so much to customize that it just blows my mind. I even got it looking pretty sweet about 2 weeks ago when I tried it out again... but I went back to plain old ubuntu. Just a personal preference, it has little stupid quirks, but I love using it anyway.
I bring the trouble.
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

odd, if you want to talk about a switch I just switched to kubuntu with no linux or any background whatsoever but it really isn't that big of a deal.

I felt I really should after all the good things I heard about KDE and I haven't been let down yet. Can't wait till 4.0
[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]
vigi_lante
Rookie
Posts: 37
Joined: Mon Nov 15, 2004 5:05 am

Post by vigi_lante »

I was about to ask for a option to turn off the stretching in fullscreen mode. But it looks like if you use a resolution above 640x480 (like me), and select "Keep aspect ratio" , "Only scale by integer factor" and "Video filter: None" - the result is the same. Could you confirm that for me ? Thanks.
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

"Keep aspect ratio" maintains the 10:9 width:height ratio of the Game Boy lcd when scaling video output, as long as you're using a resolution with square pixels. "Only scale by integer factors" only scales the 160x144 (or the video filter output resolution, if a video filter is used) video output by integer multiples, avoiding aliasing when there's no bilinear filtering or similar applied by the video engine (this is neglible at high resolutions).
blargg
Regular
Posts: 327
Joined: Thu Jun 30, 2005 1:54 pm
Location: USA
Contact:

Post by blargg »

sinamas wrote:Only scale by integer factors" only scales the 160x144 (or the video filter output resolution, if a video filter is used) video output by integer multiples, avoiding aliasing when there's no bilinear filtering or similar applied by the video engine (this is neglible at high resolutions).
So in other words, enabling this and displaying at less than 960x720 results in the Game Boy pixels appearing as square on screen?
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

so wait, do we want to keep it below 960x720 then? or keep it above?
[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 »

Width and height are always scaled by the same integer factor, so it doesn't matter if the resolution is above or below 960x720. "Only scale by integer factors" can't be selected unless "Keep aspect ratio" is selected too.

Code: Select all

int scale_factor = min(max_out_width / in_width, max_out_height / in_height);
scaled_width = in_width * scale_factor;
scaled_height = in_height * scale_factor;
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

byuu wrote:
DancemasterGlenn wrote:In my 'nvidia settings' I have it set to 60, but everywhere else on my computer (screen resolution preferences in ubuntu and this emulator, at least) I've only got 50 and 94.
That drove me crazy. For a long while I kept trying to force modelines to get 60hz, because xrandr kept telling me I was running at 50hz. I knew that wasn't true, but it annoyed me.

Turns out it's something screwy the binary-blob nvidia driver does to enable twinview support ... so your refresh rates will appear absolutely wrong everywhere else. But you really are running at what nvidia-settings says you are. Gotta loved closed source software.
I had a quick look at this issue, and it turns out you can disable this annoying behavior by setting the X configuration option "DynamicTwinView" to FALSE. Simply adding the following line to the "Device" section of your xorg.conf should get rid of it.

Code: Select all

Option "DynamicTwinView" "0"
As long as you're not using multiple monitors through TwinView there shouldn't be any problems. Correct reporting of refresh rate is pretty much required for sync to vblank to function properly.
byuu

Post by byuu »

sinamas wrote:As long as you're not using multiple monitors through TwinView there shouldn't be any problems. Correct reporting of refresh rate is pretty much required for sync to vblank to function properly.
Do you have more information on why proper refresh rate reporting is required? Eg, what API requires it? Xv, OpenGL 2, SDL?

So far, the only X API I have that can sync to vblank is Xv, which has sketchy support at best. Once again, the nvidia driver has hacks. This one completely ignores the Xv vblank sync option when compositing is enabled.
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

I meant Gambatte Qt requires it, since it only enables sync to vblank for certain refresh rates (currently 60, 119 and 120 Hz modes in the OpenGL engine and 60 Hz modes in the DirectDraw engine). Sync to vblank in this case means syncing the emulation speed to number of vblanks passed (as well as trying to update the display during vblank) rather than to more precise general timers.

Decent Xv drivers tend to update during vblank without blocking. Others block only if the previous frame hasn't been displayed yet (usually a SYNC_TO_VBLANK attribute needs to be set). Both cases seem to work ok generally in Gambatte (in my experience), but I guess the second case could get ugly if the refresh rate is really low. I don't bother setting those kinds of attributes in the Xv engine, but leave it up to the user to do so manually. I imagine movie players will break too if an Xv driver always blocks waiting for vblank.

It's probably possible to add a sync to vblank option for Xv ports with the XV_SYNC_TO_VBLANK attribute. As long as it's optional a few drivers being broken isn't really that much of an issue I think. You may want to reset the attribute to it's original value on exit to avoid breaking other apps.
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

sinamas wrote:
byuu wrote:
DancemasterGlenn wrote:In my 'nvidia settings' I have it set to 60, but everywhere else on my computer (screen resolution preferences in ubuntu and this emulator, at least) I've only got 50 and 94.
That drove me crazy. For a long while I kept trying to force modelines to get 60hz, because xrandr kept telling me I was running at 50hz. I knew that wasn't true, but it annoyed me.

Turns out it's something screwy the binary-blob nvidia driver does to enable twinview support ... so your refresh rates will appear absolutely wrong everywhere else. But you really are running at what nvidia-settings says you are. Gotta loved closed source software.
I had a quick look at this issue, and it turns out you can disable this annoying behavior by setting the X configuration option "DynamicTwinView" to FALSE. Simply adding the following line to the "Device" section of your xorg.conf should get rid of it.

Code: Select all

Option "DynamicTwinView" "0"
As long as you're not using multiple monitors through TwinView there shouldn't be any problems. Correct reporting of refresh rate is pretty much required for sync to vblank to function properly.
My xorg.conf is probably way bigger than it needs to be... I have 3 "device" sections?

Code: Select all

Section "Device"
	Identifier	"Failsafe Device"
	Driver		"nvidia"
	Vendorname	"NVIDIA"
	Boardname	"NVIDIA GeForce 6 Series"
	Busid		"PCI:1:0:0"
	Screen	0
	Option		"AddARGBVisuals"	"True"
	Option		"AddARGBGLXVisuals"	"True"
	Option		"NoLogo"	"True"
EndSection

Section "Device"
	
	# 
	Identifier	"device1"
	Driver		"nv"
	Vendorname	"NVIDIA"
	Boardname	"NVIDIA GeForce 6 Series"
	Busid		"PCI:1:0:0"
	Screen	1
EndSection

Section "Device"
	Identifier	"Videocard0"
	Driver		"nvidia"
	Vendorname	"NVIDIA Corporation"
	Boardname	"GeForce 6600"
EndSection
Which one should I add the option to? I'm assuming the one that already has "option"s in it, but I just want to be sure.
sinamas
Gambatte Developer
Gambatte Developer
Posts: 157
Joined: Fri Oct 21, 2005 4:03 pm
Location: Norway

Post by sinamas »

DancemasterGlenn wrote:Which one should I add the option to? I'm assuming the one that already has "option"s in it, but I just want to be sure.
The one that's used in the relevant screen section, or just add it to the two with 'Driver "nvidia"' in them.
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

sinamas wrote:
DancemasterGlenn wrote:Which one should I add the option to? I'm assuming the one that already has "option"s in it, but I just want to be sure.
The one that's used in the relevant screen section, or just add it to the two with 'Driver "nvidia"' in them.
I could've sworn I replied to this, but yes, that did fix my refresh rate options, and also my vertical sync problems in gambatte. My actual Nvidia settings (in its separate config menu) can no longer be tweaked...
Unable to load X Server Display Configuration page:

Dynamic TwinView is disabled on screen 0.
... but they're already exactly how I want them, so I couldn't care less.

Anyhoo, I'm loving this emulator, and I can't wait for the next release.

EDIT: I really wanted to try and make the palette look like a classic game boy, and I found this wikipedia article about palettes: http://en.wikipedia.org/wiki/List_of_palettes

So I was just going to go into your palette editor and use the eyedrop tool to select each of the four shades of green in the picture in the article, but there doesn't seem to be an eyedrop tool... so I just had to eyeball it (am I just not seeing an eyedrop tool?). It's awesome, I definitely recommend others making their own classic palette. The ability to do so is a great feature, sinamas!
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

very cool, I remember asking for a classic palette color feature awhile ago but this is all that and more, plus as sinamas so nicely pointed out to me that the data itself wasn't that color, but just the screen, if you had plugged it into any other screen it would just appear black and white.
[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]
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

Unfortunately,the GB mono palette in that Wikipedia screenshot is far from accurate,just as the uploader of the image says in that article:

the colors are "simulated"

A much more accurate representation of the GB Mono palette would be something between my old 'DMG Close to Reality' palette from BGB [anyone remember this one? ;)]

DMG_Close_to_Reality.pal:

Code: Select all

[General]
Background0=11520838
Background1=7975533
Background2=2256735
Background3=534869
Sprite%2010=11520838
Sprite%2011=7975533
Sprite%2012=2256735
Sprite%2013=534869
Sprite%2020=11520838
Sprite%2021=7975533
Sprite%2022=2256735
Sprite%2023=534869

and the new DMG_2.pal I made a few days ago:

Code: Select all

[General]
Background0=12048458
Background1=8303207
Background2=2256735
Background3=469075
Sprite%2010=12048458
Sprite%2011=8303207
Sprite%2012=2256735
Sprite%2013=469075
Sprite%2020=12048458
Sprite%2021=8303207
Sprite%2022=2256735
Sprite%2023=469075


Now here's the Wikipedia_Green.pal for comparison:

Code: Select all

[General]
Background0=10206223
Background1=9153551
Background2=3170864
Background3=997391
Sprite%2010=10206223
Sprite%2011=9153551
Sprite%2012=3170864
Sprite%2013=997391
Sprite%2020=10206223
Sprite%2021=9153551
Sprite%2022=3170864
Sprite%2023=997391

Can you tell the difference? :)


Now for the other stuff (this is a suggestion):

* On a real Gameboy (DMG) you can easily see the spacing between each pixel of the LCD screen.It would be nice to simulate this with a filter.
The author of BGB planned to include this in the next release of BGB but sadly,BGB hasn't been updated in several years.

* He also planned to include a "contrast" control for the GB Mono screen (as in the real system).This would be nice to have as well (imagine using the mouse wheel for this)

Other plans were interlacing for the GBC screen (that option currently does nothing) and screen ghosting and latency.
[i]Have a nice kick in da nutz[/i] @~@* c//
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

those sound like some tight ideas.
[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]
Snark
Trooper
Posts: 376
Joined: Tue Oct 31, 2006 7:17 pm

Post by Snark »

kick wrote: Now for the other stuff (this is a suggestion):

* On a real Gameboy (DMG) you can easily see the spacing between each pixel of the LCD screen.It would be nice to simulate this with a filter.
The author of BGB planned to include this in the next release of BGB but sadly,BGB hasn't been updated in several years.

* He also planned to include a "contrast" control for the GB Mono screen (as in the real system).This would be nice to have as well (imagine using the mouse wheel for this)

Other plans were interlacing for the GBC screen (that option currently does nothing) and screen ghosting and latency.
I think I read certain GB games's effects sorta "used" the ghosting phenomena of the GB screen. Anyway, these are good suggestions.
Thristian
Hazed
Posts: 76
Joined: Tue Feb 07, 2006 11:02 am

Post by Thristian »

Out of curiosity, has anyone managed to build the gambatte_qt under OS X against the Mac port of Qt? gambatte_qt/src/src.pro seems to assume that OS X will use the "macx" portion of the file and ignore the "unix" portion, but that doesn't seem to be the case in practice - I'm having errors compiling x11getprocaddress.cpp (which from the name sounds like it shouldn't be included) and audioengines/ossengine.cpp (surprise! No Linux headers on OS X!)
DataPath
Lurker
Posts: 128
Joined: Wed Jul 28, 2004 1:35 am
Contact:

Post by DataPath »

gambatte_sdl compiles, and theoretically runs on, the Nokia N800 internet tablet.

I just installed the toolchain and built it - it builds without any changes.

What works:
  • gameboy games
    scaling
What doesn't:
  • graphics filters
Unsure:
  • performance - I ran it in an emulator
    sound - no sound hardware emulation
I ran it in the emulated scratchbox environment, and played Zelda - Link's Awakening DX for awhile.

None of the filters work, and I have some ideas as to why, but I haven't had any time yet to look at it.

All it really needs is a rom loader, some good defaults, fix the filters, and a debian package, and it will be ready to go on the Nokia N800.
Last edited by DataPath on Mon Nov 12, 2007 12:52 am, edited 1 time in total.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

I really love this emulator :D

I'm using r102, been getting this, wondering if it's normal:

Code: Select all

RESETTING COUNTERS!!!!!!!!!!!!!!!!111111111
RESETTING COUNTERS!!!!!!!!!!!!!!!!111111111
Would it be possible to disable screensaver while it's running? I was playing Yoshi, and was up to level 25 or so, when the screen saver came on, and I lost :(
No way to rewind either :(
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

Nach wrote:Would it be possible to disable screensaver while it's running?
Seconded. I wish all programs made that option available...
DataPath
Lurker
Posts: 128
Joined: Wed Jul 28, 2004 1:35 am
Contact:

Post by DataPath »

Nach wrote:I really love this emulator :D
Same here, but it's been really hit-and-miss with me - more than half my gba games it refuses to load, and the remainder I get a blank white screen from which it never progresses.

GB and GBC games have worked fine for me thus far.
Nach wrote:I'm using r102, been getting this, wondering if it's normal:

Code: Select all

RESETTING COUNTERS!!!!!!!!!!!!!!!!111111111
RESETTING COUNTERS!!!!!!!!!!!!!!!!111111111
I got that, too, while playing Zelda - Link's Awakening, but it didn't seem to correlate to any in-game problems.
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

DataPath wrote:
Nach wrote:I really love this emulator :D
Same here, but it's been really hit-and-miss with me - more than half my gba games it refuses to load, and the remainder I get a blank white screen from which it never progresses.

GB and GBC games have worked fine for me thus far.
I wasn't aware that this emulator handled GBA at all? From what I gathered it only should support GB/GBC games...
Post Reply