Search found 42 matches

by janzdott
Thu Oct 10, 2013 3:23 am
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

I'm utterly stuck :( Could someone with their own emulator PLEASE help me out? I've been trying, and there's no way for me to find the source of my problem. This is from Nintendulator's log of nestest. CFBF 85 FF STA $FF = 00 A:00 X:55 Y:69 P:27 SP:FB CYC: 16 SL:1 CFC1 A9 04 LDA #$04 A:00 X:55 Y:69 ...
by janzdott
Wed Oct 09, 2013 6:57 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

You won't find the debugs if you don't compare the logs though, see how you this is a needed step? I mean, I haven't written an emu, but I've written enough programs to know how to design them. But I AM comparing the logs. I just said I was writing a program to do it for me, so I don't have to read...
by janzdott
Wed Oct 09, 2013 6:02 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

Why in the world would you not output the same format as the other logs, compare them, and fix the ones that go off? It's not that hard at all to get CPU running, honestly, it's cake compared to PPU and audio. Isn't my format the same as the others? I'm comparing it to a log from nintendulator and ...
by janzdott
Wed Oct 09, 2013 3:57 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

Well its good I don't have to worry about emulating that then :) I spent a lot of time on a class for logging CPU instructions. It can be enabled or disabled, because I suspect it'll effect performance down the road. For each instruction executed, the program counter, instruction, and register value...
by janzdott
Tue Oct 08, 2013 12:09 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

@ulfalizer So by overlapping, you mean they happen at the same time? There's so many quirks that make this stuff hard to understand. I'm definitely gonna need to keep reading up on this stuff. @tokumaro I checked the correct log file and compared it to mine. There's a bug in an opcode somewhere, but...
by janzdott
Tue Oct 08, 2013 2:53 am
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

Well I tried out a CPU test ROM, and a hard time getting it to work, but there was a problem with my ROM loading. I got it working now, and it executes a lot of code until it hits a loop. I'm not sure if that's intended or not. I do have 4 opcodes that aren't implemented yet. I wrote a function that...
by janzdott
Mon Oct 07, 2013 7:44 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

You can look in http://nesdev.com/6502_cpu.txt to see what reads/writes are done for different instructions. Implementing the instructions like in that doc is feasible, and makes the timing work out "automagically" without tables. You can also factor out the fetch of the opcode and the by...
by janzdott
Mon Oct 07, 2013 3:08 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

For what it's worth, I do "slow" CPU emulation with interrupt polling in each instruction and no prediction Hmm, I was going to write a interrupt function that just sets the program counter whenever it's called. How did you set it up to check for interrupts every cycle? I would imagine th...
by janzdott
Sun Oct 06, 2013 7:34 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

Well it says NESemdev now, but someone must've moved it. Sorry! I'll post any further questions I have in this thread when they come up
by janzdott
Sun Oct 06, 2013 1:09 pm
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

Thanks guys. That answered all my basic questions. So, for memory mirroring, the NES has to know when memory gets accessed, right? Would it work if I kept an array of function pointers that get called when the memory is read from or written to? And about the whole CPU testing... I found a website th...
by janzdott
Sat Oct 05, 2013 2:45 am
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

Re: First steps in writing an emulator

Thank you. Yeah, I'm going to inline the functions. I'm not too worried about performance yet. I just want to get it up and running before I worry about optimization. So the reset vector tells the program counter where to start? If I have the program banks loaded into memory, and get memory mirrorin...
by janzdott
Sat Oct 05, 2013 12:24 am
Forum: NESemdev
Topic: First steps in writing an emulator
Replies: 75
Views: 36541

First steps in writing an emulator

Hey guys, I'm new here. Glad I found the place :D I've been interested in emulators since I found out they existed. I downloaded a N64 emulator and started playing old N64 games from my childhood. The N64 was my favorite, and the nostalgia of playing those games again was great :D I thought it would...