Saturday, October 9, 2010

So, I have pretty much written the code that emulates what the cpu does. I have not yet begun debugging that code. I have been testing as I've gone along. If there are errors, I suspect that most of them will be centered around parts of the cpu that I didn't understand or misunderstood. I've written the code, but there are significant questions that I have not yet found answers for that could seriously affect how the processor functions. These are the known unknowns. There are probably also unknown unknowns. I've created a small text document called known unknowns that documents some of the things I don't know and will likely upload it the next time I get around to uploading the current code to the google code source repository. As in my professional life, the source repository is a necessary evil and something I am going to be lazy about, I guess.

I have been reading up on the GPU. When I set out to emulate the NES, I was a little surprised to find out that the processor in it had been around since 1975. The cpu was not cutting edge. It was a well known processor that had been used in several other video game systems. The GPU was a lot more cutting edge, I think.

The CPU interacts with all of the other systems of the NES via memory. There are sections of memory that function as input and output for both the graphics processing system and the audio processing system. I am still coming up with the design that my emulator will eventually use to emulate the graphics. I have an idea how the GPU does what it does. I have not yet decided how I want to emulate it. I still need to find out exactly what the inputs and outputs for the GPU look like. Especially the output. I believe I've seen some degree of information concerning some of the input registers, but not an awful lot concerning the output registers.

The other thing to think about is the television. The NES was built specifically to interact with television screens and some of the software uses the physical constraints of the actual television to create effects. For instance, they might interact with the input registers at a particular point in the creation of a particular line on the television screen to create some effect. I don't exactly know what they're doing or what these effects look like yet, but it might be necessary for me to emulate the way a television creates images to one degree or another in order to replicate these effects. If I decide to replicate these effects. My project is mostly just to emulate one or two games in order to learn more about hardware and assembly programming, not to create the most accurate NES emulator available.

No comments:

Post a Comment