Program in EPROM

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
Markie_V
Posts: 6
Joined: Sat Oct 11, 2014 10:51 am

Program in EPROM

Post by Markie_V »

Since a while I'm starting to play with my ZX81 again and I would like to restore some old projects I did a long time ago.

One of them was a 'plant watering system' I made in 1986 which should give my plants water when I was on military exercise.
This was based on a ZX81 with a homebrew I/O interface and some (washing machine) magnetic waterlocks... :roll:
It was one of the most highly!! none reliable systems I ever build, but I will not go to deep into that. :D

One of the biggest problems was to restart the system, the only thing to load the program again was the cassette player.
It would be so much easier if I could store the program in EPROM and auto start on reset.

The question is, is this possible?

I can imagine if I rewrite the whole program in assembler I can store this in EPROM and with the right reset vector it should
start after a reset.
Since speed is no issue I still could use the BASIC interpreter with the difference that the program is stored in EPROM and not
in RAM.

Any thoughts on this?

Grtzz Mark

PS: I know an Atmel 328p can do this with two fingers in it's nose, but where's the fun in that...
User avatar
XavSnap
Posts: 2195
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Program in EPROM

Post by XavSnap »

Hi Markie_V,

To Load a P file in ROM, and auto execute it:
Have a look to this tread: https://www.sinclairzxworld.com/viewtop ... f=7&t=5531

Only the MEMOTECH MEMOCALC & MEMOTEXT can patch to ZX81 ROM (using a PLA) to start an ASM program.
But, Wilf Rigter can do it with a simple ROM patch...
https://quix.us/timex/rigter/AutoBasic.html
You had to burn a new 8k ROM, to launch you code. (Or use a dedicated card to swap the ZX81 ROM, the Zxpand for example)
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
1024MAK
Posts: 5534
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Program in EPROM

Post by 1024MAK »

Given that you are going to be burning an EPROM anyway, the easiest way is to use a 16K byte (27128). Patch the BASIC part to jump to the ‘upper’ half, where you can have a short bit of code to copy your program into RAM and then set-up the BASIC system. Then jump to the main loop in the BASIC ROM with BASIC set to execute mode.

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

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

Re: Program in EPROM

Post by Paul »

Try search for store demonstrator in this forum.
It does what you want
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
XavSnap
Posts: 2195
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Program in EPROM

Post by XavSnap »

"store demonstrator":
https://www.sinclairzxworld.com/viewtop ... 092#p46092

PCB:
http://zx81.ordi5.free.fr/CartesZx81/Ti ... onstrator/

Just change ASM codes to call all offset @$2000 instead of @$4000, and a simple RUN launch it.
Your BASIC/ASM program will RUN with a 1K/2K ZX81/TS1000...
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply