Re: How hardware accelerators deals with $0/$01

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Wed, 18 Oct 2017 21:12:10 +0200
Message-ID: <20171018191210.GD12939@hermes.local.trikaliotis.net>
Hello Mia,

* On Wed, Oct 18, 2017 at 05:09:59PM +0200 Mia Magnusson wrote:
> Well, since the I/O area (with VIC, SID, 2* CIA) overlaps the character
> ROM area, the VIC chip can't use that RAM anyway.

That's not true.

In fact, the VIC chip *can* use the area $D000-DFFF. That's because it
has a different memory map than the 6510.

For the 6510, the memory map is as usual:

$0000-$7FFF: RAM (always)
$8000-$9FFF: RAM or extension ROM
$A000-$BFFF: RAM or BASIC ROM
$C000-$CFFF: RAM
$D000-$DFFF: RAM or I/O or CHAR ROM
$E000-$FFFF: RAM or KERNAL ROM

For the VIC chip, the memory map is different. It can address only 16 KB
of the memory area; with the help of CIA1, it gets A14 and A15 in order
to be able to move the 16 KB memory window in the 64 KB 6510 memory map.


The 16 KB memory map of the VIC looks like this:
$0000-$0FFF: RAM
$1000-$1FFF: RAM or CHAR ROM
$2000-$3FFF: RAM

You see that the VIC chip *never* sees the I/O area!

Additionally, the selection of RAM or CHAR ROM at $1000-$1FFF is done by
A14. That is, if A14 is 0, then the CHAR ROM is visible, otherwise, RAM
is visible.

Thus, the complete 64 KB memory map of the VIC looks like:


      16 KB BANK 0:
$0000-$0FFF: RAM
$1000-$1FFF: CHAR ROM
$2000-$3FFF: RAM
---------------------
      16 KB BANK 1:
$4000-$4FFF: RAM
$5000-$5FFF: RAM
$6000-$7FFF: RAM
---------------------
      16 KB BANK 2:
$8000-$8FFF: RAM
$9000-$9FFF: CHAR ROM
$A000-$BFFF: RAM
---------------------
      16 KB BANK 3:
$C000-$CFFF: RAM
$D000-$DFFF: RAM  <---- USABLE!
$E000-$FFFF: RAM

But you are right, there is no reason to change the memory map with the
help of the 6510 on-board I/O port, as it does not affect the VIC memory
map in any way!

I think that's what you wanted to tell us, right?

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list
Received on 2017-10-18 20:03:04

Archive generated by hypermail 2.2.0.