Search found 53 matches

by tineras
Mon Jul 05, 2010 1:05 pm
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

Maybe this wouldn't be nearly as confusing if you guys would stop talking about "CPU memory". This doesn't make any sense - the CPU is a chip that fetches instructions from other memory chips (internal RAM, SRAM, PRG-ROM). There is no memory in the CPU, there is just several registers. I'...
by tineras
Mon Jul 05, 2010 12:38 pm
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

1. A9 00 // Load Accum with 00 2. 8D 03 20 // Load $2003 with 00 3. A9 02 // Load 'N' value to Accum (2 in this case) 4. 8D 14 40 // Load $4014 with 'N' 5. Multiply 'N' * 100 = $0200 6. Contents get copied from ($0000-$00FF) to ($0200-$02FF) No, they get copied from CPU $0200-$02FF to SPR-RAM/OAM $...
by tineras
Mon Jul 05, 2010 12:09 pm
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

The source address is what is written to $4014 times 256. The destination address in OAM is the value written to $2003. Since OAM is only 256 bytes, one byte is enough to specify any part of it. If the end of OAM is reached and there are still bytes to copy, the address wraps around and goes back t...
by tineras
Mon Jul 05, 2010 11:45 am
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

My question is, where do the 256 bytes come from? From (N * $100) to (N * $100 + $FF). The number written to $4014 specifies which page (256-byte chunk) from CPU memory gets copied to OAM. If you write 2, $0200-$02FF will be copied. I get that part, but what memory am I copying to and from? 1. Sour...
by tineras
Mon Jul 05, 2010 11:34 am
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

Do I understand this correctly? To use $4014: 1. Clear $2003 2. Load Accum with 'N' to be multiplied later 3. Write Accum to $4014 4. An internal operation (written by me of course) will multiply N*100 and give OAM address 5. Internal operation writes 256 bytes to newly given OAM address My question...
by tineras
Mon Jul 05, 2010 9:47 am
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

Re: Cartridge / Memory Questions

I do have a question about SPR-RAM. SPR RAM is what I called OAM before. I think OAM stands for Object Attribute Memory, but both names are OK I guess, I'm just saying so that you know it is when you read it in the future. Is this also generated by the PRG-ROM and stored in CPU memory using the $40...
by tineras
Mon Jul 05, 2010 9:31 am
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

Re: Cartridge / Memory Questions

Thank you for the quick response. It's nice when there is a supportive community out there! I've been working on this for a while and trying to avoid using forums so I'd be forced to learn as much as I could on my own, but today I just buckled. Oh well. ,and if the row is 16 bytes the last one would...
by tineras
Mon Jul 05, 2010 8:48 am
Forum: Newbie Help Center
Topic: Cartridge / Memory Questions
Replies: 22
Views: 6593

Cartridge / Memory Questions

I have some questions on how cartridge data is loaded into CPU memory on startup. I am using some simple test programs to make it easier for me to understand what's going on, but I still have a few questions. For example, when viewing these .nes files in a hex editor, I can see that total address sp...