SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

pNES 0.1 -- Jim Ursetto -- jim@3e8.org

pNES is a hacked-up version of nestra 0.64. It offers two major improvements over nestra: a tile-based rendering engine, and the use of Glide to render the tiles.

pNES started out as a desire to determine if the use of a hardware texture-mapping unit for rendering 2D tiles would be an improvement over the standard render-to-memory-then-copy-entire-region-to-framebuffer method. I figured both the NES and SNES would be worthy testbeds, but that the SNES was too complicated a starting point.

Well, it turns out that none of the emulators with source available had tile-based engines; they were all line-based. This meant that I had to port one to use a tile-based engine, which wound up being much harder than the Glide part. So in the end, it probably would have been easier to start out with a tile-based emulator such as snes9x. Still, I learned a lot...

pNES seems to provide about a 3x speedup over nestra. For example, in places I'd get 40fps in nestra, I'd usually get 120fps (without the frame limiter) in PNES. Plus, it's full-screen! Unfortunately, it's impossible to tell how much of that boost comes from the new tile engine, and how much from the Voodoo itself. However, I can tell you that once you start turning on the mini tile overlays, the fill rate of the Voodoo 1 becomes quite apparent. Interesting, if not useful.

Why Glide and not OpenGL? I've been asked this many times. (Okay, only once.) Because in my initial tests, Glide was much faster (>2x) at rendering 2D texture-mapped tiles than Mesa 2.4, even when I preloaded all textures. I think that OpenGL was trying to compute unnecessary geometry transformations, unnecessary because Glide's concept of 3D space is set up so that there is a 1 pixel:1 coordinate ratio. So you can effectively treat the Voodoo as a 2D card. I think when I told Mesa to use such a setup, it went through intermediary and useless steps. Perhaps Mesa 3 has a fast path for 2D output, but it's not high on my priority list.

This release exists only as a get-the-code-out-there type of thing. Hard-core developers are encouraged to examine the code---I would love to see other emulators get a hardware boost. Anyone who intends to actually -use- the thing is actively encouraged to stay away. The code has not been touched in four months; I'd love to work on it but the computer with the Voodoo in it has no desk to rest on. I just tarred it up in its current state and slapped it in my /pub directory because otherwise it will never get released. There are many, many things that need to be fixed, generalized, rewritten, etc. So don't bother me with complaints of "It only works in 640x480" or the like. But feel free to drop me a line if you have any piercing insights (into anything).

Bottom line: It Works For Me. And probably not for you, unless you're running a Voodoo 1 on a Linux box with somewhat old Glide libraries.

Jim

---

Usage

./pnes file

Keyboard commands are as in README.nestra. Keys specific to pNES are listed at program startup.

Source the shell script "nosync" to turn off the 60fps Voodoo vertical sync frame limiter. Source "sync" to turn it on. Speed is capped by vertical sync, so if you turn it off games will probably be too fast.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.