Search found 42 matches
- Wed Jan 08, 2014 2:22 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Hey guys. I stopped working on my emulator for a while, but I recently started again. I was using SDL, but I switched over to WinApi and OpenGL. I may switch to Qt or some other cross-platform GUI library if this ever gets finished. I completely changed the way my PPU renders. Now I'm actually emula...
- Sat Oct 12, 2013 10:47 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
I came across that page and thought it looked like a good read for when I work on scrolling. I'll give it a look tomorrow after I try fixing the graphics bug :) Edit: I fixed it, and it was because it was checking for the 2nd bit of the controller register to be set for 32 incrementing, instead of t...
- Sat Oct 12, 2013 5:58 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
It passed all the CPU tests up until it hit unofficial opcodes. I'm assuming my CPU is working fine, but I wouldn't be surprised if there was still a couple bugs. And I've implemented both incrementing modes. I've checked my code several times and it looks fine. But I'll check again by doing some te...
- Sat Oct 12, 2013 3:26 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Well what I'm curious about is, say a game writes to the address register with $10 and then $00, the address would then be $1000. If in increments 256 times, it would then be $1100. Then you write $08 to the address register, without resetting the latch... Would it then be $1108? Or does it go off o...
- Sat Oct 12, 2013 1:56 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Okay. How does it actually deal with incrementing? Right now, I have it add the upper and lower bytes together and then store them in a separate variable. Then when the data register is written to, that separate variable gets incremented and the registers are left alone. Is that right, or should I a...
- Sat Oct 12, 2013 5:09 am
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Yep. Everything else displays correctly, besides sprites because I'm not touching those yet. It even shows the little demo screen and Donkey Kong moves when he throws the barrels. Idk what it is :? Oh, and there was a question I wanted to ask about the address register. Does it always keep track of ...
- Sat Oct 12, 2013 12:16 am
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Well, my first PPU render was pretty disappointing. I don't think I see donkey kong in there.... Lol I'll see if I can find what the problem is. http://i.imgur.com/9EXFYaB.png Edit: I'm on the right track. It looks like I'm not reading the right pixels from the pattern tiles http://i.imgur.com/jpumL...
- Fri Oct 11, 2013 8:21 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Yeah, for people who don't know much about this stuff, it would be nice if there was a place that gave you a simple outline of what you need to implement to get you started and then you can worry about the details on your own. At least that's the way I learn, but everybody learns differently. I coul...
- Fri Oct 11, 2013 2:52 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
The wiki page I linked to has a very helpful diagram that indicates what happens each cycle. It doesn't get into details though, for that you have to check the rest of the page, and some other pages in the wiki. The info is all there, you just have to put it all together (otherwise writing an emula...
- Thu Oct 10, 2013 11:12 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
I created a ppu class with registers, and a ppuMemory class. I have the character bank loaded into the ppu memory. Now I'm a little lost. I know about pattern tables and tiles and nametables. But I don't understand where the nametables come from. I'm guessing the cpu passes them to the ppu through 2...
- Thu Oct 10, 2013 3:56 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
So far, I have very little knowledge of how the PPU works. The PPU, just like the CPU, is constantly running, but instead of fetching and executing instructions it repeats the process of generating a video signal, which consists of: 20 scanlines of VBlank (70 for PAL), 1 pre-render scanline, 240 sc...
- Thu Oct 10, 2013 2:35 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Oh I didn't know that. I'll start with Donkey Kong then. What are the best resources for writing the PPU?
- Thu Oct 10, 2013 2:07 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
^^I know that home made games use them, but no official games do, right? (EDIT: I totally missed the part where you said commercial games do... I didn't know that.) I'm just starting out with official mapper 0 games like Super Mario Bros 1. I'll implement unofficial opcodes once my emulator is actua...
- Thu Oct 10, 2013 12:29 pm
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
A little after halfway through nestest, I hit some weird NOPs that I wasn't expecting (opcodes 04, 44, and 64). Those are unofficial opcodes right? I wasn't planning on implementing unoffical ones until my emulator is running. If I'm hitting those, is it safe to say my official ones are working and ...
- Thu Oct 10, 2013 10:02 am
- Forum: NESemdev
- Topic: First steps in writing an emulator
- Replies: 75
- Views: 36541
Re: First steps in writing an emulator
Zero page indexing wraps within zero page. ($80,X) with X=$7F reads the low byte from $00FF and the high byte from $0000. Two of the writes that set up this test are at $CFBF and $CFC3. Sure enough, that was the problem :D I've made it almost half way through the test, and now I'm stuck on another ...