Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > General Emulation

Reply
 
Thread Tools Display Modes
Old 01-10-2006, 11:01 PM   #31
blargg
Regular Member
 
Join Date: Jul 2004
Posts: 45
Default Re: BSNES (rules)

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 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>
blargg is offline   Reply With Quote
Old 01-11-2006, 01:58 AM   #32
byuu
Junior Member
 
Join Date: Jan 2006
Posts: 19
Default Re: BSNES (rules)

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>
byuu is offline   Reply With Quote
Old 01-11-2006, 05:32 PM   #33
blargg
Regular Member
 
Join Date: Jul 2004
Posts: 45
Default Re: BSNES (rules)

> 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.

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>
blargg is offline   Reply With Quote
Old 01-11-2006, 09:33 PM   #34
Isildur
Senior Member
 
Isildur's Avatar
 
Join Date: Nov 2004
Posts: 1,339
Default Re: BSNES (rules)

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>
__________________
Holding out for Hostess Snack Cakes...
Isildur is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:50 PM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.