Page 1 of 1

Banked ROM

Posted: Thu Jun 17, 2021 4:58 pm
by Andrew

Hi all, just a quick question.  Can the banked ROM at addresses $C000-$FFFF be banked out for RAM?  I'm pretty certain the answer is no but I can't find where I read that now.


Banked ROM

Posted: Thu Jun 17, 2021 6:23 pm
by Fnord42

Nope, not possible. Wouldn't give you much of an advantage anyway, except if you want to copy large amounts of data from one area in banked ram to another.

Plus, you'd have to deal with the reset and interrupt vectors which are hardcoded at the end of the 65C02's address space.


Banked ROM

Posted: Thu Jun 17, 2021 7:14 pm
by Andrew

Thanks, that's what I thought.

Since posting the question I went and re-watched "Building my Dream Computer - Part 2" and realised that it says ~40K LOW RAM quite clearly on the board.  And I was about to post that I had answered my own question when I went down a bit of a rabbit hole...

The serial number on the low RAM memory indicates that it's a 128K chip (which doesn't mean anything if those higher addresses aren't connected).  Of course I needed to see if maybe they were connected and spent way to much time trying to find traces from the back of the board to the MEMORY DECODE and BANK SEL chips.   I couldn't find them (but I had fun trying) and came back here.


Banked ROM

Posted: Thu Jun 17, 2021 7:26 pm
by StephenHorn

The high RAM memory, 0xa000-0xbfff will be bankable. The prototype boards in Dave's videos probably date back to when banking was handled through one of the VIA controllers. Now it's on ZP address $00.

(As already answered, ROM memory 0xc000-0xffff will be bankable, but only to other ROM memory. That is now on ZP address $01.)

Edit: Low -> High. It's what I meant, honest. ?


Banked ROM

Posted: Fri Jun 18, 2021 12:42 am
by Ed Minchau


5 hours ago, StephenHorn said:




The low RAM memory, 0xa000-0xbfff will be bankable. The prototype boards in Dave's videos probably date back to when banking was handled through one of the VIA controllers. Now it's on ZP address $00.



(As already answered, ROM memory 0xc000-0xffff will be bankable, but only to other ROM memory. That is now on ZP address $01.)



I think you have that backwards. 


Banked ROM

Posted: Fri Jun 18, 2021 1:05 am
by StephenHorn


22 minutes ago, Ed Minchau said:




I think you have that backwards. 





Banked Memory


The currently enabled RAM and ROM banks can be configured by writing to zero page locations 0 and 1:


















Address

Description

$0000

Current RAM bank (0-255)

$0001

Current ROM bank (0-31)

The currently set banks can also be read back from the respective memory locations. Both settings default to 0 on RESET. The upper three bits of location 1 are undefined.

https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#banked-memory

Edit: Doh, I meant High RAM.