Search found 29 matches

by mreiland
Fri Jan 08, 2016 7:39 pm
Forum: Newbie Help Center
Topic: SBC help
Replies: 8
Views: 4898

Re: SBC help

And when subtracting, the carry is the ones' complement (i.e. the inverse) of bit 8 from the result of the previous subtraction. It makes sense, considering that a subtraction is just an addition that uses the number's ones' complement. that helps, I think I have it. It also makes it more clear why...
by mreiland
Fri Jan 08, 2016 1:08 am
Forum: Newbie Help Center
Topic: SBC help
Replies: 8
Views: 4898

Re: SBC help

I'm just now getting back to this due to the holidays (happy belated holidays everyone!). I think part of my issue is it's been so long since I've worked directly with binary and two's complement that I no longer *think* in them. I understand what they are, their pros and cons, etc, but I'm slow. I ...
by mreiland
Fri Dec 11, 2015 7:38 pm
Forum: Newbie Help Center
Topic: SBC help
Replies: 8
Views: 4898

SBC help

Hey guys, I've got SBC working correctly, but I don't understand why. I'm working off of the following document: http://teaching.idallen.com/dat2343/10f/notes/040_overflow.txt Here's pseudocodehere's my implementation var a = cpu.A; var b = mem.read(addr); int16 diff = a - b - !cpu.C cpu.A = (uint8)...
by mreiland
Sat Nov 28, 2015 6:41 pm
Forum: Newbie Help Center
Topic: Clarification of verbiage on wiki (processor status related)
Replies: 7
Views: 3182

Re: Clarification of verbiage on wiki (processor status rela

I'm curious about the implementation of GetOverflow. In particular, you have the 3 overflow flags, could you explain why you chose to model it that way?
by mreiland
Fri Nov 27, 2015 8:14 am
Forum: Newbie Help Center
Topic: Clarification of verbiage on wiki (processor status related)
Replies: 7
Views: 3182

Re: Clarification of verbiage on wiki (processor status rela

Your post is fairly confusing, you're taking about PHP but then show stack.pull(), etc. I think this page explains it better: http://wiki.nesdev.com/w/index.php/CPU_status_flag_behavior You're right, it is confusing (and wrong). I've edited it for corrections and to make it more clear. My brain was...
by mreiland
Thu Nov 26, 2015 10:34 pm
Forum: Newbie Help Center
Topic: Clarification of verbiage on wiki (processor status related)
Replies: 7
Views: 3182

Clarification of verbiage on wiki (processor status related)

http://wiki.nesdev.com/w/index.php/Status_flags On the 6502, bit 5 of the copy is always set, and bit 4 is set BRK or PHP, clear if an interrupt. When restoring the flags from memory, bits 4 and 5 are ignored, since again, there are only 6 status flags, and thus the extra 2 bits of the byte must be...
by mreiland
Thu Nov 26, 2015 10:14 pm
Forum: Newbie Help Center
Topic: What's with the NOP opcode?
Replies: 11
Views: 3818

Re: What's with the NOP opcode?

that's the plan :)

I'm learning as I'm going, this allows me to concentrate my efforts on specific areas and ignore the rest until I'm ready to take a closer look.
by mreiland
Sat Nov 21, 2015 10:40 pm
Forum: Newbie Help Center
Topic: What's with the NOP opcode?
Replies: 11
Views: 3818

Re: What's with the NOP opcode?

For now I'm just throwing an error when an illegal opcode gets reached, but I would eventually like to implement them. I've started going through nestest.nes (along with the log) to implement the official opcodes. When I get to the point that I'm ready to implement the other opcodes, are there any t...
by mreiland
Sat Nov 21, 2015 3:01 am
Forum: Newbie Help Center
Topic: What's with the NOP opcode?
Replies: 11
Views: 3818

What's with the NOP opcode?

According to this: http://www.6502.org/tutorials/6502opcodes.html#NOP NOP is 0xEA However, when looking at the matrix here: http://www.oxyron.de/html/opcodes02.html I'm seeing these listed as NOP also (listed below the question). My question is: what's the difference? is 0xEA the "official"...
by mreiland
Sun May 03, 2015 5:58 am
Forum: Newbie Help Center
Topic: good dasm documentation?
Replies: 9
Views: 6643

Re: good dasm documentation?

Also, if my post seems disjointed it's because I'm tired :)

I appreciate the resources you've mentioned here, I'll be coming back and looking further into them when I'm a little more coherent.
by mreiland
Sun May 03, 2015 5:54 am
Forum: Newbie Help Center
Topic: good dasm documentation?
Replies: 9
Views: 6643

Re: good dasm documentation?

There are two subjects being repeatedly intermixed here, and I've been having trouble figuring out what exactly is truly needed/wanted by the OP, while having to make blind assumptions about experience level. Thus I'll cover both: It's probably safe to assume I'm a dumbass :) This will be a little ...
by mreiland
Sat May 02, 2015 3:37 pm
Forum: Newbie Help Center
Topic: good dasm documentation?
Replies: 9
Views: 6643

Re: good dasm documentation?

And if you have a tool you think is better suited for my purposes, by all means, I just grabbed dasm because someone else stated that's what they've been using (successfully). I'm not too invested in the specific tool I'm using, I just want to be able to produce binaries myself from 6502 assembly.
by mreiland
Sat May 02, 2015 3:36 pm
Forum: Newbie Help Center
Topic: good dasm documentation?
Replies: 9
Views: 6643

Re: good dasm documentation?

I want to be able to start testing my CPU, and also be able to understand some of the other test suites out there. A lot of the information out there explains things I already understand such as addressing modes, etc, but don't really go into detail about 6502 asm dev. Also, with tidbits that I ment...
by mreiland
Sat May 02, 2015 3:42 am
Forum: Newbie Help Center
Topic: good dasm documentation?
Replies: 9
Views: 6643

Re: good dasm documentation?

Found something useful: http://www.nintendoage.com/forum/messag ... eadid=4440

I can't believe how long it took me to find that.

I'm still looking for more resources though if you guys have anything to add to it.