Is anyone working on an emulator for Wii? I just installed Homebrew Channel on mine and started playing with FCEUGX, and it's pretty good. I'd love to get one of the retrozone NES controllers for this, though using the wii remote sideways works pretty well - I was even able to navigate level 3 of Battletoads!
There are a few things I'd like to see fixed in FCEUGX, and I figured rather than fork it, or have a million different emulators, it would be best to coordinate our efforts a bit. Anyone interested in helping out? I'd like to determine if continuing with FCEUGX is the way to go, or if we should start over with a port of something else. FCEUGX has some nice features, my only real complaints are:
- it fails some of blargg's cpu timing tests
- I'd like to add netplay
- an "auto-update" feature would be nice
So let's kick off the discussion - what direction do you want to see NES emulation on Wii go?
Adding custom mappers to emulators on Wii would have two benefits:
- Publishers of classic NES games couldn't claim we're eating into Wii Shop Channel revenue.
- We'd still be running our games on authentic Nintendo hardware.
Download the Homebrew Browser, there's a million on there.
tepples wrote:
Adding custom mappers to emulators on Wii would have two benefits:
- Publishers of classic NES games couldn't claim we're eating into Wii Shop Channel revenue.
- We'd still be running our games on authentic Nintendo hardware.
no, the media would just claim anytime something breaks, it is the fault of modded systems.
hell i even called my local news about the dirty lens problem with brawl bricking Wiis, and they refused the report it claiming their 'experts' stuck to their guns that it only affected modded systems. (untrue)
EVEN THOUGH NINTENDO FORMALLY ANNOUNCED THE MATTER ON THEIR OWN WEBSITE.
over the following month, at-least 50,000 Wiis in this city of 2 million people bricked due to brawl and dirty lenses.
(metro phoenix arizona and its fringe towns has a lot of air pollution and dust)
AND THEY STILL DIDN'T REPORT IT ON THE NEWS.
there are prolly still thousands of families out there that don't realize *still* that nintendo repairs Wiis from that incident for free with prepaid shipping at no cost no questions asked.
I've been tempted to try out installing the homebrew channel via that zelda save hack just so I could try FCEUGX out on the Wii. I have to ask though, have you noticed any issues with the sound quality?
I ask because I have it on my GameCube and it has a very annoying sound bug where you start to hear distortion / corruption in the output after a minute or so. If you pause the emulation, the corruption goes away, but then will just come back in another minute.
Oddly enough, this didn't seem to happen for many people, in fact I could only find one post on the official forum mentioning it. I spent a whole damn weekend trying to debug the relatively simple sound code myself, but never come up with a solution. IIRC, it appeared the problem was stemming from sound buffering, but I tried many different buffering methods, but the distortion would always creep back in eventually
I haven't noticed any audio corruption, though I have only tested a handful of games and my ear for that type of thing is not very good.
Audio corruption?
Yes, this happens all the time for me. I'm running FCEUGX on my PAL Wii, probably one of the early consoles bought at its launch date in Europe.
I'd like to find out what causes this bug, it really is annoying as hell.
FCEUGX may not be intended to run at 50fps. Maybe that is the problem if it is running in PAL50?
Not NES related, but I do get a sound buffer problem on both Visualboy Advance GX & GNUboy when playing Zelda: Links Awakening DX & others. (haven't tried it w/ a GBA game as of yet)
A little annoying on VBAgx, but not enough to consider it an app killer. Couldn't stand it on GNUboy however. Now what I'm waiting for is for someone to break out a PSX emu! You can't deny how epic that would be!
miau wrote:
Audio corruption?
Yes, this happens all the time for me. I'm running FCEUGX on my PAL Wii, probably one of the early consoles bought at its launch date in Europe.
I'd like to find out what causes this bug, it really is annoying as hell.
Damn
I figured the sound code probably hasn't been touched when moving over to the Wii. If I do decide to try it out anyways, I may look into this again, because it is an app killer for me. BTW my GC / Wii are NTSC
teaguecl: The corruption is somewhat subtle and would happen with any game, but when I was trying to debug it, I was mainly testing with Mega Man 4 and MC Kids.
MottZilla wrote:
FCEUGX may not be intended to run at 50fps. Maybe that is the problem if it is running in PAL50?
It happens regardless of what frame rate the emulator runs at.
I have not personally used FCEUGX, but I know a few people that do, and they have the same sound problems. Apparently, the guy that ported it doesn't actually use it much (!!!) and doesn't seem to care.
BMF54123 wrote:
I have not personally used FCEUGX, but I know a few people that do, and they have the same sound problems. Apparently, the guy that ported it doesn't actually use it much (!!!) and doesn't seem to care.
You have hit on what I was trying to get at with the original post. Tantric, the guy who ported and is supporting FCEUGX is also supporting several other Wii projects (a SNES emulator port and some other stuff) and so the project does not have his full attention. Collectively I think this forum is the ultimate resource for knowledge and interest in NES - and I think it would be nice to offer our help.
I'll kick things off by taking three action items:
1. Try out Mega Man 4 and see if I can reproduce the audio bug
2. Run all of blargg's tests on the latest FCEUGX release and identify failures
3. Download the source and see if I can get it to compile for a more debug friendly platform - like x86 Linux.
I'll report back in a day or two with results.
Why not just start with another emulator core and rewrite FCEUGX's Wii portions? I'm guessing there are plenty of emulators here that are far more accurate than FCEU and just as fast. This would be something I'd be interested in if I had a Wii and didn't have a million other projects going on..
I was thinking the same thing. How about Nestopia? It seems to strike a good balance between accuracy and speed.
Nestopia would be my first choice as well. If I didn't have so much other crap going on, I would take a stab at it. I'd love to see the NTSC filter implemented as well!
It would've been sweet if Mega Man 9 had an option for using that filter
Results of my testing of FCEUGX version 2.0.3c
Mega Man 4 - sound seemed fine to me. Crap that game is hard.
Blargg's CPU Timing Test (12 seconds)
Fail OP: $E2
Emulator: 3
Correct: 2
Blargg's PPU timing tests
palette_ram: FAIL, code 3
power_up_palette: FAIL, code 2
sprite_ram: FAIL, code 2
vbl_clear_time: PASS
vram_access: PASS
Blargg's APU tests:
Series of 8 tests, must be run sequentially.
FCEUGX 2.0.3c fails test 2 with this result: $70 $1C $1A $02
tests 3-8 cannot be run with a failing test 2.
Blargg's Branch Timing tests:
basics - pass
backward - pass
forward - pass
Blargg's CPU Timing Test 4 (16 seconds)
Pass
Blargg's CPU Timing Test 5 (16 seconds)
Pass
Blargg's CPU Timing Test 6 (16 seconds)
Pass
Based on the test results above, and the comments by others - it seems like porting a more accurate emulator might be the way to go. Nestopia has been suggested. I think the important factors are (in order)
1. Speed - it must play the games full speed on Wii HW, or else why bother.
2. Accuracy - obviously as close as we can get to Nestopia/Nintendulator accuracy. Doing this on Wii HW may be tough.
3. Code quality - how maintainable is the code base? I don't want to deal with spaghetti code forever.
What is the consensus here - fix FCEUGX or start over with a Wii port of a more accurate emulator?
Well, the good thing about the Wii--or most any console--is that the hardware is constant. You can pretty much tweak and optimize the code to your heart's content without having to worry about it failing on someone else's system (unless it runs afoul of some hardware mod that changes the system's core behavior).
teaguecl wrote:
Nestopia has been suggested. I think the important factors are (in order)
1. Speed - it must play the games full speed on Wii HW, or else why bother.
Nestopia consistently runs at full speed with NTSC filtering on a nearly eight-year-old Dell Dimension PC with an 866 MHz Pentium III CPU. Though the Wii's "Broadway" PowerPC CPU is thought to run at 729 MHz, I still remember Apple's
"snail" commercial about how the PowerPC G3 core (used in Broadway) is up to twice as fast as the P6 core of the Pentium II/III at equal MHz.
But how much of Nestopia is in assembly language, which would have to be rewritten from scratch to run on a PowerPC CPU?
In my experience, most emulators are written in a way that runs poorly on RISC machines. They tend to use lots of non-local variables as temporaries, causing lots of memory accesses which are generally bad on RISC. A compiler usually can't prove that these aren't modified by other memory accesses and function calls, so it's forced to constantly move these back and forth between memory and registers. The RISC-friendly emulators use lots of local variables which an be kept in registers (the PowerPC has 32 general-purpose registers).
On the bright side, at least the NTSC filter is quite RISC-friendly.
Does the Wii have 240p output or must emulators use 480p / 480i (and drop fields)?
I haven't tried any Virtual Console NES or Super NES games, but Toejam and Earl 2 (Genesis) and Dungeon Explorer (PC Engine) appear to use 240p or 480p depending on whether progressive scan is turned on in Wii Menu.
A couple GameCube games use 240p, such as Mega Man X Collection, and when I run them through my Wii's component cable, my Vizio HDTV glitches the same way it does for the majority of PS1 games through my PS2. I have to switch back to an S-video cable to run them.
Wii Remote support for Zapper games is a must, as is Wii Wheel support for Rad Racer (it's so bad).
I believe one of the emulators already has zapper support. & indeed Rad Racer is so bad. (but only if it involves a Power Glove)
OK, it looks like Nestopia is a good candidate. I have some reservations about a couple of things. First, it's written in C++ and I would much prefer ANSI C. Though maybe I could live with it. Second, it is very accurate and therefore requires a lot of processing power. My biggest fear with that is that we spend a lot of effort on the port - only to discover the Wii cannot handle it. So I was thinking...
Any ideas on an easy to code benchmark to help us guesstimate if this is going to work? I'm thinking something we could run on low end x86 which is still capable of running Nestopia, and see how it does on Wii. That way we can avoid doing the full port before having some idea of whether we have the horsepower.
I'm pretty sure the PPU rendering is the most intensive task in NES emulation, any suggestions on a simple way to simulate that kind of task?
EDIT: Maybe we can just gauge FCEUGX's performance on Wii hardware vs. FCEUX 0.98.12 on a older x86 to get some insight?
Much better to see how it performs on a PowerPC machine. Find someone with Linux on a ~700 MHz PowerPC to see how Nestopia runs on it.
(somewhat useless post)
I know that this isn't what you are looking for (in fact, it is almost the exact opposite) (and it has no sound), but I thought that it was cool.
http://members.aol.com/autismuk/nesasrc.zip
This little NES emulator is written in x86 assembly. It can run Metroid on a 486 DX2 66 (I know, I had one when I was in college).
I have a friend w/ a 1.25GHz G4 laptop i could probably persuade him to let me borrow to test -- but it's markedly faster.
It's also worth noting that my 1GHz linux athlon system can't keep up with nestopia using the ntsc filter -- although it's probably X or my gpu's fault.
lidnariq wrote:
I have a friend w/ a 1.25GHz G4 laptop i could probably persuade him to let me borrow to test -- but it's markedly faster.
Then the test becomes how many Nestopia instances can you run side by side at full speed. Still, a G3 might be a fairer test, as that's the same microarchitecture in Gekko and its successor Broadway.