It was hell and tough but I've been working hard on an NES Emulator I've written in VB6, which works. Prior to writing it, I've become obsessed with the ins and outs of the original Nintendo and how it works. I've read many websites, researched everything on the 6502 CPU, the PPU, the APU, mappers, you name it. I even downloaded the source code to many NES emulators in multiple programming languages, such as C#, javascript, java, C++, and even VB6. However the first emulator I downloaded for VB6 was called bNES. It was interesting to say the least that VB6 was even capable of pulling it off, but after reading the source code, I saw it to be horribly written. I mean horrible. For starters, the 6502 code was obviosuly ripped from Zophars Domain where you can get free VB6 modules of the 6502. Those modules seem like it would emulate the 6502, and it does, but whoever wrote it read the wrong documents and kinda blended the 65c02 with the 6502, using more Opcodes than the NES even does, and used 2 extra address modes. Not to mention the cycles were wrong on a bunch of the Opcodes. Another big thing that bothered me was the fact that the NES sounds and music were being outputed using MIDI APIs. Seriously! Who in the right mind would do that? Why not use actual sound? And the controls were god awful. Another NES emulator I found in VB6 was called YoshiNES. The code was exactly like bNES, but seriously improved and tons more features added, such as a hex editor, movie recorder, save states, controls improved, and so on and so forth. A team of people turns out helped put this thing together. The menu on the other hand was in Portuguese, the music and sound was still in MIDI and the 6502 once again, the same? Really?
So after doing many comparisons with many emulators' source code, I've been building my own. Some of the source code I admit was taken from YoshiNES to serve as a basis, or in other words a stencil, but the crap factor is being completely cleansed from it. For starters the entire 6502 module was completely rewritten. Theres just the 56 Opcodes rather than the 60 some odd ones it has, and 13 address modes instead of 15. Almost all the variables were completely renamed. The status register actually has the 7 statuses rather than cryptic hex codes to make the code readable (Sign, Overflow, Carry, Zero, Interrupt, Decimal, Break). Note that every other emulator I've seen had these SRs and not the unreadable hexadecimals. Many of the Opcodes I fixed and improved individually. I still need to change the sound engine entirely as its still in all MIDI. And instead of the just the program using Stretchblt, I'm going to be using DirectX as well, so you get your choice of hardware as well as software. A lot of the code as a whole has been completely rewritten, I've heavily commented it based off the research I've done, and made it more readable and understandable. As I continue working on it, it's gonna get to the point to where once this beast is finished I wanna give it a name. Something that is catchy. Or funny. Something cleaver. I've brainstormed all day but haven't come up with a name of an NES emulator that doesn't sound stupid. Any bright ideas?



Mark Thread Resolved
Reply With Quote
GL

goodone....except it wasn't quick o.o


