Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*

SubjectRe: Emulator Writing Reply to this message
Posted byJan_Klaassen
Posted on10/15/05 09:51 AM

> > > > I'd recommend using C or C++ (if you really must) and trying something
> easy
> > > > first like the Sega Master System, NES...
> > >
> > > NES emulation is easy? Sure, it's easy to come up with something as
> inaccurate
> > > as Nesticle; if that's what you are aiming for, then hey.
> >
> > Writing An NES emulator from scratch that runs a few games will be much easier
> > than a Genesis emulator for a college project. Starting with the Genesis is a
> > bit much.
> >
> Thank for all the feedback guys, I have decided on writing a NES emu as a
> result, but my lecturer says I should not start it from scratch as my project
> contains a detailed report of 20,000 words and focusing on the coding will
> impact on my write up of the project.
> So the next thing I'm asking is what should I focus on. At the moment Im
> thinking there is no point in emulating the 6502 core,i'll be re-inventing the
> wheel right? :) So I will be using Marat Fayzullin's M6502 CPU core which is
> written in C which for me is a bonus. What I really need to know is what else
> is required from this point to construct a fairly basic nes emu and what sort of
> work load it involves. Please try and understand that my programming skills are
> not that advanced (furthest I've gone with C is writing a command line text
> editor) but I learn pretty quickly as long as its not overly complex.

Well, the recommendation for simple hardware is partly so you can write everything yourself without it taking up all your time, e.g. the 6502 is a fairly simple CPU, and the NES generally is a fairly simple computer. That said, you should gather any information and documentation you can find for the NES and its components so you can gain an understanding of the way it works. The documentation will specify memory maps, hardware registers, I/O ports, that sort of thing. You also need to use inputs and audio/video on the PC you're using as a host, so you need to understand how that works too. If you're not familiar with any APIs you'd like to use, I'd suggest SDL.

When you build your emulator, start by hooking up the CPU and memory. Let the CPU run or step through the instructions, trace what it's doing or log accesses of hardware that's not implemented yet, and (crudely if needed) emulate enough of the hardware bits using to get it to continue running. Once the emulated program is basically running, you can add correct emulation of the graphics and sound.

Again, you need to understand how the system works at the lowest level, you will be dealing with assembly language and hardware registers of the emulated system.

Entire Thread
Subject  Posted byPosted On
*Emulator Writing  caseh10/03/05 12:31 PM
.*Re: Emulator Writing  Jan_Klaassen10/07/05 05:56 PM
.*Re: Emulator Writing  erikduijs10/05/05 05:23 AM
.*Re: Emulator Writing  Bart T.10/04/05 00:05 AM
..*Re: Emulator Writing  Hyde10/04/05 01:26 PM
...*Re: Emulator Writing  Bart T.10/04/05 10:39 PM
....*Re: Emulator Writing  caseh10/14/05 07:37 PM
.....*Re: Emulator Writing  codingsama05/25/06 10:16 AM
.....*Re: Emulator Writing  Stainless01/12/06 11:36 AM
......Re: Emulator Writing  Jan_Klaassen10/15/05 09:51 AM