Banked ROM

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
Andrew
Posts: 3
Joined: Thu Jun 10, 2021 9:36 am

Banked ROM

Post 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.

Fnord42
Posts: 74
Joined: Fri Aug 14, 2020 8:56 am

Banked ROM

Post 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.

Andrew
Posts: 3
Joined: Thu Jun 10, 2021 9:36 am

Banked ROM

Post 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.

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Banked ROM

Post 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. ?

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
Ed Minchau
Posts: 503
Joined: Sat Jul 11, 2020 3:30 pm

Banked ROM

Post 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. 

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Banked ROM

Post 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.

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
Post Reply