Author Topic: Memory Expansion - Code 3  (Read 1234 times)

0 Members and 1 Guest are viewing this topic.

Offline IanS

  • CPC6128
  • ****
  • Posts: 195
  • Country: gb
    • index.php?action=treasury
  • Liked: 50
  • Likes Given: 42
Memory Expansion - Code 3
« on: 01:40, 27 August 12 »
How does the external memory expansion (e.g. dk'tronics) remap the memory map of the internal Ram?

The Ram banking configuration "3" shows the internal ram bank "RAM_3" (normally @ c000-ffff) mapped to the 4000-7fff region.

I can see how this is done on the 6128 as the PAL feeds the A14 & A15 (a14_out & a15_out) values into the MUX. I can't see an external device on a 464 could remap this.

The dk'tronics tech manual has a disclaimers about it only working if the upper ram is disabled.

Anyone know how it does it?

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Memory Expansion - Code 3
« Reply #1 on: 12:59, 27 August 12 »
How does the external memory expansion (e.g. dk'tronics) remap the memory map of the internal Ram?

The Ram banking configuration "3" shows the internal ram bank "RAM_3" (normally @ c000-ffff) mapped to the 4000-7fff region.

I can see how this is done on the 6128 as the PAL feeds the A14 & A15 (a14_out & a15_out) values into the MUX. I can't see an external device on a 464 could remap this.

The dk'tronics tech manual has a disclaimers about it only working if the upper ram is disabled.

Anyone know how it does it?
I tested this on a 464 and dk'tronics 64k expansion.

When ROM is disabled, it works as expected. &c000-&ffff moves to &4000-&7fff, and page 7 is seen in &c000-&ffff.
When ROM is enabled, you can read it in the range &4000-&7fff, with page 7 at &c000-&ffff.
This seems to indicate it actually does some address remapping using A14 and A15. But I don't have enough technical knowledge to know how it does this.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline IanS

  • CPC6128
  • ****
  • Posts: 195
  • Country: gb
    • index.php?action=treasury
  • Liked: 50
  • Likes Given: 42
Re: Memory Expansion - Code 3
« Reply #2 on: 13:43, 27 August 12 »
When ROM is disabled, it works as expected. &c000-&ffff moves to &4000-&7fff, and page 7 is seen in &c000-&ffff.
When ROM is enabled, you can read it in the range &4000-&7fff, with page 7 at &c000-&ffff.
Can you explain the difference between these? should it be:-

When ROM is enabled, you cannot read it in the range &4000-&7fff, with page 7 at &c000-&ffff.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Memory Expansion - Code 3
« Reply #3 on: 13:51, 27 August 12 »
Can you explain the difference between these? should it be:-

When ROM is enabled, you cannot read it in the range &4000-&7fff, with page 7 at &c000-&ffff.
Yes.

On 464, when ROM is enabled, you can read the upper ROM at &4000-&7ffff. Not RAM. You can write to this range, and it will write to the RAM like normal. And it seems the ram you can write to under the ROM is from &c000-&ffff originally.

When ROM is disabled, you can read and write RAM at &4000-&7fff, it is the ram that was originally at &c000-&ffff.

On 6128, the rom does not move. if it is enabled, it is always readablle at &c000-&ffff.

So that is the difference.
 
So on 464, the ROM also moves with this configuration. This does not happen with 6128, because of the PAL and it's direct link to RAM.

Sorry that my original description was not so clear.


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource