Search found 25 matches

by DParrott
Tue Mar 06, 2012 12:48 pm
Forum: NESemdev
Topic: Reverse Engineering the MOS 6502 CPU (Video)
Replies: 5
Views: 5435

There's a downloadable version available with a load of other cool videos available on the CCC website. This 6502 video is at http://mirror.fem-net.de/CCC/27C3/mp4-h264-HQ/27c3-4159-en-reverse_engineering_mos_6502.mp4 There's a couple of good ones from 28c3 that might be of interest too: The Atari 2...
by DParrott
Mon Jan 24, 2011 12:38 pm
Forum: GBDev
Topic: Memory Timing
Replies: 3
Views: 4087

I think my timing code is working ok as all the previous tests pass fine. I've not made any attempt to have correct memory timing which I think is why they all fail. :-) It was more asking if it's something I need to work on that is going to cause many issues or if I'm better trying to get some sort...
by DParrott
Wed Jan 19, 2011 4:16 am
Forum: GBDev
Topic: Memory Timing
Replies: 3
Views: 4087

Memory Timing

Hi all, One more question, using Blaargs's test roms I now have my core passing all CPU instruction tests and passes the instruction timing tests fine. It fails on every one of the memory timing tests though. What is the impact of the mem timing being incorrect? Is it likely to cause many problems o...
by DParrott
Sun Jan 16, 2011 10:10 am
Forum: GBDev
Topic: Emulator CPU tests
Replies: 9
Views: 6122

OK, after playing a game of spot the muppet and fixing my ROM banking I'm there:

Code: Select all

cpu_instrs

01:ok  02:ok  03:ok  04:ok  05:ok  06:ok  07:ok  08:ok  09:ok  10:ok  11:ok  

Passed all tests
:)

Now onto the next bits.
by DParrott
Sun Jan 16, 2011 4:36 am
Forum: GBDev
Topic: Emulator CPU tests
Replies: 9
Views: 6122

IIRC, it should be set for SBC if the low 4 bits of the second operand (including the carry) are greater than the low 4 bits of the first operand. Thanks. After fixing that and some of my shifts and rotates I now get the following: cpu_instrs 01:ok 02:ok 03:ok 04:ok Passed all tests :) Not sure why...
by DParrott
Sat Jan 15, 2011 10:55 am
Forum: GBDev
Topic: Emulator CPU tests
Replies: 9
Views: 6122

I think I have narrowed it down to my SBC opcode and the H flag.

What should be happening to the H flag during SBC?
by DParrott
Sat Jan 15, 2011 9:39 am
Forum: GBDev
Topic: Emulator CPU tests
Replies: 9
Views: 6122

mic_ wrote:Well are you sure 0E is the opcode? It might be something else, like an index into the table of values that it's testing the instructions with.
No :)

That's where I'm unsure, don't know if it's the opcode or an index into the table etc.
by DParrott
Sat Jan 15, 2011 9:19 am
Forum: GBDev
Topic: Emulator CPU tests
Replies: 9
Views: 6122

Ok, I fixed test 3 and got that passing now. I wasn't calculating the H flag correctly in my 16 bit add. 09 was in fact ADD HL, BC. I don't understand the error for test 4 though as 0E is LD C,n and I can't see any problems with that, it's just doing what all the other immediate loads are doing. Any...
by DParrott
Sat Jan 15, 2011 7:36 am
Forum: GBDev
Topic: Emulator CPU tests
Replies: 9
Views: 6122

Do you mean that the 09 and 0E 0E have something to do with the flags? I've been through my instructions and compared to the gb programming reference I have and I think the instructions are doing as they should and setting/resetting the right flags. I was hoping the number output would help me try a...
by DParrott
Sat Jan 15, 2011 5:30 am
Forum: GBDev
Topic: Emulator CPU tests
Replies: 9
Views: 6122

Emulator CPU tests

I've recently started my own GB emulator and I'm currently trying to nail down the CPU. I'm using Blaarg's cpu instructions test from this thread and I've got some that come back as passed but others that are failing, I'm not sure how to interpret the output of the failed tests to try and see where ...