bsnes v0.040 released

Archived bsnes development news, feature requests and bug reports. Forum is now located at http://board.byuu.org/
Locked
byuu

bsnes v0.040 released

Post by byuu »

http://byuu.org wrote:bsnes v0.040 released

Too much to really name. The biggest news is that the entire user interface has been re-written from scratch. It is now far more polished and professional. To name one example; the cheat code editor now has checkboxes in the list to quickly toggle codes on an off, there is now a global hotkey to toggle all cheat codes, and each cheat code can contain multiple individual Game Genie or Pro Action Replay codes, allowing easy grouping of multi-part codes.

You'll also notice new artwork: a logo created by Derrick Sobodash (note that the logo contest from below is still active — if someone can design a better logo, it can appear in v041), and a new photo-realistic SNES controller graphic by FirebrandX.

I was finally able to utilize MinGW's profile-guided optimizations, which means this release is approximately ~12% faster than v039.

And emulation itself was even improved(!), such as with Jonas Quinn's fix for a sprite overflow bug.

There were many other changes as well: Linux users will be happy to see RGB overlay support for the X-Video driver, many will benefit from greatly enhanced warning messages and tooltips throughout the GUI, Windows users will now be able to access the menu without freezing emulation, etc etc.
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

I've been waiting for this day for a long time.
I forgive you for being a drunkard. :]
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

why is the audio default 48000hz and not 32000hz?
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
byuu

Post by byuu »

franpa wrote:why is the audio default 48000hz and not 32000hz?
Because 32000 freezes up some of the older AC'97 chipset drivers on Windows, and ALSA's simple API didn't work with it (we've since used the more complex one.)

And also partly because 48000 gives you more room to play with the resampler for video / audio sync. You can change it if you like, of course.
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

I can't run bsnes 40. Claims an invalid win32 app again. :(
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

download again, make sure the checksum matches. d07467c891572d2edfe0eab75653ac9b

Not sure if it is a md5 or crc or whatever.
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

Oh thanks! That did the trick. I've re-uploaded them to my site as well.
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip
byuu

Post by byuu »

Thanks, I'll update the links this evening.

Now, for the current release, shall we have some fun with Qt? :)

Make a new text document, and name it 'style.qss'. Put it in the same directory as bsnes. Now open it up with Notepad, and add the following:

Code: Select all

#backdrop {
  background: url("background.png");
}

//draw gradient fade behind settings window
#settings-window {
  background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 #00c0ff, stop: 1 #004060);
}

//make the list controls translucent (so you can see the fade above)
QListWidget, #settings-window QTreeWidget {
  background: rgba(255, 255, 255, 128);
}

//for FitzRoy, completely hides panel titles
QLabel.title {
  font: 0pt 'Verdana';
  margin: -5px;
}
Point the url("") at any image file, it can be an absolute path or relative to the QSS / binary path. Make sure it's a PNG because JPEG is acting screwy. Preferably, size your image to match your desktop resolution, and design it like a Super Gameboy border.

Now run bsnes again :)

Go fullscreen (f11) and toggle off the bars (escape). It works in windowed mode, too, but obviously the image won't scale to fit your window. It is mapped 1:1, which is controlled by Qt and not me. Still, it can be a lot of fun.

I made this in about 30 seconds, but I'm sure you guys could come up with something much more creative:
http://img7.imageshack.us/img7/8297/46201867.jpg
Last edited by byuu on Mon Mar 09, 2009 3:47 pm, edited 1 time in total.
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

LOL, thats pretty cool.

I tested bsnes gui on my work laptop and everything seems to work, obviously i do not have any games here so i cannot test that part.
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

Congrats byuu, I'll check this out as soon as I have some free time. Good work!
I bring the trouble.
Turambar
Rookie
Posts: 12
Joined: Mon Jun 04, 2007 5:56 pm

Post by Turambar »

A great release, thank you.

Everything seemed to work fine so far. I even tried profile guided optimisation for the first time, and I too got about 12% faster build. I used GCC 4.1.2. The resulting binary was also 192 kiB smaller. Pretty neat.

I noticed a few possible improvements too. First let's see what optipng -o7 did to the images in the data directory.

Code: Select all

** Processing: bsnes.png
...
bsnes.png is already optimized.

** Processing: joypad.png
...
Output file size = 179991 bytes (14006 bytes = 7.22% decrease)

** Processing: logo.png
...
Output file size = 16759 bytes (5170 bytes = 23.58% decrease)
That isn't really much, but it cuts down the size of the binary, so less bandwidth gets used. It's more professional too.

Before you, byuu, update any packages, please see this image: http://www.turambar.org/fileet/bsnes_v40.png.

As you can see the joypad image doesn't fit with the background colour. Is it an option to apply transparency to the image? Then the CSS styled gradient is just ugly, really. Finally at the top of the image you can see that the program icon is a mess. It looked good when the hiro library was still used. I apologize if any of these problems occur because I still use Qt 4.4.2. Qt 4.5 is still not in the stable branch.

The one who guesses who the girls in my desktop background are, gets a cookie. That's some hard task.
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

Yay marquee themes!

I just finished one I made based on Chrono Trigger's menu graphics. I made it for 1680x1050 fullscreen with no aspect correction. Here's a smaller preview of how it looks:

Image
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

This command could lead to an even smaller file:

Code: Select all

-zc1-9 -zm1-9 -zs0-3 -f0-5
On top of the results the file size could be reduced even further with:

http://advancemame.sourceforge.net/comp-readme.html

Use command -4

PS, i suggest waiting with this until the final graphic and logo are done, as it could take a few hours with the above settings.
Last edited by tetsuo55 on Mon Mar 09, 2009 4:26 pm, edited 1 time in total.
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

Turambar wrote: As you can see the joypad image doesn't fit with the background colour. Is it an option to apply transparency to the image?
I would need to do that myself. Byuu might screw up the edges around the controller, but I can do it easily enough from the render output.

Edit: Transparency can only be done in 256-color mode, which makes the controller look like crap around the buttons. The other solution I could offer is to make the background match the window, but that assumes the window color is universal of course.
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

FirebrandX wrote:Transparency can only be done in 256-color mode
No alpha transparency? :shock:
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

It can't do an 8-bit alpha channel? Presumably with no blurring there should be a one pixel thick edge with partial transparency - the rest should be either fully transparent or fully opaque. My artistic skill is zero, but I experimented a little with applying a transparency mask in the GIMP a little while ago - it might be possible (if a pain) to do it by hand.

I suppose an external program could do it if you provided a very high res silhouette.. (i.e. white on black)
Jipcy
Veteran
Posts: 768
Joined: Thu Feb 03, 2005 8:18 pm
Contact:

Post by Jipcy »

FirebrandX wrote:Edit: Transparency can only be done in 256-color mode
Wtf are you serious?

170386 bytes:
Image

20061 bytes:
Image
[url=http://zsnes-docs.sf.net]Official ZSNES Docs[/url] | [url=http://zsnes-docs.sf.net/nsrt]NSRT Guide[/url] | [url=http://endoftransmission.net/phpBB3/viewtopic.php?t=394]Using a Wiimote w/ emulators[/url]
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

I was talking about PNG format. AT least in my paint program, it claims only available in 256 color mode.
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip
byuu

Post by byuu »

I even tried profile guided optimisation for the first time, and I too got about 12% faster build. I used GCC 4.1.2. The resulting binary was also 192 kiB smaller. Pretty neat.
Yeah, quite nice that it finally works in MinGW. Hopefully GCC will enhance it greatly when they have link-time code generation for cross-object inlining and such. Visual C++ can get +~30% with PGO.
First let's see what optipng -o7 did to the images in the data directory.
Figured GIMP had good PNG compression. Alright, I'll use that. Really wanted to store the controller as a JPEG, but it won't show up with static linking on Windows. I even specify -qt-libjpeg to include the library, but it still falls back to some sort of plugin that only works when you also distribute the Qt DLLs.
Finally at the top of the image you can see that the program icon is a mess.
May be worth filing a bug report to the Qt devs about. Icon shows up for me in GNOME + Xfce. They probably just don't support your desktop environment properly.

Where bsnes.png is a 48x48 32-bpp image embedded via rcc:

Code: Select all

  app = new QApplication(argc, argv);
  app->setWindowIcon(QIcon(":/bsnes.png"));
The controller is embedded the same way and in the same format.
I would need to do that myself. Byuu might screw up the edges around the controller, but I can do it easily enough from the render output.
Don't like the idea of making the background transparent much. That's pretty much how I wanted the image to show up, but perhaps we could put a black border around it or something? I think it'd look worse that way myself.

It kind of sucks that FitzRoy's controller was only ~30kb, and this one is 170+kb. I really feel the image dimensions are too big, too. That capture window dwarfs the entire configuration panel :/

But yeah, my roommate couldn't even tell it wasn't real. That's amazingly awesome in itself. If it weren't for Nintendo putting AB and XY backward, I'd agree with FitzRoy to just exclude graphics there.

So ... I don't know. Plenty of time to figure it out now. Probably will slow down on release rate anyway, binaries are too big and not enough is changing now.
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

well if jpg ever gets working right, we can always do another version in that format. It would save a lot of room, and wouldn't screw up the buttons. on 256 color PNG, I tried all sorts of dithering settings, but nothing worked. It was just too low a color count.
Last edited by FirebrandX on Tue Mar 10, 2009 12:46 pm, edited 1 time in total.
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

Considering the executable is now about 4MiB, I don't think it's worth it to lose that much quality to compress the size of the image.
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

Just rend twice, once for the RGB and once for the A. Then merge the renderings.
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

I'm confused now: are you saying 3dsMax can't save a render with an 8-bit alpha channel in any file format that can be recognized by other programs? I'm sure PNG can do 32-bit RGBA.
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

No I mean I use paint shop pro to save in various formats, and from there it claims the transparency version has to be 256 color format.

It doesn't matter anyway since byuu wants to keep the backgound.
NES NTSC palette file:

http://www.firebrandx.com/downloads/fbx2pal.zip
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

I'd much rather define an appropriate background color than have it be the window theme. A background color also gives the image a frame, which explains to the mind why the controller cord is ending where it does. White is good and nuetral, but the imperfect angle is still bothersome. I think the shadows also end too abruptly and should diffuse out a little more. A lighter shade against white would also distinguish them more from the object. Right now, they're almost as dark as the cord and controller edge.
Locked