Originally Posted by
tomaitheous
Don't worry, it will happen (someone already requested it ;) And with CDDA tracks too as an option).
Thanks to all that tested this for me, whether you had beat it or not.
A little info on this (I had assumed the info on this was already common knowledge. Sometimes I get ahead of myself):
- This IS the original NES rom running on the PCE. Byte for byte, the 6280 is running the original 6502 code. I don't know if you consider this a 'port' per se because and I didn't 're-assemble' any of the game code. It just runs.
- The NES PPU (graphic chip) is nothing like the PCE's (or Genesis for that matter), other than it has tilemaps and sprites. The tile/sprite 8x8 cell format is not compatible with the PCE. The tilemap is a different format and arrangement than the PCE. The attribute table (set subpalettes to BG tiles) is completely different on many levels. The tilemap sizes are different (I have to use an hsync routine to make the 32 cell vertical map into NES 30 cell vertical map). The PPU has byte (8bit) read/write ports to the graphics chip; the PCE can ONLY read/write WORDs (16bit) to the graphic chips (this is a big pain in the ass). I could go on and on. There are just sooo many differences. Normally, one would just completely re-write ALL the graphic routines for this type of project. Instead, since the PCE's cpu runs 4x the mhz speed - there's just enough speed to emulate the NES APU (audio) and PPU (graphics) in real time. Actually, the emulation code runs slower than normal so it ends up writing to the VDC during active display - but since the PCE has no problems doing this (as opposed to quite a few other systems that can't), the job gets done. Sometimes I have to adjust timing so it doesn't show glitches and such. It's way more detailed and complicated than I can explain here.
- So, graphics and audio are emulated realtime. Mapper support is as well. I don't emulate everything because it adds to complexity and sometimes cpu resource. So I emulate just what is needed for the game to run. That said, some things MM2 requires isn't emulated yet. Most notably dynamic tilemap mirror switching (which the opening sequence uses and the wily stage map uses, so they look wrong). There's no support for reading back tilemap data from vram either, so doors to the boss show weird tiles (garbage).
- The PCE has 16x16 sprite cells and the NES uses either 8x8 or 8x16 sprite cells (one or the other, not either at the same time). MM2 uses 8x8 and while the PCE has much better sprite capability natively, it wastes a lot of sprite bandwidth. Especially for metasprites with flipped vertical settings. It kills the sprite scanline bandwidth to near NES limits, but also eats through the 64 sprite table. What am I trying to say? Basically flicker is both internal (the game code itself monitors the sprite table entry to see if it over flows, if so then it 'flickers' all sprites thus the status bar and such start blinking) and external (sprite scanline limit). The only way around this is to hack the game to use native 16x16 or large PCE sprites instead of the NES emulated sprites. I did this for MM1 and it was a lot of work (though not publicly released). It might be a while before I do this to MM2.
Hmm, I guess I didn't really need to write all of that. In sort, it's the NES rom hacked and emulated on the PCE. I did not write this from scratch. In theory, every behavior in the original should be in this version. There's no resolution differences (it runs the same res as the NES console). If anything, slow down will probably be eliminated for almost all parts.
So, thanks to the testers on this site. I'll be releasing a public version pretty soon (I'm currently re-writing the APU core).