Some questions about the 6502

For discussing the 65xx hardware itself or electronics projects.
Post Reply
repstosw
Posts: 3
Joined: 01 Dec 2005
Contact:

Some questions about the 6502

Post by repstosw »

Hey!
I've started looking at the NES a little for a school project (computer architecture). There are two things that I havn't been able to get an answer too on the web:
1. What is the purpose of memory mirroring?
2. Why is there a lpc and an hpc?

Thankful for any help!!
/Magnus
kc5tja
Posts: 1706
Joined: 04 Jan 2003

Re: Some questions about the 6502

Post by kc5tja »

repstosw wrote:
1. What is the purpose of memory mirroring?
This question is too ambiguous to answer. Can you give some additional context on what you mean by "memory mirroring?"
Quote:
2. Why is there a lpc and an hpc?
The 6502 processes all data 8-bits at a time, so the 16-bit "register" that we call the program counter is, in reality, implemented as 2 8-bit registers, PCL and PCH.
repstosw
Posts: 3
Joined: 01 Dec 2005
Contact:

Post by repstosw »

1. Oh, sorry... Well, the NES (6502) memory has the range from $0000 to $08ff mirrored three times, up to $1fff. And at $2000 there is an 8-byte range that is mirrored every 8 bytes up to $4000. I don't understand why you would want to place the same data in several places in the memory! There must be some purpose of this, and I'd like to know what it is :)

2. Aah I should've figured that one out myself! ;)
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

I can't claim any familiarity with NES products, but what you're describing is a common effect of address-decoding simplification done when you don't need the whole address space. Such simplification not only reduces the number of parts needed, but avoids added propagation delays through the levels of glue logic. The unwanted added delays can reduce the maximum operating clock speed.
repstosw
Posts: 3
Joined: 01 Dec 2005
Contact:

Post by repstosw »

Ok, I think I understand now!
Memblers
Posts: 64
Joined: 16 Jan 2003
Location: Indianapolis
Contact:

Re: Some questions about the 6502

Post by Memblers »

Also (in the case of the video RAM for the tile map) it gave the cartridge designer some flexibility with less RAM. For the PPU there's 2kB of internal VRAM in a 4kB address space. A full screen uses 1kB. The NES brings an address input to the cart edge, so you can set the screens to be mirrored horizontally or vertically, depending what kind of scrolling you want to do in your program.
Post Reply