More than 16k RAM in BASIC?

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: More than 16k RAM in BASIC?

Post by Andy Rea »

the ROM needs to be enabled during refresh if the IR register is pointing to an address in ROM.... during refresh the IR (well some of it, the lower A8-A0 is produced by the ULA)

Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: More than 16k RAM in BASIC?

Post by PokeMon »

As I am decoding the address bus it shouldn't be a problem because when I get a /RFSH this will activate /RD but doesn't matter because the RAM is not enabled (/CE) as long as A14 and A15 zero. For standard video with I register pointing to $1E it shouldn't be a problem. Or what do you think ? :(

And as A14 and A15 are low, /ROMCS is active (low). So what the heck is going on ? :shock:
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: More than 16k RAM in BASIC?

Post by PokeMon »

Might be a timing problem ?
I enable /ROMCS with A15 and A14 low and /MREQ low.
As I see the instruction fetch cycle, /RFSH is going faster down than /MREQ during refresh.
One half cpu cycle, /RFSH going down with rising edge of T3 and /MREQ going down with the falling edge of T3.

Will try that to enable ROM either with /MREQ or /RFSH going low. Thought it could be done with /MREQ only which is active during refresh cycle, too. ;)

Maybe I have to enable the ROM if /M1 is going down at T1 in same way ?
Here /MREQ has a delay of half cycle in comparison to /M1 same.
Is the ROM access quite slow ?

That would maybe explain why I didn't get a picture at all - the other should maybe give just wrong data /pixel on the picture but the picture should be displayed right even if ROM enable come to late during refresh - shouldn't it ?
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: More than 16k RAM in BASIC?

Post by Andy Rea »

a standard ula samples the databus for video (pattern bits) after the mreq has gone back high again, the standard ula streches the ROMCS signal...
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: More than 16k RAM in BASIC?

Post by 1024MAK »

Rather than driving /ROMCS with a logic gate, try this:-
1024MAK wrote:You could use diodes between the address lines and /ROMCS, or use logic gates driving an transistor that connects collector to +5V and emitter to the /ROMCS. Use a pull up resistor for the base to ensure the emitter voltage is a proper logic high.
1024MAK wrote:So that the ROM still works for 0000 to 1FFF, do not drive the /ROMCS when A13 and A14 and A15 are all low.
This allows the ULA to pull /ROMCS low for addresses 0000 to 1FFF.

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
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: More than 16k RAM in BASIC?

Post by PokeMon »

It's still unclear for me now.
The /ROMCS addressing from me works fine when I do not connect /RD and /RFSH together via an OR gate.
This is difficult to trace with a conventional scope.

It seems that there is a conflict when RAM output data during refresh.
If I do not enable /OE during refresh all is working fine.
But the RAM can not be addressed (selected) when I register is set correct. Right ?

In a later design I will use LVL gate which can drive up to 32mA in high state (the LS gates are specified only with 1/80 = 0.4 mA).

I use a RAM with 70ns access time - so has to be fast enough.
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: More than 16k RAM in BASIC?

Post by PokeMon »

After reading manual I found the following hint regarding the /RFSH signal.
By the way several tests while watching with my scope showed an unstable behaviour.
Sometime "K" appeared, sometimes not, sometimes "K" disappears after several seconds, sometime just stripes.

It seems that it is not stable to just use /RFSH signal without /MREQ.
The refresh signal can not be used by itself because the refresh
address is only guaranteed to be stable during MREQ time.
Found in original Zilog manual UM008005-0205.
Zwischenablage55.gif
Zwischenablage55.gif (17.68 KiB) Viewed 5744 times
So I maybe try not the simple "solution" with just enabling RAM output either with /RD or /RFSH than only /RD OR (/RFSH & /MREQ).
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: More than 16k RAM in BASIC?

Post by PokeMon »

It's working now.
See "Houston we have an image" for details. ;)
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: More than 16k RAM in BASIC?

Post by mrtinb »

1024MAK wrote: Have a read of the instructions for a 64k RAM expansion: text file here
or scanned image files here

Mark
The scanned files have been moved here: http://k1.spdns.de/Vintage/Sinclair/80/ ... 4K/Manual/
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: More than 16k RAM in BASIC?

Post by 1024MAK »

mrtinb wrote:
1024MAK wrote: Have a read of the instructions for a 64k RAM expansion: text file here
or scanned image files here

Mark
The scanned files have been moved here: http://k1.spdns.de/Vintage/Sinclair/80/ ... 4K/Manual/
Thank you. I have edited my earlier post to update the link :D

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