Author Topic: Memory Map ?  (Read 5117 times)

0 Members and 1 Guest are viewing this topic.

Offline Audronic

  • 6128 Plus
  • ******
  • Posts: 1.369
  • Country: au
  • I know RST3 . I now know a little More.
  • Liked: 305
  • Likes Given: 699
Memory Map ?
« on: 06:47, 28 May 15 »
Hi All


does anybody have link to a simple Memory Map for a CPC 464 Please, Where the basic rom sits etc

Thanks Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Memory Map ?
« Reply #1 on: 11:24, 28 May 15 »
Hi All


does anybody have link to a simple Memory Map for a CPC 464 Please, Where the basic rom sits etc

Thanks Ray


If OS is paged in, it sits at &0000-&3fff.
If an expansion ROM is paged in (this includes BASIC), it sits at &c000-&ffff.

You can disable the roms and have the full ram from &0000-&ffff.

If you are using firmware (includes using BASIC) the lower jumpblock is at &0000-&0040 and the upper jumpblock is around &b900-&bf00.
Stack is around &bf00-&c000 (starts &c000 and grows down).

If you are choosing to write your own programs that take control of the hardware, implement your own interrupt handler, setup the hardware as you need it and you can use all the memory as you wish, you can relocate the screen and stack.

Standard interrupt vector is at &0038.

Basic starts at &170 and grows up to HIMEM. HIMEM is set around &b0ff for 464, but lower for other systems with extra roms attached because roms can reserve some ram if they need it.

Screen is normally at &c000-&ffff.




« Last Edit: 11:31, 28 May 15 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Johnny Olsen

  • Supporter
  • CPC6128
  • *
  • Posts: 289
  • Country: dk
  • Liked: 217
  • Likes Given: 430
Re: Memory Map ?
« Reply #2 on: 11:50, 28 May 15 »
Here is a copy from soft 968 explaining the memory map

Offline Audronic

  • 6128 Plus
  • ******
  • Posts: 1.369
  • Country: au
  • I know RST3 . I now know a little More.
  • Liked: 305
  • Likes Given: 699
Re: Memory Map ?
« Reply #3 on: 12:06, 28 May 15 »
@ arnoldemu


Thanks for the info.


@ Johnny Olsen


Thanks for the Table and the other info.


Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Offline gorgh

  • CPC464
  • **
  • Posts: 16
  • Country: pl
  • Liked: 9
  • Likes Given: 6
Re: Memory Map ?
« Reply #4 on: 18:54, 20 August 18 »
bump
I've got a question, where are the hardware registers located?

LambdaMikel

  • Guest
Re: Memory Map ?
« Reply #5 on: 19:04, 20 August 18 »
In the chips themselves. Z80 doesn't have a zero page.

Offline gorgh

  • CPC464
  • **
  • Posts: 16
  • Country: pl
  • Liked: 9
  • Likes Given: 6
Re: Memory Map ?
« Reply #6 on: 19:11, 20 August 18 »
yeah, but I mean registers responsible for i/o,sound and graphics, I've found a note that "The recommended I/O [Gate Array] port address is &7Fxx." does it mean it can be changed? I would really need to change the location of Gate Array

LambdaMikel

  • Guest
Re: Memory Map ?
« Reply #7 on: 19:22, 20 August 18 »
Right, these registers responsible for sound, graphics, etc., are still in the chips themselves though  :D

The Z80 has an out command. So, rather than writing into memory, you would use out &hardware-register-address, value

There is a list on the wiki of the IO ports.


No idea what you mean with you want to change the location of the Gate Array - soldering iron??  :laugh:

Offline gorgh

  • CPC464
  • **
  • Posts: 16
  • Country: pl
  • Liked: 9
  • Likes Given: 6
Re: Memory Map ?
« Reply #8 on: 19:26, 20 August 18 »
ah, so does it mean the memory RAM isn't altered when the program calls the registers by OUT instruction?

LambdaMikel

  • Guest
Re: Memory Map ?
« Reply #9 on: 19:33, 20 August 18 »
ah, so does it mean the memory RAM isn't altered when the program calls the registers by OUT instruction?

Yes, that's right. It is not like on the 6502, which has memory mapped IO. Z80 has separate memory address and IO port address bus - no conflict.

Of course, there are some "registers" in memory, but those are for the software (BASIC stackpointer, OS, keyboard input buffers, etc... ) If you overwrite these, the system crashes unless you know what you are doing  ;)

Offline gorgh

  • CPC464
  • **
  • Posts: 16
  • Country: pl
  • Liked: 9
  • Likes Given: 6
Re: Memory Map ?
« Reply #10 on: 19:40, 20 August 18 »
wow, that's great, I'm surprised how well Amstrad is designed, the more I study the architecture the more I like it
(thanks)

LambdaMikel

  • Guest
Re: Memory Map ?
« Reply #11 on: 20:05, 20 August 18 »
wow, that's great, I'm surprised how well Amstrad is designed, the more I study the architecture the more I like it
(thanks)

You are welcome. Even though this aspect is mainly caused by the Z80 CPU. All other Z80 system are similar in that regard.

A great read is this one if you want to learn more about Z80 computers and their design:

"Build Your Own Z80 Computer" by Steve Ciarcia. You should be able to find the PDF online.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.351
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1099
  • Likes Given: 2645
Re: Memory Map ?
« Reply #12 on: 18:28, 21 August 18 »
I guess what you search is here:

http://www.cpcwiki.eu/index.php/I/O_Port_Summary
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.03.01)

Offline gorgh

  • CPC464
  • **
  • Posts: 16
  • Country: pl
  • Liked: 9
  • Likes Given: 6
Re: Memory Map ?
« Reply #13 on: 14:41, 22 August 18 »
thanks!