bsnes v0.039 released

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

bsnes v0.039 released

Post by byuu »

byuu.org wrote:It seems Nokia is releasing Qt 4.5 under the LGPL. How awesome! Its previous license forced me to write a UI wrapper around both the native Win32 API and GTK+, which resulted in aiming for the least common denominator for both platforms (eg no auto-resizing windows for GTK+ users, controls that are too tall for Windows, a dearth of advanced widgets such as checkbox lists, etc.)

Qt 4.5 should also come with QGtkStyle embedded, so said applications will look mostly native even on GNOME desktops. Native Windows, OS X, KDE and GNOME support with only one codebase is too tempting to pass up, so I'm planning on rewriting the bsnes user interface in Qt for the next release.

But before I begin, here's a new point release.

Changelog:

* Recovered ~10% speed loss from last release via S-CPU IRQ timing optimizations
* Implemented O(1) binary-heap priority queue for event scheduling
* Fixed a bug where BS-X slotted carts were never mapping SRAM
* Fixed a bug where invalid controller input was always being allowed
* Fixed all compilation warnings with GCC 4.3 and Visual C++ 9.0
* Added advanced options to control S-CPU ALU hardware delays
* S-RTC and SPC7110 timers updated to handle time_t overflow (Y2k38) gracefully
* Cheat codes can now have multiple codes per entry, and multiple lines per description
* Rewrote config file parser; removed config/ class from emulator core
* Windows: added 256x256 image to program icon set
* Linux: fixed Xorg keysym mapping, key names should show correctly in all cases now
* UI: updated video panel, added fullscreen-on-startup and NTSC merge fields options
* UI: simplified audio panel
* UI: boolean options on advanced panel can be toggled via double-click
* Lots of code cleanup, especially for S-CPU IRQ handling and nall template library
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

so do you plan to implement what you were talking about with Qt or is it too much of a loss/hassle for bsnes and/or it's users?

just wondering which way you were thinking at this current moment.
[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]
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

Putting it that way makes Qt sound a lot better.
byuu

Post by byuu »

Here's a proof-of-concept with Qt:

Code: Select all

http://byuu.cinnamonpirate.com/files/bsnes_qt_preview.tar.bz2
http://byuu.cinnamonpirate.com/temp/qtdlls.zip
Man, you can use HTML, including CSS style attributes -- even on labels. Wild stuff.
h4tred

Post by h4tred »

Not bad, liked what you did with the about box :)
Have any plans on how to do the config dialog? Gonna keep the dialog style you now have, or are you thinking a complete UI redesign? (I know the lib's gonna change, just curious on the design aspects :P)

Nice job with 0.39 btw. Played around with it and works extremely well on my E8400 (gonna be my default SNES emu from now on) under SP2 based XP.
Nekokabu
New Member
Posts: 5
Joined: Wed Jul 23, 2008 3:52 am
Location: Japan

Post by Nekokabu »

Japanese Localization File:
http://nekokabu.s7.xrea.com/locale.zip
英語苦手だっつーの!
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

The template is still v0.38, isn't it?
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
byuu

Post by byuu »

I updated the template file, but forgot to bump the version on the page, sorry.

Thanks for the update, Nekokabu! :)
Have any plans on how to do the config dialog?
Not yet. I'll probably stick with the list for now. I want to use tabs for per-filter settings, so using them for the panel probably wouldn't be good.
Nice job with 0.39 btw.
Many thanks :D
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

I'm getting 109 fps during the scrolling text story intro after the title screen to Link to the past. On a Q6600, 4-GB ram, Vista 64-bit, ATI Radeon 3850 HD.
85cocoa
Hazed
Posts: 55
Joined: Sat Jul 22, 2006 8:43 pm
Location: USA

Post by 85cocoa »

On http://byuu.cinnamonpirate.org/ , byuu wrote:Implemented O(1) binary-heap priority queue for event scheduling
I thought you said this idea didn't work out? Or is a "priority queue" not the same thing as a "delta queue"? What events exactly are being scheduled in this queue as of the 0.039 release?
[url=http://en.wikipedia.org/wiki/Pocky]Pocky[/url] & [url=http://en.wikipedia.org/wiki/Rocky]Rocky[/url]? [url=http://en.wikipedia.org/wiki/Pocky_%26_Rocky]Pocky & Rocky[/url]? [url=http://en.wikipedia.org/wiki/Sonic_the_Hedgehog_%28series%29#Animals.2FMobians]Pocky & Rocky[/url]?
Paratech
New Member
Posts: 3
Joined: Sat Aug 12, 2006 4:39 am

Post by Paratech »

Thank you for your continued work on the emulator. I really appreciate the ability to play Super Nintendo games on the PC.

:wink:
-Nintendo fanboy since 1994.
burning shadow
Rookie
Posts: 32
Joined: Wed Aug 25, 2004 1:55 pm
Location: spb, ru
Contact:

Post by burning shadow »

Thanks again for a new release! :)

In this release, though, I'm really missing "default" button in configuration. There are some advanced settings that, I believe, may change in the future, and I would like to be able to set them to default without deleting entire config file and recreating it from scratch. Same goes to audio and video tabs, would be nice to have "default" buttons there, especially on audio tab, with new frequency adjust slider. Cheers.
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

burning shadow wrote:Thanks again for a new release! :)

In this release, though, I'm really missing "default" button in configuration. There are some advanced settings that, I believe, may change in the future, and I would like to be able to set them to default without deleting entire config file and recreating it from scratch. Same goes to audio and video tabs, would be nice to have "default" buttons there, especially on audio tab, with new frequency adjust slider. Cheers.
I agree, I liked the asterisk and default button. Without the asterisk, you don't know by looking at an entry if it's been modified or not. And without a default button, you don't know what the default is to get back to it (unless it's boolean).
85cocoa
Hazed
Posts: 55
Joined: Sat Jul 22, 2006 8:43 pm
Location: USA

Post by 85cocoa »

Paratech wrote:Thank you for your continued work on the emulator. I really appreciate the ability to play Super Nintendo games on the PC.

:wink:
Seconded. However, I have noticed a couple of possible bugs:

1) In Goodbye, Anthrox (PD), just below the scrolling text at the bottom, there is supposed to be a line of symbols which look like c, i.e. the symbol for a subset, each 8x8 pixels large and scrolling along with the text. This is missing in 0.039 but was working correctly in all previous bsnes versions that were capable of running the demo. Nor is there any problem in Snes9x or ZSNES (so you may use them for comparison).
Image
Before you complain that "this doesn't matter because it's a PD ROM," recall that it's one of the ROMs you used to test emulation of the SNES hardware's Mode 7 accuracy limitations.

2) In RPM Racing, the first attract mode demo seems to be different from previous versions of bsnes. The track appears to be partially covered in water, and the demo seems to run until all four laps are exhausted (while normally it would end sometime in the first? lap, shortly after one of the cars explodes).
This is different behavior from an RPM Racing bug that arose earlier in the development of bsnes; note that in the present bug, the water does seem to actually behave like water, with the cars' tires making splashes, and the displayed track is correctly aligned to the car sprites.
Image
[url=http://en.wikipedia.org/wiki/Pocky]Pocky[/url] & [url=http://en.wikipedia.org/wiki/Rocky]Rocky[/url]? [url=http://en.wikipedia.org/wiki/Pocky_%26_Rocky]Pocky & Rocky[/url]? [url=http://en.wikipedia.org/wiki/Sonic_the_Hedgehog_%28series%29#Animals.2FMobians]Pocky & Rocky[/url]?
byuu

Post by byuu »

It's because I changed cpu.wram_init_value to save as decimal instead of hex. It was losing the old setting on upgrade. Oops.

Just delete the config file, or set cpu.wram_init_value to 85. If it's a huge problem, we can rename the setting to avoid that in the next version.

Took out the default button mostly out of apathy. I'll get it added back in here shortly.
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

Well, that was fun... editing a post doesn't work now and deleting it wipes out the entire thread.
byuu wrote:Took out the default button mostly out of apathy. I'll get it added back in here shortly.
The description part of the advanced section could also probably be removed. There isn't much room and the value names can be adequately descriptive. Here's what I came up with:

start_in_fullscreen_mode
show_advanced_options
autodetect_file_type
bypass_ups_hash_check
window_opacity
horizontal_aspect_ntsc
vertical_aspect_ntsc
horizontal_aspect_pal
vertical_aspect_pal
sepia_color_mode
grayscale_color_mode
inverted_color_mode
cpu_clock_rate_ntsc
cpu_clock_rate_pal
cpu_alu_mul_delay
cpu_alu_div_delay
cpu_wram_init_value
smp_clock_rate_ntsc
smp_clock_rate_pal
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

It strikes me that "show_advanced_options" throws a wrench in this plan, it's impossible to explain that mode and what it is hiding. If I were looking at that for the first time, I'd expect it to make the advanced section disappear.

Taking it out would simplify things greatly. Show the expansion port in the system menu at all times, then rename "Region" to "System Type" and put it next to Emulation Speed. Everything under the "System" menu represents a system setting, and region/revision selection never was one. It is an emulator setting for what system the emulator should be behaving as.

I'm actually surprised you support autodetection at all, a cartridge has no capacity to decide the system in which it's placed. It also makes all those cool warning screens impossible to see.
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

There is a point where usability meets accuracy. Yes, it should be possible to force stupid combinations, but the defaults should be sane.
byuu

Post by byuu »

New WIPs are mostly going to be Qt releases. I strongly recommend keeping the DLLs handy so they don't have to be downloaded all the time. I won't be including them in the WIP archives.

The config file will be written to the EXE directory for now until the rewrite is finished, so that current settings aren't lost.

Distribution of official releases would use one of the following:
- installer EXE / MSI
- ZIP archive w/DLLs included
- stand-alone EXE with DLLs embedded (may be tricky, but is doable)

We're going to have to wait for Qt 4.5 to get out of beta in March before we release this officially for obvious reasons.

Some nice things just so far:
- program icon detection is automatic, no more ugly icons on Win2k / Win7
- labels allow hyperlinks, about window can finally have a homepage link
- font selection is now trivial, showing off in the panel for now (not planning to keep the section titles, or at least not with that big of a font)
- windows can be dynamically resized now
- emulation doesn't freeze when you enter menus
- the odd gap on the left of listbox controls is gone
- free skinning support. The wood grain one is just crazy. Should definitely take advantage of that somehow

Some downsides that can probably be fixed:
- window seems to flicker when it gains / loses focus; hooking paintEvent + turning off AutoFill doesn't help. Something's still redrawing it
- resize isn't 100% perfect yet. Seems the API has trouble when you mess with setMinimumSize() and setGeometry() at the same time
- the full-API mode file dialogs don't seem to be using the OS native one. Though they're arguably better than the native ones, at least in GTK+'s case.
I'm actually surprised you support autodetection at all, a cartridge has no capacity to decide the system in which it's placed.
Really? I figured nobody cared about those "wrong region" screens, and would prefer auto-detect for ease of use. I know I wouldn't want to manually change that option myself all the time. I already have to do that for video sync enable.
byuu

Post by byuu »

Nekokabu wrote:Japanese Localization File:
http://nekokabu.s7.xrea.com/locale.zip
Hmm ... it seems this file was missing the new cheat editor window strings, so I marked it as v038-039 on the webpage. Hope you don't mind. It's only a few small strings, so it's nothing to worry about. Thanks again for making it :D
h4tred

Post by h4tred »

Distribution of official releases would use one of the following:
- installer EXE / MSI
- ZIP archive w/DLLs included
- stand-alone EXE with DLLs embedded (may be tricky, but is doable)
Go with NSIS for installers. MSI installers are too tacky with thier Windows Installer dependancies. Plus, they are less bloated. And allow for custom scripting (if you want to allow for automatic downloading of extra files, etc, etc...).
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

byuu wrote:
I'm actually surprised you support autodetection at all, a cartridge has no capacity to decide the system in which it's placed.
Really? I figured nobody cared about those "wrong region" screens, and would prefer auto-detect for ease of use. I know I wouldn't want to manually change that option myself all the time. I already have to do that for video sync enable.
it could be a checkbox that is already checked but can be unchecked, or a non UI switch at the least.
[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]
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

henke37 wrote:There is a point where usability meets accuracy. Yes, it should be possible to force stupid combinations, but the defaults should be sane.
Autodetecting the system from the rom header has as much legs as autodetecting the board from the rom header. They should both be wiped out. If I made a homebrew game and had no region in the header, would it even work in bsnes right now? I wouldn't consider it more annoying, either, to have to set this. Auto-detect actually makes more sense as a developer option than a user option. It's the devs and testers who are loading lots of games indiscriminately. A real user probably plays 5 different games a month and PAL games without superior NTSC counterparts are a small fraction of games. I don't think people are switching between PAL and NTSC games with such frequency that an autodetect option saves them something. Compared to the hoops emulators like Nestopia and Nintendulator make me jump through, this is truly insignificant.

Anyways, this has nothing to do with the issue of having hidden options begetting an advanced option begetting an entire column to address the fact that the advanced option can't be sufficiently descriptive to tell users what it hides. And for what? Showing them doesn't harm anything, if anything it informs people that, yes, the system had an expansion port and the BS-X was the only thing made for it. So what, we've made users smarter.
byuu wrote:Some nice things just so far:
I'm already impressed, it fixed the 16x16 icon resampling issue, too, and you'll probably be able to bold notes now. If you ever did an install/uninstall exe, wouldn't it be nice to specify single user mode (cfg location)?
Turambar
Rookie
Posts: 12
Joined: Mon Jun 04, 2007 5:56 pm

Post by Turambar »

I just tried to compile the latest WIP, but it failed. Obviously it was because of Qt. Perhaps I'm doing something wrong, but anyway I'll ask.

Code: Select all

g++ -O3 -march=athlon64 -msse3 -fomit-frame-pointer -Ilib -o../bsnes obj/main.o obj/libco.o obj/ruby.o obj/libfilter.o obj/string.o obj/reader.o obj/cart.o obj/cheat.o obj/memory.o obj/smemory.o obj/cpu.o obj/scpu.o obj/smp.o obj/ssmp.o obj/sdsp.o obj/ppu.o obj/bppu.o obj/snes.o obj/bsx.o obj/srtc.o obj/sdd1.o obj/spc7110.o obj/cx4.o obj/dsp1.o obj/dsp2.o obj/dsp3.o obj/dsp4.o obj/obc1.o obj/st010.o -s -lQtCore -lQtGui -lGL -lXv -lasound -lao -lopenal `sdl-config --libs`
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtCore
Ok, I'm missing something related to QtCore. I then tried to install package qt-core (I'm using Gentoo) which wanted qt-gui which in turn needed qt-dbus. At this point I stopped because I couldn't figure out why bsnes would need dbus. I want to keep my Qt install minimal, and my package manager didn't require me to compile anything but the package qt. I'm asking if all those extra packages are really necessary just for bsnes.

There are other problems too. It would really suck if you, byuu, would release bsnes with Qt GUI immediately after Qt 4.5 is released. As for now latest stable Qt package in Portage is 4.3.3 and it will take some time to 4.5 hit the stable branch. I don't want to install any unstable packages without a good reason. I guess everything could work fine with an older version, but wouldn't it create some problems with the licensing? Qt 4.3.3 is still GPL.

By the way I got some warnings too:

Code: Select all

---

ui/utility/utility.cpp: In member function ‘void Utility::resizeMainWindow(unsigned int)’:
ui/utility/utility.cpp:12: warning: converting to ‘unsigned int’ from ‘double’
ui/utility/utility.cpp:14: warning: converting to ‘unsigned int’ from ‘double’

---

lib/ruby/audio/openal.cpp: In member function ‘void ruby::pAudioOpenAL::update_latency()’:
lib/ruby/audio/openal.cpp:101: warning: converting to ‘unsigned int’ from ‘double’
lib/ruby/ruby_audio.cpp: In member function ‘uintptr_t ruby::AudioInterface::get(ruby::Audio::Setting)’:
lib/ruby/ruby_audio.cpp:25: warning: converting to ‘uintptr_t’ from ‘double’
lib/ruby/ruby_audio.cpp:26: warning: converting to ‘uintptr_t’ from ‘double’
lib/ruby/ruby_audio.cpp: In member function ‘void ruby::AudioInterface::sample(uint16_t, uint16_t)’:
lib/ruby/ruby_audio.cpp:87: warning: passing ‘double’ for argument 1 to ‘int nall::sclamp(int) [with int bits = 16]’
lib/ruby/ruby_audio.cpp:88: warning: passing ‘double’ for argument 1 to ‘int nall::sclamp(int) [with int bits = 16]’
lib/ruby/ruby_audio.cpp:107: warning: passing ‘double’ for argument 1 to ‘int nall::sclamp(int) [with int bits = 16]’
lib/ruby/ruby_audio.cpp:108: warning: passing ‘double’ for argument 1 to ‘int nall::sclamp(int) [with int bits = 16]’

---
h4tred

Post by h4tred »

I guess everything could work fine with an older version, but wouldn't it create some problems with the licensing?
That's exactly the problem: Damn GPL licensing.[/code]
Locked