PDA

View Full Version : BSNES (rules)


JadussD
01-06-2006, 12:52 PM
Just a heads up to http://byuu.cinnamonpirate.com/?page=bsnescheck out</a> this awesome SNES emulator. It's a little threadbare in terms of bells and whistles, and I hear it has some problems with USB joysticks, and it's REAL slow, but if you have a really good computer and your joystick works with it, I think you may find a new favorite SNES emulator. Apparently it's focused on accuracy above all, which is nice to hear.
<P ID="signature"></P>

D--
01-06-2006, 03:04 PM
You don't need that fast of a computer. I run a Pentium M 2.0GHz and get 110% speed in bsnes if I disable frame limiting.
<P ID="signature"><hr>
Cinnamon Pirate.com (http://www.cinnamonpirate.com/)</P>

Dark Knight Kain
01-06-2006, 04:18 PM
It's too slow on my computer and it doesn't work with my controller (Which by some miracle decided to work again) but I really like this emulator's color. It's the first SNES emulator that replicates how it looks on an actual TV. I usually don't like using graphics filters but I like the way this one does it too.
<P ID="signature">---
-Dragonsbrethren</P>

D--
01-06-2006, 05:09 PM
> It's too slow on my computer and it doesn't work with my
> controller (Which by some miracle decided to work again) but
> I really like this emulator's color. It's the first SNES
> emulator that replicates how it looks on an actual TV. I
> usually don't like using graphics filters but I like the way
> this one does it too.

Have you seen blueMSX? It takes emulating how things look on a TV to a whole new level. It actually emulates 75-ohm coaxial and composite video line noise ...

http://www.bluemsx.com/features.html (check under blueTV)
<P ID="signature"><hr>
Cinnamon Pirate.com (http://www.cinnamonpirate.com/)</P>

Reaper man
01-06-2006, 06:04 PM
> Just a heads up to check out this awesome SNES emulator.

yeh I heard abut it on the ZSNES forums. Looks very promising. Hopefully the speed will improve a bit. To be honest, I believe all emulation authors should strive for accuracy like he is doing.
<P ID="signature"></P>

Dark Knight Kain
01-06-2006, 06:20 PM
> Have you seen blueMSX?

Yeah, I never played around with the TV controls though, they're really cool. Can you recommend some good MSX games?
<P ID="signature">---
-Dragonsbrethren</P>

Cornellius
01-06-2006, 07:17 PM
> You don't need that fast of a computer. I run a Pentium M
> 2.0GHz and get 110% speed in bsnes if I disable frame
> limiting.


I have a P4 1.7 Ghz. I'm about to try it.
<P ID="signature">http://img284.imageshack.us/img284/7617/guinessdrinker40fi.jpg
http://img368.imageshack.us/img368/3997/poker27ma.jpg</P>

byuu
01-06-2006, 11:20 PM
The next version allows multiple controllers to be used, should work with both analog and digital controllers, and allows calibration of thumb-stick sensitivity. A godsend for fighting games. Unless your controller is fucked, it should work fine.

Yeah, I like the color curve a lot myself. Check out the curve with true TV-like scanlines:
http://byuu.cinnamonpirate.com.nyud.net:8090/temp/hqscan.png
(Note: that image uses bicubic filtering and was generated in Photoshop, but the emu supports bilinear (or pyramidal / gaussian if your card actually supports it) with identical scanlines now)
It also does DirectDraw or Direct3D. D3D allows you to set the alpha level of scanlines, and also lets you choose any filter that your card supports (point and bilinear are all that's available, even on 7800 GTX / X1800XT cards, as far as I know).

I can't really do much about speed, but even a $100 processor off eBay can achieve 60fps with no frameskipping. If you don't want to upgrade to use bsnes, I understand. Hell, I still see people bitching that ZSNES runs too slowly on their P75's...
I plan to eventually write an article explaining why it takes 2ghz to emulate a system with a 2.68mhz processor accurately.

<P ID="signature"></P>

packardmelan
01-07-2006, 12:07 AM
Besides Metal Gear and Metal Gear 2?
<P ID="signature">http://www.sloganizer.net/en/http://www.sloganizer.net/en/style5,Packard.png</a></P>

Reaper man
01-07-2006, 02:04 AM
> I plan to eventually write an article explaining why it
> takes 2ghz to emulate a system with a 2.68mhz processor
> accurately.

I'd like to see that. I always thought that it took 10 times the power of the CPU you are emulating or something like that (ie a 266MHz CPU) in order to run a game at full speed. (at least that's what I heard)
<P ID="signature"></P>

D--
01-07-2006, 03:20 AM
> I'd like to see that. I always thought that it took 10
> times the power of the CPU you are emulating or something
> like that (ie a 266MHz CPU) in order to run a game at full
> speed. (at least that's what I heard)

Only if you use a lot of half-assed code hacks and only care about making games run, not emulating the actual hardware.

I think byuu's intent is for bsnes to be hardware accurate, so anything tested in bsnes will work on a real SNES. With Snes9x and ZSNES, most of the time, stuff written t work on them explodes on actual hardware (see the font in Ys IV, the earlier patch for Wonder Project J, our early work on Tekkaman Blade SNES, or the flame on the title screen of RPGOne's first Dragon Quest I&II patch).
<P ID="signature"><hr>
Cinnamon Pirate.com (http://www.cinnamonpirate.com/)</P>

Lenophis
01-07-2006, 03:56 AM
<blockquote><font class="small">In reply to:</font><hr>

You don't need that fast of a computer. I run a Pentium M 2.0GHz and get 110% speed in bsnes if I disable frame limiting.

<hr></blockquote>
And you are an idiot if you don't think "don't need a fast computer" is along the lines of two fucking gigahertz you moron. "Not a fast computer" is more like 300MHz. So, would you care to try again?
<P ID="signature"><center><img src=http://leno.hypher.net/images/slick.png border=0 title="How Slick are you?"> (http://slick.panicus.org)
Slickness factor of 10.</center></P>

JadussD
01-07-2006, 04:09 AM
> And you are an idiot if you don't think "don't need a fast
> computer" is along the lines of two fucking gigahertz you
> moron. "Not a fast computer" is more like 300MHz. So, would
> you care to try again?

Excuse me, but that was totally un-fucking-warranted. What the fuck is your problem?

I don't want to see shit like that again, thank you very fucking much.
<P ID="signature"></P>

packardmelan
01-07-2006, 04:10 AM
I have a 1.73 GHz Pentium M on my laptop and it runs okay. I can't find any of the standard cleanup/filter options on it, though, so it blurs a bit when I resize the image... which, frankly, sucks.
<P ID="signature">http://www.sloganizer.net/en/http://www.sloganizer.net/en/style5,Packard.png</a></P>

D--
01-07-2006, 05:57 AM
> I have a P4 1.7 Ghz. I'm about to try it.

Apologies, I just reread my original post. I don't get 110% speed. I get 110 fps, which is 180% speed.
<P ID="signature"><hr>
Cinnamon Pirate.com (http://www.cinnamonpirate.com/)</P>

D--
01-07-2006, 05:58 AM
> I have a 1.73 GHz Pentium M on my laptop and it runs okay. I
> can't find any of the standard cleanup/filter options on it,
> though, so it blurs a bit when I resize the image... which,
> frankly, sucks.

Filtering options aren't standard ...

His resize option doesn't do anything to actually enhance the image, it just uses the hardware scaling built into your graphics card. Blame them or ask for software filtering :-/
<P ID="signature"><hr>
Cinnamon Pirate.com (http://www.cinnamonpirate.com/)</P>

Lillymon
01-07-2006, 06:06 AM
> And you are an idiot if you don't think "don't need a fast
> computer" is along the lines of two fucking gigahertz you
> moron. "Not a fast computer" is more like 300MHz. So, would
> you care to try again?

Dude, are you living in a time-warp? I can easily remember when 500Mhz was fast. That was in 1999!
<P ID="signature"><marquee direction=left scrollamount=8><img src=http://home.graffiti.net/lillymon:graffiti.net/images/keletav.gif></marquee>
!luos ruoy tae lliw stelek ehT</P>

Lenophis
01-07-2006, 06:22 AM
<blockquote><font class="small">In reply to:</font><hr>

Dude, are you living in a time-warp? I can easily remember when 500Mhz was fast. That was in 1999!

<hr></blockquote>
The post was about the opposite of fast, aka "slow" or "slower than fast." I was asking about this very topic shortly after I made my post and bbitmaster came to the conclusion that "speed is relative." Given where applications and programs are in terms of speed, "not as fast" translates to about a 600MHz or so, but that ultimately depends and can widely vary. Saying that 2 GHz "isn't really that fast" doesn't fly, given the resources needed to run most programs.

Only most MMORPG's that are insanely graphics heavy require fast machines, otherwise everything else has a long ways to catch up.
<P ID="signature"><center><img src=http://leno.hypher.net/images/slick.png border=0 title="How Slick are you?"> (http://slick.panicus.org)
Slickness factor of 10.</center></P>

packardmelan
01-07-2006, 06:24 AM
> Filtering options aren't standard ...

I guess they're just put into nearly every emulator I play.
<P ID="signature">http://www.sloganizer.net/en/http://www.sloganizer.net/en/style5,Packard.png</a></P>

byuu
01-07-2006, 06:48 AM
2ghz Pentium IV :
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=6837109020
Price? $65. And I'm sure you can find a better deal. Yes, a 2ghz P4 is slow by today's standards.
And yes, 2ghz for an SNES emulator is excessive. I'm well aware of that.

Again, the filter options will be in the next version. It will basically use any hardware filtering your card supports, which is usually only point and bilinear.
Two reasons I don't add filters such as HQ2x: 1) The code is a mess, and I don't like messy code in my projects. 2) These filters are highly CPU-intensive. With a 1.5ghz requirement for 60fps, how much overhead do you think using HQ2x will add to that? Keep in mind that bsnes runs 10-20% faster simply by not copying the 256x223 rendered video output from system RAM -> video RAM (yet still rendering the image internally), and that HQ2x quadruples the amount of data needed to be sent each frame.
I won't even get into technical problems inherent to direct scaling filters such as aspect ratio correction, hires mode, and interlacing.

JadussD
01-07-2006, 11:00 AM
> I plan to eventually write an article explaining why it
> takes 2ghz to emulate a system with a 2.68mhz processor
> accurately.
>

For those curious, I looked at the source code and from what I can tell, the reason this emulator is so accurate is that it doesn't just emulate one instruction in the processor, then check the other elements in the system individually, it literally updates everything as it should be on each clock cycle, and individual CPU instructions can take up more than one clock cycle, so if you're not updating everything to where it should be on each clock cycle, like most emulators, it'll be a lot faster than what this emulator does, with some accuracy sacrificed. I wouldn't bitch about the speed people, there is no way this could be very much faster than it is. It's the price you pay for an ultra-accurate emulator.
<P ID="signature"></P>

(wraith_)
01-07-2006, 04:06 PM
Gotta hand it to you byuu, this is very nice.

Runs very well on my 2.2ghz Athlon 64.

After reading the other posts, I was surprised to see my USB sidewinder worked just fine!

And I love the color accuracy... can't wait to see it with TV scanlines.

Any plans for savestates (or did I just miss the options for it in my giddiness)?
<P ID="signature"><hr width=350 align=left>
http://donut.parodius.com/signature.gif</P>

Dark Knight Kain
01-07-2006, 07:56 PM
<blockquote><font class="small">In reply to:</font><hr>

Yeah, I like the color curve a lot myself. Check out the curve with true TV-like scanlines:
http://byuu.cinnamonpirate.com.nyud.net:8090/temp/hqscan.png

<hr></blockquote>
That looks great <img src=smilies/thumb.gif>

<blockquote><font class="small">In reply to:</font><hr>

I can't really do much about speed, but even a $100 processor off eBay can achieve 60fps with no frameskipping. If you don't want to upgrade to use bsnes, I understand.

<hr></blockquote>
If I was still into PC gaming chances are I would've already upgraded but now-a-days I just see it as a waste of money.
<P ID="signature">---
-Dragonsbrethren</P>

Disch
01-07-2006, 10:24 PM
> Yeah, I like the color curve a lot myself. Check out the
> curve with true TV-like scanlines:
> http://byuu.cinnamonpirate.com.nyud.net:8090/temp/hqscan.png

I dislike the black-line-every-other-line method of emulating TV scanlines -- mainly because it looks absolutly nothing at all like how a TV looks (yet strangely... people seem to think it does... *shrug*) Though that screen is significantly better than most (you seem to be doing some interpolation aside from just inserting black scanlines?)

There actually has been some work on the nesdev scene to produce an actual TV-esque image. I don't mean the tradtional crap scanline method -- I mean simulating genuine NTSC rastering techniques.

The image here is a good example of Blaster Master in an emu with such a feature

--edit-- removed and placed in a reply to this post -- wanted to upload as an attachment rather than drain blargg's bandwidth

I don't know of anything that's gotten closer to a true TV image.

The thread in question which discusses the methods used for rendering (and possibly some source links -- although I haven't followed the thread that closely) is here:

http://nesdev.parodius.com/bbs/viewtopic.php?t=871

Check that out if you're interested in putting in a TV filter in your emu -- as it's likely the best existing method -- or at least the right track to focus on.

Why anyone would want to toss out the sharp picture of a monitor and replace it with the dull, hazy picture of a TV is beyond me though. But to each his own.
<P ID="signature"></P>

Disch
01-07-2006, 10:27 PM
The previously mentioned NTSC TV filter in an NES emu (Blaster Master) :

http://www.zophar.net/wwwthreads/attachment.php?Cat=&Board=general&Post=279582

C:Serverxampphtdocszopharoldwwwthreadsattachmentsn tsc_nes.png

Disch
01-07-2006, 10:33 PM
> http://www.bluemsx.com/features.html (check under blueTV)

Doh! Wish I checked that before I made my post. Seems the boys at nesdev may have gotten the idea from there (or at least had the same idea).

Are there any full-size screenshots of that filter in action? The little itty-bitty clips they give in that section don't really give me a decent feel for it -- and I'm not about to download it just to check that.
<P ID="signature"></P>

byuu
01-08-2006, 01:50 AM
JadussD is exactly correct.
I wrote up that description. You can find it here:
http://byuu.cinnamonpirate.com/?page=bsnes&src=&bg=8&browser=
Please don't complain about contradictions or false statements, I'm not a machine myself so I can't exactly narrow down why the program runs as slowly as it does.

Thanks (wraith), by chance do you have a 3500+? I just upgraded to exactly that, myself. And only because Microcenter was out of 3700+s. To be honest, it's nowhere near 75% faster than my old 2000+, as the bullshit marketing numbers would suggest. I'd say 35-50% faster, which is more in line with the MHz difference.

Sadly, I just nuked the scanlines. They totally die on this lousy Radeon 7500 I'm forced to use (no AGP slots on my new mainboard). Planning to buy a GeForce PCIe with my tax return. I'll probably add them back then.

Savestates will get in there eventually. I'm kind of hesitant to start on them because I don't know how I want to do them yet. I can get into specifics if anyone actually cares.

Disch, I take it you've never actually stared at a TV from < 3" away before? My screenshot is almost exactly how a real TV does scanlines. That screenshot did nothing for RGB->NTSC->RGB, dot crawling, color subcarrier bleeding, etc.
It simply added scanlines. And that's almost precisely how a TV renders them.
Basically, a TV in non-interlace mode will draw every other scanline. The scanlines that aren't drawn are pitch black, not a darker luminance of the scanline above it. However, the scanlines that are drawn tend to bleed into the black scanlines, this is known as the kell effect. Basically, you end up with ~70% of the two scanlines being fully colored, and 30% being solid black.
My screenshot used a 2:1 colored:black ratio, giving you ~67%, which is pretty damn close to a TV.
It doesn't entirely look like it, because CRT monitors are inherently different than CRT televisions...

That picture you posted looks really good, though. I'd like to add color bleeding and that dot crawl eventually to bsnes. But speed is preventing me from adding such filters now.

Sorry for posting my reply to everyone here, but I can't stand boards that mix threaded and collapsed views, and see no reason to post three different replies.
<P ID="signature"></P>

(wraith_)
01-08-2006, 04:21 AM
> Thanks (wraith), by chance do you have a 3500+? I just
] upgraded to exactly that, myself. And only because
> Microcenter was out of 3700+s. To be honest, it's nowhere
> near 75% faster than my old 2000+, as the bullshit marketing
> numbers would suggest. I'd say 35-50% faster, which is more
> in line with the MHz difference.

My bad, I have the 2.0 ghz (3200+)... bought it months ago and have since put together machines for friends/family--got mixed up with what I went with myself. Prices keep falling and I may have to upgrade again ;).

> Sadly, I just nuked the scanlines. They totally die on this
> lousy Radeon 7500 I'm forced to use (no AGP slots on my new
> mainboard). Planning to buy a GeForce PCIe with my tax
> return. I'll probably add them back then.

Rough business, no AGP. At this point, you're almost better off to wait and get a PCIe... kinda wish I had had the cash to go that road myself (Indigo Phophecy won't run well at max res on my Radeon 9800... games are starting to catch up with processor/gpu speed!)

> Savestates will get in there eventually. I'm kind of
> hesitant to start on them because I don't know how I want to
> do them yet. I can get into specifics if anyone actually
> cares.

I'm sure it's complex, where your emu has such specific timing and accuracy. It's not really a necessity (obviously (unless you use them to cheat, haha)), but it makes life much more convenient when you need to get away quickly and the save point is far, far away.
<P ID="signature"><hr width=350 align=left>
http://donut.parodius.com/signature.gif</P>

D--
01-08-2006, 05:42 AM
> There actually has been some work on the nesdev scene to
> produce an actual TV-esque image. I don't mean the
> tradtional crap scanline method -- I mean simulating genuine
> NTSC rastering techniques.

What about PAL?
<P ID="signature"><hr>
Cinnamon Pirate.com (http://www.cinnamonpirate.com/)</P>

D--
01-08-2006, 05:44 AM
> I'm sure it's complex, where your emu has such specific
> timing and accuracy. It's not really a necessity (obviously
> (unless you use them to cheat, haha)), but it makes life
> much more convenient when you need to get away quickly and
> the save point is far, far away.

For the love of fuck, just don't GZIP them. It's such a pain in the ass to have to GUNZIP every save from Snes9x and ePSXe, edit, then recompress just to test anything.
<P ID="signature"><hr>
Cinnamon Pirate.com (http://www.cinnamonpirate.com/)</P>

blargg
01-11-2006, 12:01 AM
Regarding NTSC composite emulation, the SNES has superior video circuitry to the NES, so the artifacts are comparatively minor. The NES NTSC emulation code I just posted today (http://nesdev.parodius.com/bbs/viewtopic.php?p=8108) is specific to the NES; a SNES version would require further information on how the SNES generates its composite video signal. I doubt it would be worth the effort to implement at this time anyway.

<P ID="signature"></P>

byuu
01-11-2006, 02:58 AM
Well, those screenshots are easily the closest thing to a real NES I've ever seen on a monitor before, nonetheless. I'm extremely impressed both by your code optimizations and ability to read crazy specifications and turn them into code, bravo.

How does the dot crawl thing that you slide over every three scanlines and reset work? I've seen that on the SNES to some extent in the past... does the offset of each scanline change every frame e.g. so a static image would appear to be shaking? (I'm terrible at reading source code from other people.)

If it's any persuasion: I'd happily add this to my emulator if you did research the SNES' display capabilities :)
There's a few more factors involved with the SNES, though. I'll throw them out in case anyone's interested There's interlace mode (still 256x223, but NTSC fields are swapped every other frame, so its possible to "fake" a 256x446 image), hires mode (512x223), and the combination of the two (512x446).
Hires and pseudo-hires are the same, and have weird properties of mixing colors such that if all the even pixels are of picture A, and all of the odd pixels are of pixel B, then the resulting image looks to be a 50% alpha blended combination of A and B.
And not to mention, how do you upscale 512x446 for filtering, and actually manage to transfer it to the video card at 60fps on ANY system? :/
You have no choice but to limit resizing to maybe 640x480 at most.

<P ID="signature"></P>

blargg
01-11-2006, 06:32 PM
> Well, those screenshots are easily the closest thing to a real NES I've
> ever seen on a monitor before, nonetheless.

And now two NES emulator builds have been posted (http://nesdev.parodius.com/bbs/viewtopic.php?p=8126#8126). :)

Thank NewRisingSun for converting the NES and NTSC specifications into an algorithm; I've mainly just rewritten it a bunch of times and refined it down to the minimal (making it 25x faster in the process). I'm still not entirely familiar with how the NES video circuitry works.

Basically color information is encoded into the phase of a a pair of sine waves added to the signal, relative to the phase of the color burst reference sine wave that's at the beginning of the signal. The reference sine wave goes through three phase offsets, one each scanline. This accounts for the three different variations you get for an identical set of pixels. During normal operation, the NES PPU phase at the beginning of each frame toggles between two values, so things "shake" every field but visually blend together unless the scene is scrolling, then you see the artifacts.

I think that proper encoding calls for just two phases, alternating every scanline, and alternating every field for the same scanline, so that the checkerboard effect cancels out between scanlines and between frames. I haven't looked but I imagine the SNES does this, so you might find just two alternating patterns rather than three.

The artifacts are mainly due to the low-pass filter applied to the color signal in the TV, causing the phases of neighboring pixels to mix in. This also causes the brightness (luma) to be affected by color changes, since the color signal is added on top of it. So emulating this isn't a simple RGB mix from neighboring pixels.

> I'd happily add this to my emulator if you did research the SNES'
> display capabilities :)

We need someone with NTSC video knowledge and an oscilloscope to examine the NTSC composite video signal from a SNES.

But since the SNES includes RGB output, you can just say you're emulating that and be done with it. :)

<P ID="signature"></P>

Isildur
01-11-2006, 10:33 PM
Wow, that looks really authentic. Nice work. =) Any plans to add pincushioning and image-expansion/contraction (as a result of changes in overall brightness), to fully simulate how many old TVs made it look, or is that going a bit overboard?

Heh, the following isn't really a filter issue, but if emulator authors really want to add in a neat little nostalgic touch, when shutting down an emulator there could be a contracting light rectangle with colored edges that gets brighter as it shrinks and becomes a bright point or line at the center (or three seperated points and lines), which then fades away.

That would only make sense, though, for emulators for the older systems, since by the '90s new CRTs didn't really do that so noticeably, since electron emission died off more rapidly from the electron guns in the newer tubes.
<P ID="signature"><center>
<a href=http://1001insomniacnights.com><img src=http://pages.nyu.edu/~jc73/misc/1k1IN.gif border=0>
1k1IN:</a><font color=#903030> A Dark Comedy About 2 Roomates</font></center></P>