Okay. Deep breath - and preparing to be embarrassed
Garth Wilson has a LOT of extremely useful stuff on here. if you are reading this Garth - THANK YOU!
However. I am somewhat lost with one small part of Garth's address decoding primer -
http://wilsonminesco.com/6502primer/addr_decoding.htmlQuote:
Garth has this table:
RAM $0000-3FFF (only 1/2 of 32KB available. Writing to I/O also writes to the upper half of RAM, but
you can't read it back since it would interfere with I/O.)
ROM $8000-FFFF (all 32KB available)
VIA1 $6000-600F
VIA2 $5000-500F
VIA3 $4800-480F
ACIA1 $4400-4403
ACIA2 $4200, 4204, 4208, 420C
ACIA3 $4100, 4104, 4108, 410C
(and up to four more I/O ICs could be added)
I am fine with the RAM and ROM and with VIA1, 2 and 3
When it comes to the ACIAs, I am fine with ACIA1 but I don't see the need to use the addresses 4204, 4208 and 420C. They will work, but what's wrong with 4200, 4201, 4202 and 4203?
Similarly for ACIA3 - the addresses show will work but what's wrong with 4100, 1, 2 & 3?
A little further on Garth has this table, where he talks about unique addresses:
Quote:
62256 SRAM: $0000-3FFF (binary 00xxxxxxxxxxxxxx) (There are no 16Kx8 SRAMs, so here we use half of a 32Kx8.)
6522 VIA1: $4010-401F (binary 010000000001xxxx)
6522 VIA2: $4020-402F (binary 010000000010xxxx)
6522 VIA3: $4040-404F (binary 010000000100xxxx)
6551 ACIA1: $4080-4083 (binary 010000001000xxxx)
6551 ACIA2: $4100-4103 (binary 010000010000xxxx)
6551 ACIA3: $4200-4203 (binary 010000100000xxxx)
27256 ROM: $8000-FFFF (binary 1xxxxxxxxxxxxxxx)
again, I understand the RAM and ROM but the VIAs and ACIAs don't match up with the previous table. I would have expected them to be address subsets of entries in the previous table.
for example, for
VIA1, which I calculate to be selected anywhere from $6000 - $7FFF, its unique range (i.e. when it is selected but nothing else, is $6000 - $60FF - so, I would use $6000-$600F in my programs.
VIA2, which I calculate to be selected anywhere from $5000 - $5FFF AND $7000-$7FFF, its unique range (i.e. when it is selected but nothing else, is $5000 - $50FF - so, I would use $5000-$500F in my programs.
(I similarly don't understand VAI3 or the ACIAS)
I am loath to think Garth has made a mistake, its highly likely it's me. Can someone put me right please!