Memory map

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
Gary C
Posts: 3
Joined: Tue Jun 05, 2018 9:22 pm

Memory map

Post by Gary C »

Hi

I have a ZX81 issue 1 with the 622 ROM and the classic MEMOPAK 16K and I think I have a problem with the memory (3d monster maze wont run !)

When I hackup a memory test, locations from 32725 to 32768 seem to be faulty.

But I can't find a straight forward memory map to check if this area is being used for anything or if its actually a problem.

I could just whip out all the RAM's and put them in the tester, but its a bit of a pain and risks damage.

Does anyone have a link to the definitive memory map(s) ?
User avatar
1024MAK
Posts: 5153
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Memory map

Post by 1024MAK »

Does this topic help?

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
Paul
Posts: 1536
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Memory map

Post by Paul »

From 32768 downwards is the Z80 stack that's definitely used once the Z80 runs
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
1024MAK
Posts: 5153
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Memory map

Post by 1024MAK »

ZX81 16K RAM Memory Test Program

Hi, can you try this test program.

First from the command line enter directly these commands:

POKE 16388,0
POKE 16389,68
NEW

This sets RAMTOP to 17408

Then enter and run this program

Code: Select all

5 FAST
10 LET A=17408
15 LET A=A+1024
20 IF A>32767 THEN GOTO 80
25 PRINT
30 LET B=PEEK A
35 POKE A,0
40 LET C=PEEK A
45 POKE A,170
50 LET D=PEEK A
55 POKE A,85
60 LET E=PEEK A
65 PRINT A;",";B;",";C;",";D;",";E;" ";
70 IF C=0 AND D=170 AND E=85 THEN GOTO 15
75 PRINT "ERROR"
80 PRINT "END"
85 SLOW
This is the result on one of my ZX81's with a Memotech 16k RAM pack:
Image

In terms of the actual system use of the memory, have a look at this document and Chapter 27 of the Sinclair ZX81 BASIC Programming by Steven Vickers (Second Edition 1981)

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Gary C
Posts: 3
Joined: Tue Jun 05, 2018 9:22 pm

Re: Memory map

Post by Gary C »

Paul wrote: Sat Feb 05, 2022 3:31 pm From 32768 downwards is the Z80 stack that's definitely used once the Z80 runs
Ah, the stack is up there ?

Thats why I'm seeing changing numbers.

Ran a test of memory from 18000, up to 32768 and it was only the last few bytes that didn't play so the memory is probably ok.

But it looks like a good idea to lower RAMTOP and do it again just to make sure.

Wonder why 3d maze wont work.
Post Reply