I want to introduce my NES emulator called VPNES. It's written in C++, uses SDL 1.2 and freetype2 libraries, should be cross-platform but GUI was implemented only for win32.
Right now it can run simple NES games. Implemented mappers are: nrom, mmc1 (sxrom), uxrom, cnrom, mmc3 (txrom), axrom.
My program is not really precise and certainly not fast. Last weeks I worked on my PPU (rewrote from scratch again) and now gonna revise my APU (especially DMA). So later I can fix sprites timings. Maybe then I will try to optimize it a bit.
Every time I start work on the program I always end up playing NES games instead, so don't expect much progress. =(
You can download the latest win32 build from here.
Project page: http://vpnes.googlecode.com/
Even tho it passed a year since I started the project I overcame myself and decided to ask your opinion.
And yes, I started this to learn C++ language just like everyone.
Edit: Please stop talking about penises, that joke is not funny.
This emulator works great! My Chu Chu Rocket game even worked perfectly. I saw a few problems with Micro Machines, but that game is a real stress test for any emulator.
Small bug with Zelda 2's title screen: Reads to $2007 during rendering should advance the VRAM address (V) by one scanline.
I don't see any problems there. Also afaik during rendering 0x2007 clocks both V and H at the same time but it could be my mistake.Dwedit wrote:Small bug with Zelda 2's title screen: Reads to $2007 during rendering should advance the VRAM address (V) by one scanline.
Reminds me of an old splash screen that I created for PocketNES, an NES emulator for GBA:thefox wrote:I can't help but reading it as vpenis. That's all.
Photo of a large collection of NES Game Paks, captioned "how big is your p.nes"? The implication was that someone who fills up a GBA flash card with a hundred NES ROMs may be compensating for something.
So anyway, I ran it in Wine on Ubuntu. I found a few problems with some ROMs:
Mapper 34 (Deadly Towers) does not work at all. Mapper 34 with no CHR ROM represents the BNROM board and its oversize variants. This behaves the same as mapper 7, except with normal fixed H/V mirroring instead of 1-screen mirroring. I ask about this because one of my multicart projects currently uses mapper 34 (but will eventually switch to mapper 28). I also made BNTest, a test ROM for certain behaviors in mappers 7 and 34.
The builder for this multicart allows specifying custom reset vectors and preloading a specific 8 KiB bank of the original ROM's CHR ROM into CHR RAM before the game starts. This allows multiple NROM-128 games to share a single 32 KiB bank of PRG ROM if built properly. So I built a ROM with Thwaite and Lawn Mower. It's a CNROM (mapper 3) that normally boots to Thwaite, but a Game Genie code to change the reset vector allows playing Lawn Mower. This ROM works fine in FCEUX but has very screwed up graphics in vpnes. It's as if only odd addresses in CHR ROM are being used. I have attached the ROM.
There appears to be no Zapper support. You can test various aspects of this with Zap Ruder.
And when I try a new emulator, I try a ROM that I created that plays sampled speech through timed writes to $4011. If this ROM doesn't work, then Big Bird's Hide and Speak will be unplayable. I was a regular on one forum related to PocketNES several years ago. I'd test each new version with Big Bird and report that it was still broken, and I occasionally got teased about this choice of test case.Dwedit wrote:Whenever I try out a new emulator, I always test out Slalom and Battletoads.
- This ROM should play Thwaite. It plays very corrupt Thwaite.
- (25.35 KiB) Downloaded 381 times
Yeah, it was correct, oops.x0000 wrote:I don't see any problems there. Also afaik during rendering 0x2007 clocks both V and H at the same time but it could be my mistake.Dwedit wrote:Small bug with Zelda 2's title screen: Reads to $2007 during rendering should advance the VRAM address (V) by one scanline.
You can run it without wine, just do this:tepples wrote:So anyway, I ran it in Wine on Ubuntu
Code: Select all
$ svn export http://vpnes.googlecode.com/svn/trunk vpnes $ cd vpnes $ chmod 0755 configure $ mkdir dest $ ./configure --prefix=`pwd`/dest $ make $ make install
To run a game:
Code: Select all
$ ./dest/bin/vpnes somerom.nes
Is not surprising, only 0, 1, 2, 3, 4 and 7 mappers are supported now.tepples wrote:Mapper 34 (Deadly Towers) does not work at all.
And won't be for some time.tepples wrote:There appears to be no Zapper support.
It was surprising. A very funny bug lol, how could I make that mistake?...tepples wrote:This ROM works fine in FCEUX but has very screwed up graphics in vpnes. It's as if only odd addresses in CHR ROM are being used.
Fills secondary oam with 0xff (writes on odd dots). Sprite data buffer contains 0xff. PPU continues from the point it was stopped if rendering was disabled and then enabled again
If PPU misses this tick it won't be able to find any visible objects on this scanline.
Copies visible sprites to secondary oam.
1. On even clocks it reads data from primary OAM.
2. On odd clocks:
1) If value is in range copy value to secondary OAM and goto 2.
Otherwise OAM_addr = (OAM_addr & 0xfc) + 4. If address overflows goto 5.
If it is first sprite, set 0-object hit flag for the next scanline.
2) For 3 cycles copy data to secondary OAM and increment address. After copying is finished goto 5 if address overflowed or OAM_addr &= 0xfc otherwise.
3) If value is in range goto 4. Otherwise OAM_addr++; if ((OAM_addr & 0x03) != 0) OAM_addr += 4. If address overflowed goto 5.
4) For 3 cycles increment address. After this goto 5.
5) OAM_addr = (OAM_addr & 0xfc) + 4.
Set 0-object hit flag for current scanline.
256-259, 264-267, ..., 312-315:
Reads data from secondary OAM and fills internal sprite data.
260-263, 272-275, ..., 316-320:
Fetches sprite patterns and loads it into shift registers
Reads data form primary OAM.
I didn't test it tho so any comments are welcome.
- VPNES Build 116 (r241_p1)
- (1.07 MiB) Downloaded 400 times