bsnes v0.039 released

Archived bsnes development news, feature requests and bug reports. Forum is now located at http://board.byuu.org/
Locked
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 »

Gil_Hamilton wrote:
adventure_of_link wrote:
Gil_Hamilton wrote:
Panzer88 wrote:it'd be a super famicom
No it wouldn't. Japan uses NTSC.
And even still:

1) PAL60 = NTSC (pretty much)
and 2) Europe called the SNES the Super Famicom IIRC.
PAL60 != NTSC. Sure, they have the same frame rate(unless you're in one of the truly bizarre nations that uses NSTC50), but that's a far cry from pretty much the same.
PAL60 also calls for 525 scan lines and 60Hz refresh..
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
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 »

one more thing: PAL60 also calls for the 29.97fps..
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

time to end some of this madness.

I live in PAL land, the snes was called: "Super Nintendo Entertainment System"

Back when i did not have a PAL60 capable display(which i bought for the PS1 with RGB scart) I could play any and all NTSC games using a region converter or backup-unit.

As the TV does not support 60hz in any way, this method must have forced th game to run in 50hz.

Normally when NTSC on PAL or PAL on NTSC is done the image is black and white, and often scrolling over the screen.

The games where however faster than PAL games, so i think that the game was being limited by the slower CPU and thus played at near PAL speeds, the DAC took care of the rest so the image looked okay.

Games like street fighter where a lot faster when running the NTSC version on a PAL console (about 10-20% faster)
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

[i]Have a nice kick in da nutz[/i] @~@* c//
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

fun trivia,

That game was included in the retail box, it was the last version of the snes to be available in europe.

(And i bought one for 20Euro way back!!, too bad it got stolen :'( )
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

I got mine with Yoshi's Island in Australia. Considering I was like 8 and my parents didn't know anything about NTSC or PAL either, I was very lucky.
byuu

Post by byuu »

Sigh, ran out of time to update locales again. But I got a good chunk of UI stuff added:

Image

Image

The listbox on the left stays the same size now, regardless of window size.

The settings menu is also in feature parity to v039 official, sans frameskip and fullscreen mode.

Also, be sure to play with style.qss. Guide is here. If anyone makes anything neat, feel free to post pics :D
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

The frame margins appear to have been lost from the conversion. You may have to set that to make it match the spacing between objects like before. Also, I hope there's going to be a way to remove that banner thing. It lowers list capacity at the previous window size for no benefit. I'd have to increase the height by 15% on all sections to compensate.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

adventure_of_link wrote:one more thing: PAL60 also calls for the 29.97fps..
But the colour burst isn't at the same frequency.

For any detail about all this stuff...
皆黙って俺について来い!!

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
byuu

Post by byuu »

Just my luck to have already hit a Qt bug. Most stylesheet properties break on subclassed widgets:

Code: Select all

#include <QApplication>
#include <QWidget>

//if you uncomment Q_OBJECT, the gradient fade effect will break
class MyWidget : public QWidget { /* Q_OBJECT */ };

int main(int argc, char *argv[]) {
  QApplication app(argc, argv);
  app.setStyleSheet("* { background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 #f8f8f8, stop: 1 #787878); }");
  MyWidget widget;
  widget.resize(640, 480);
  widget.show();
  return app.exec();
}

#include "test.moc"  //generate with moc test.cpp -o test.moc
Already been reported, but not acknowledged:
http://www.qtsoftware.com/developer/tas ... &id=235640

Have a workaround, but it severely limits what you can theme with the current WIP.
Also, I hope there's going to be a way to remove that banner thing.
Yes, style.qss:

Code: Select all

QLabel.title {
  font: 1px 'Verdana';
  margin-bottom: -10px;
}
The entire app should be 100% themeable.
Example: http://img259.imageshack.us/img259/1364/21082839um3.jpg

Also, fun stuff to do with the current WIP: run it with the following command line arguments:

bsnes -style cde
bsnes -style motif
bsnes -reverse
Dullaron
Lurker
Posts: 199
Joined: Mon Mar 10, 2008 11:36 pm

Post by Dullaron »

Wow that is neat byuu.
Window Vista Home Premium 32-bit / Intel Core 2 Quad Q6600 2.40Ghz / 3.00 GB RAM / Nvidia GeForce 8500 GT
deniseweird

Post by deniseweird »

Congratulations on discovering the lovely Qt toolkit, byuu! :D The GUI looks great.. how could you make it this quick?
ShadowFX
Regular
Posts: 265
Joined: Thu Jul 29, 2004 8:55 am
Location: The Netherlands

Post by ShadowFX »

Dutch translation for v0.039 ready:

DOWNLOAD!
[i]"Change is inevitable; progress is optional"[/i]
belegdol
Hazed
Posts: 68
Joined: Tue Dec 07, 2004 10:24 am

Post by belegdol »

byuu, since you are now using qt on all supported operating systems, would it be possible to change to qt .ts files for translation? This would allow translating bsnes with qt linguist (easier than with notepad) and also should allow to install multiple translations at once).
belegdol
Hazed
Posts: 68
Joined: Tue Dec 07, 2004 10:24 am

Post by belegdol »

Also, is it possible to build the latest wip with qt 4.4? It seems to fail to link on me (building under Fedora 10 x86_64):
g++ -O3 -fomit-frame-pointer -Ilib -DGZIP_SUPPORT -DJMA_SUPPORT -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 obj/adler32.o obj/compress.o obj/crc32.o obj/deflate.o obj/gzio.o obj/inffast.o obj/inflate.o obj/inftrees.o obj/ioapi.o obj/trees.o obj/unzip.o obj/zip.o obj/zutil.o obj/jma.o obj/jcrc32.o obj/lzmadec.o obj/7zlzma.o obj/iiostrm.o obj/inbyte.o obj/lzma.o obj/winout.o -s -lQtCore -lQtGui -lGL -lXv -lasound -lao -lopenal -lpulse-simple `sdl-config --libs`
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [build] Error 1
P.S.
Sorry for double-posting, but edit does not seem to work.
byuu

Post by byuu »

Been pretty busy, no changes. I'll try and get more done this weekend.
The GUI looks great.. how could you make it this quick?
Only the video panel is functional, and most of the code just hooks back into the core anyway. Rewriting the input config window is going to be a major pain.
This would allow translating bsnes with qt linguist (easier than with notepad)
I don't think Qt Linguist will be easier for anyone but Linux users :/
But who knows, maybe. My core uses all UTF-8, so I'm not fond of QString and tr. I know you can hook up default const char*->UTF-8->Unicode conversions and such, but they also don't have clean streaming.

Code: Select all

QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));

widget.setText(QString().append(tr("Contrast: ")).append(100 + contrast).append("%"));
//vs
class utf8 : public string { public:
  utf8& operator<<(const char *s) { return (utf8&)string::operator<<(s); }
  operator const QString() const { return QString::fromUtf8(*this); }
};

widget.setText(utf8() << tr["Contrast: "] << 100 + contrast << "%");
QDataStream doesn't cast to QString, QString lacks operator<<, and operator+ requires lots of allocations. All calls to .append() are going to perform costly UTF-8->UTF-16 conversions compared to one batch one with the utf8() method.

I also don't use Qt Designer for the UI, so I'm not sure how Qt Linguist would work.

I can't believe Qt went with 16-bit UCS-2 by default. Surrogate pairs defeat the whole purpose of it. Whereas UTF-8 requires almost no program modifications to work with Latin-1 applications (just avoid operator[]).

Anyway, we'll see.
Also, is it possible to build the latest wip with qt 4.4? It seems to fail to link on me
They're significantly different. Going to take me a while to get the Makefile working well on both at the same time. The header files are in all different paths, and you have to change the defines. Your error means you need to remove -DQT_NEEDS_MAIN. You also want to change the default driver names in ui/ui.cpp. Set them to "" or "OpenGL" / "X-Video" + "OpenAL" + "SDL".

I got it working, but the theme looked terrible on Xfce. Let me know how it goes on your side, please.
byuu

Post by byuu »

Well that wore me out ... the UI went from 45kb to 109kb in one night, with no copy/pasting.

New WIP:
- re-added the InputManager + InputDevicePool classes. The latter is very complicated, but impressive
- re-added Input Configuration Editor
- re-added Cheat Code Editor
- re-designed individual cheat code editor
- re-added Path Editor
- stopped subclassing QWidget w/Q_OBJECT to work around Qt stylesheet bug
- re-added controller port selections

Sorting by column header clicking is screwy. It has to be manually enabled, and the second you do that it re-orders everything. This is really bad when you want the default order, eg "up, down, left ..." or your default cheat ordering; so I had to leave it off. Would be too tacky to add a numeral ID column to work around that.

Seems Qt also has a ridiculously complex tree view (MVC-based), but thankfully they added a simplified version that works well enough, QTreeWidget. Only problem is I can't seem to make it hide the child expander space at the very left-most side. This creates an annoying little gap. Anyone know how to hide those with Qt?

Even got checkboxes inside the list to toggle cheat codes. Documentation could've been clearer there.

Speaking of which, I was able to use child nodes on the cheat code list to show each individual cheat code, but it just didn't look right to me. There was a ton of blank space on the sides. I can actually fill in multi-line descriptions as well here, but it still looks really tacky in my opinion.

Thought about using add code + append code + delete code and putting the textboxes back, but that just seems tacky and error prone, too. I'm not adding individual descriptions for each code sub-part.

Only way I can think to make it work that way would be to replace the multi-code method with a grouping affinity (eg group codes 1+3 into a set), but then we're getting really complex, with a minimum of 5-6 buttons on the window and 3 text boxes. I think the learning curve would be too high to be worth it.

So, I used the old method, but instead of a textbox to paste in codes, I went with a slightly less error prone method of a textbox for the description and a listbox for each code part. Threw in add / delete / delete all for the code list. Takes a bit longer if you're trying to copy/paste codes off the web, but the increased intuitiveness and consistency is worth it in my opinion.

New cheat code editor (description typo due to extreme fatigue)

There's a lot of rough edges and few safety checks, so if you try to break things you probably can.

Overall, really having fun with the Qt API. It can be awkward at times, but it's definitely the most straight-forward API I've seen so far.
Panzer88
Inmate
Posts: 1485
Joined: Thu Jan 11, 2007 4:28 am
Location: Salem, Oregon
Contact:

Post by Panzer88 »

I realize you already addressed the real fullscreen question byuu, but it just occurred to me is there no way to run bsnes fullscreen at the snes native resolution on my CRT? That is something I occasionally like to do with other emus, or maybe run it at double original resolution but still fullscreen.

Just asking because I'm sure I'm not the only one that likes to run low res content at an actual low resolution.
[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 »

Panzer88 wrote:I realize you already addressed the real fullscreen question byuu, but it just occurred to me is there no way to run bsnes fullscreen at the snes native resolution on my CRT?
The future is fixed pixel, so excuse me if I fart in CRT's general direction. Yes, we have to duplicate lines to simulate the aspect correction on this system. No, we cannot keep using CRTs forever to stretch pixels every which way but squarely and switch resolutions for every damn application. Blame Nintendo for choosing a native aspect radically different from the output aspect because they didn't want to spend $2 extra per system on a CPU the Genesis had a year before it came out.
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

FitzRoy wrote:
Panzer88 wrote:I realize you already addressed the real fullscreen question byuu, but it just occurred to me is there no way to run bsnes fullscreen at the snes native resolution on my CRT?
The future is fixed pixel, so excuse me if I fart in CRT's general direction. Yes, we have to duplicate lines to simulate the aspect correction on this system. No, we cannot keep using CRTs forever to stretch pixels every which way but squarely and switch resolutions for every damn application. Blame Nintendo for choosing a native aspect radically different from the output aspect because they didn't want to spend $2 extra per system on a CPU the Genesis had a year before it came out.
But.... the Genesis doesn't have square pixels either.

And it's the video chipset that defines the resolutions available, not the CPU.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

The "enabled" in the cheat code editor heading is not really necessary, is it? Makes the colun needlessly big.
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 »

creaothceann wrote:The "enabled" in the cheat code editor heading is not really necessary, is it? Makes the colun needlessly big.
I agree. The checkboxes are self-explanatory. Other than that, I think the editor looks good.
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

Now that we have themes, lets put in the AA driver.
rayno
New Member
Posts: 3
Joined: Mon Aug 15, 2005 6:24 pm

Post by rayno »

byuu:
Could it be possible, in any way, to make the auto-detection of the game region as an option? I know that there are only a handful of people who actually would need this feature, but I'm one of them :)
byuu

Post by byuu »

The "enabled" in the cheat code editor heading is not really necessary, is it? Makes the colun needlessly big.
80% of the bloated space is due to the child selector on the left I can't hide. But yeah, I'll take out the text to help a bit.

I'd really like to use child entries somewhere, but they just don't fit in with the design. Explained the cheat editor above. I could group each input device in the input config screen to remove the combo boxes, but the headers won't make sense for the parent items and the list will be kind of long.

Meh.
Locked