I ported Zsnes to the Xbox. I have a few questions
Moderator: ZSNES Mods
I ported Zsnes to the Xbox. I have a few questions
I figured I ask here since the people with the most knowledge of the code read/post here. I have ported Zsnes to the Xbox and I have several questions.
I'm trying to determine what "startup" variables to set since I won't be using the Zsnes.cfg file. Setting the sound information is easy, but I'm not sure how to correctly setup the graphics for 640x480.
My goal is a stretched 640x480 display. Right now my TV display is still not filling the entire screen. I am using Direct3d and copying the buffer returned by the draw640by480b() (or something) method to a texture.
Currently, I am not doing anything with windowwidth/height settings If I set the WindowWidth/Height variables to 640 and 480 (as well as surfaceX and surfaceY) and send in my buffer of 640x480 unsigned short to the copy640by480 method, is that the best (or even correct) method? Should the fullscreen variable allways be set to 1?
I'm trying to determine if my problems are from my Direct3D code or the state of video variables before I call the Zsnes copy video method. I'm not sure of what the correct variable settings should be.
Also, if anyone can think of anything that would be neccesary/beneficial (i.e you won't need such and such code, etc...) I'd love to here any suggestions. Thanks
I'm trying to determine what "startup" variables to set since I won't be using the Zsnes.cfg file. Setting the sound information is easy, but I'm not sure how to correctly setup the graphics for 640x480.
My goal is a stretched 640x480 display. Right now my TV display is still not filling the entire screen. I am using Direct3d and copying the buffer returned by the draw640by480b() (or something) method to a texture.
Currently, I am not doing anything with windowwidth/height settings If I set the WindowWidth/Height variables to 640 and 480 (as well as surfaceX and surfaceY) and send in my buffer of 640x480 unsigned short to the copy640by480 method, is that the best (or even correct) method? Should the fullscreen variable allways be set to 1?
I'm trying to determine if my problems are from my Direct3D code or the state of video variables before I call the Zsnes copy video method. I'm not sure of what the correct variable settings should be.
Also, if anyone can think of anything that would be neccesary/beneficial (i.e you won't need such and such code, etc...) I'd love to here any suggestions. Thanks
I have one question: are you using CVS code or the 1.43 release? The CVS has improvements on the 1.43.
[edit] Or, if you don't want to use CVS, you can use a wip at Ipher's WIP site.
[edit] Or, if you don't want to use CVS, you can use a wip at Ipher's WIP site.
There is no ZSNES v1.43. The last official release was v1.42.Aaron wrote:I have one question: are you using CVS code or the 1.43 release? The CVS has improvements on the 1.43.
snes6502, you might be able to get some help on the IRC channel. It is: irc.freenode.net#zsnes
[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]
-
- ZNES Developer
- Posts: 215
- Joined: Mon Aug 02, 2004 11:22 pm
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
Um.. for the record.. why would you need such a feature when you can make a fair assumption that if you will probably be connecting a NTSC TV to the XBOX (unless you don't live in the NTSC regions or using an HDTV I guess).. so the why the hell would you need to emulate something that does it naturally is beyond me.ICEknight wrote:Any plans to implement the NTSC filter?
Minus the scanlines, which the TV would already output, of course.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
-
- Veteran
- Posts: 970
- Joined: Fri Jan 21, 2005 11:15 am
- Location: Montana, United States
I could be wrong (and usually am), but wasnt he joking?Deathlike2 wrote:Um.. for the record.. why would you need such a feature when you can make a fair assumption that if you will probably be connecting a NTSC TV to the XBOX (unless you don't live in the NTSC regions or using an HDTV I guess).. so the why the hell would you need to emulate something that does it naturally is beyond me.ICEknight wrote:Any plans to implement the NTSC filter?
Minus the scanlines, which the TV would already output, of course.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
Mmm.. no.SquareHead wrote:I could be wrong (and usually am), but wasnt he joking?Deathlike2 wrote:Um.. for the record.. why would you need such a feature when you can make a fair assumption that if you will probably be connecting a NTSC TV to the XBOX (unless you don't live in the NTSC regions or using an HDTV I guess).. so the why the hell would you need to emulate something that does it naturally is beyond me.ICEknight wrote:Any plans to implement the NTSC filter?
Minus the scanlines, which the TV would already output, of course.
Though I was discussing this a little with TRAC and this might have merit.. right now it sounds silly.. but I wouldn't really know the actual usefulness of such a feature when enabled on the XBOX.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
-
- Veteran
- Posts: 970
- Joined: Fri Jan 21, 2005 11:15 am
- Location: Montana, United States
You know, I was joking when I said I wanted to pipe the NTSC filtered video over to my TV, maybe I actually should and see what happens.Deathlike2 wrote:Mmm.. no.SquareHead wrote:I could be wrong (and usually am), but wasnt he joking?Deathlike2 wrote:Um.. for the record.. why would you need such a feature when you can make a fair assumption that if you will probably be connecting a NTSC TV to the XBOX (unless you don't live in the NTSC regions or using an HDTV I guess).. so the why the hell would you need to emulate something that does it naturally is beyond me.ICEknight wrote:Any plans to implement the NTSC filter?
Minus the scanlines, which the TV would already output, of course.
Though I was discussing this a little with TRAC and this might have merit.. right now it sounds silly.. but I wouldn't really know the actual usefulness of such a feature when enabled on the XBOX.
First of all, congrats for porting, you beat me to it
The code has been cleaned up over the months to make this easier, the only step remaining that I could see was changing the DirectDraw code to Direct3D.
We can't distribute binaries of this of course but I don't see any problems with keeping the source around since there is nothing wrong with that as long as we don't include any XDK code.
If you want to PM me we can work out some any problems/concerns you have and I could possibly help you get this working better on a console environment.

We can't distribute binaries of this of course but I don't see any problems with keeping the source around since there is nothing wrong with that as long as we don't include any XDK code.
If you want to PM me we can work out some any problems/concerns you have and I could possibly help you get this working better on a console environment.
Thanks, but I plan on releasing a beta for the masses to test somewhere around the 17thdo you need any beta testers?
ZsnexBoxhow r u gonna call that emu?
I doubt it. Don't think there would be any point since I beleive the requirements are far higher than a 733 megahertz cpu.Any plans to implement the NTSC filter?
It wasn't "too" bad porting. There was and still are a few issues I have to sort out.The code has been cleaned up over the months to make this easier, the only step remaining that I could see was changing the DirectDraw code to Direct3D.
Examples:
None of the Directsound code could be used. The Directsound imlemented on the Xbox is far different than that for the PC.
No support for many C runtimne functions (like chdir)
and others. I sent you a PM with some questions/concerns. I would really appreciate any ideas you might have on them. Thanks
Anyone interested can read about the current progress here.
http://forums.xbox-scene.com/index.php?showtopic=499989
http://forums.xbox-scene.com/index.php?showtopic=499989
Erm... To simulate the irregularities in the SNES output, obviously. The X-Box will output a crystal clear image unlike the SNES did (and even an incorrect aspect ratio, perhaps?).Deathlike2 wrote:Um.. for the record.. why would you need such a feature when you can make a fair assumption that if you will probably be connecting a NTSC TV to the XBOX (unless you don't live in the NTSC regions or using an HDTV I guess).. so the why the hell would you need to emulate something that does it naturally is beyond me.ICEknight wrote:Any plans to implement the NTSC filter?
Minus the scanlines, which the TV would already output, of course.
Oh well.snes6502 wrote:I doubt it. Don't think there would be any point since I beleive the requirements are far higher than a 733 megahertz cpu.Any plans to implement the NTSC filter?
What are you talking about?ICEknight wrote:Erm... To simulate the irregularities in the SNES output, obviously. The X-Box will output a crystal clear image unlike the SNES did (and even an incorrect aspect ratio, perhaps?).
The NTSC filter has nothing to do with raw SNES output. It has to do with the analogue-ness of an NTSC television.
Incorrect aspect ratio? Excuse me? The SNES internal ratio is 256x224, which on an NTSC television is generally intended to be viewed at a 4:3 ratio.
"Obviously."
[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]
-
- Inmate
- Posts: 1751
- Joined: Mon Dec 06, 2004 7:47 am
- Location: WA
someone's retarded. the snes outputs a crystal clear picture as well. it's just that your NTSC television does things to the image. Enter the NTSC filter. Your PC monitor is vastly superior to an NTSC television, and will maintain the crystal clear image. The filter dirties the image up so it looks like it's being piped through an NTSC television.
Now, the fact that your xbox is most likely hooked up to an NTSC television already makes the filter useless, since YOU'RE PLAYING ON THE ENVIRONMENT THAT THE FILTER IS SUPPOSED TO SIMULATE. The image will get dirtied up without the filter just fine.
Now, the fact that your xbox is most likely hooked up to an NTSC television already makes the filter useless, since YOU'RE PLAYING ON THE ENVIRONMENT THAT THE FILTER IS SUPPOSED TO SIMULATE. The image will get dirtied up without the filter just fine.
[img]http://i26.photobucket.com/albums/c128/sweener2001/StewieSIGPIC.png[/img]
Looks like someone needs a lesson or two.sweener2001 wrote:someone's retarded. the snes outputs a crystal clear picture as well.
Nightcrawler wrote:You mind expanding on this. Exactly what artifacts does the SNES output circuitry produce? I can handle a technical explanation too.It emulates both the artifacts inherent in the SNES NTSC composite output circuitry and the way an NTSC TV decodes the signal.
Look, it's the NTSC filter (sans the TV stuff) compared to the non-crystal-clear SNES output!blargg wrote:Until I write a complete description, I'll only summarize. NTSC represents luma (brightness basically) by the amplitude of the video signal. It represents chroma (color) by adding a ~3.58 MHz waveform to the luma signal, whose phase is the hue and amplitude is the saturation. In the TV the signal is filtered back into the luma (lower frequency) and chroma (the region around 3.58 MHz). SNES pixels are generated at a rate of ~5.37 MHz, or ~186 nanoseconds (ns) per pixel. If you have a single pixel of some color with black around it, there's not enough time to establish a complete cycle of the color waveform (~279 ns per cycle), so the TV decoder sees something at a different phase and amplitude than the SNES intends. ASCII art, engage!
If you put multiple SNES pixels of the same color together, you get enough of the color wave that the color is properly represented. You get artifacts even for lone gray/white pixels because they are narrow enough to contain significant harmonics in the color range.Code: Select all
,-~-, / \ / \ / \ / '-_-' |----------------| 279 ns One color cycle ,-~-, / \ / \ ,------- \| ' |---------| 186 ns One SNES pixel possibility ,-. / | ----------, / '-- | / '-_-' |---------| 186 ns Another SNES pixel possibility
It's just not possible to represent the color of a pixel narrower than around a color cycle, nor to switch colors faster than that, due to the inherent amount of information that can be encoded.

And here's the filter in a form that could be used with the Xbox emu so it would look just like the real thing when output through an NTSC TV (which is what I've asked for in this topic):

Wow someone's retarded omglawl!!!1
