CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: Audronic on 04:47, 28 May 15

Title: Memory Map ?
Post by: Audronic on 04: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
Title: Re: Memory Map ?
Post by: arnoldemu on 09:24, 28 May 15
Quote from: Audronic on 04: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


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.




Title: Re: Memory Map ?
Post by: Johnny Olsen on 09:50, 28 May 15
Here is a copy from soft 968 explaining the memory map
Title: Re: Memory Map ?
Post by: Audronic on 10:06, 28 May 15
@ arnoldemu


Thanks for the info.


@ Johnny Olsen


Thanks for the Table and the other info.


Ray
Title: Re: Memory Map ?
Post by: gorgh on 16:54, 20 August 18
bump
I've got a question, where are the hardware registers located?
Title: Re: Memory Map ?
Post by: LambdaMikel on 17:04, 20 August 18
In the chips themselves. Z80 doesn't have a zero page.
Title: Re: Memory Map ?
Post by: gorgh on 17: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
Title: Re: Memory Map ?
Post by: LambdaMikel on 17: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:
Title: Re: Memory Map ?
Post by: gorgh on 17:26, 20 August 18
ah, so does it mean the memory RAM isn't altered when the program calls the registers by OUT instruction?
Title: Re: Memory Map ?
Post by: LambdaMikel on 17:33, 20 August 18
Quote from: gorgh on 17:26, 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  ;)
Title: Re: Memory Map ?
Post by: gorgh on 17: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)
Title: Re: Memory Map ?
Post by: LambdaMikel on 18:05, 20 August 18
Quote from: gorgh on 17: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)

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.
Title: Re: Memory Map ?
Post by: GUNHED on 16:28, 21 August 18
I guess what you search is here:

http://www.cpcwiki.eu/index.php/I/O_Port_Summary
Title: Re: Memory Map ?
Post by: gorgh on 12:41, 22 August 18
thanks!
Powered by SMFPacks Menu Editor Mod