Setting up an eprom with coral basic interpreter

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
mrtinb
Posts: 1939
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Setting up an eprom with coral basic interpreter

Post by mrtinb »

I don’t have the code here on my phone, so the reply was just my own conclusion from the small article.

Maybe I have time to investigate later today.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
Paul
Posts: 1545
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Setting up an eprom with coral basic interpreter

Post by Paul »

I found the codes in original ZX81 ROM and also in ZX81X2 ROM
In the ASM file(s) search for L0419:
After RAM initialisation
CLS is called - should be replaced by $2000
That's why it should then read $00 $20 -
And then continued by automatic listing of the program which is empty at boot time, so it lists nothing.
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Setting up an eprom with coral basic interpreter

Post by xubuntu »

Nice Paul, such power in you.

I found it too but it DIDN't work for me.

L0419: CALL L0A2A ; routine CLS
LD HL,($400A) ; sv E_PPC_lo
LD DE,($4023) ; sv S_TOP_lo
AND A ;
SBC HL,DE ;

I changed:
CD 07 02 CD 2A 0A 2A 0A 40 ED 5B 23 40 A7 ED 52 EB
to:
CD 07 02 CD 00 20 2A 0A 40 ED 5B 23 40 A7 ED 52 EB

It doesn't return a prompt or a K, nothing.No initialize.

I replaced the CLS call with something else to check if the CLS was required, and ofcourse it's not required.

You can replace the CLS call with NOP or with 2x CALL L0207 (repeat the 3 previous bytes) and it will still initialize.

And when it initializes... I give RAND USR 8192 and it calls CBI correctly and works.

How weird is that.

:x
User avatar
Paul
Posts: 1545
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Setting up an eprom with coral basic interpreter

Post by Paul »

You have eightyone.
Set a breakpoint at $2000 and see what is different when call from the prompt or call from $0419
Pay attention on the stack and the registers.
Maybe I can give it a try tomorrow after a morning dive in a nearby lake.
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
Paul
Posts: 1545
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Setting up an eprom with coral basic interpreter

Post by Paul »

I couldn't wait.
the CLS is needed, so I added a little routine to ROM at adress 13600 and Call this instead of 8192

Code: Select all

#define     progStart   $3520	;13600
.org        progStart

    call $0A2A    	;CLS
    ld BC, $10D2	;setup STACK
    push BC		;STACK
    ld BC, $19A7
    push BC		;STACK
    ld BC, $1520
    push BC		;Stack
    exx			;setup registers
    ld BC, $FFF0
    ld DE, $002B
    ld HL, $10D2
    ld A, $FF
    exx
    ld DE, $2000
    ld HL, $43A4
    ld BC, $1520
    ld A, $00
    JP $2000		;call CORAL Basic

You can EXIT to ZX-Basic, but if autolist is called (enter), you return to Coral Basic
I'm not shure if the whole stuff is needed, but works properly with it
CORAL.ZIP deleted, see new version
Have fun
Paul
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
mrtinb
Posts: 1939
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Setting up an eprom with coral basic interpreter

Post by mrtinb »

Great recipe Paul. :) Quite useful for other solutions as well in the future.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Setting up an eprom with coral basic interpreter

Post by xubuntu »

AMAZING. Magic. PURE MAGIC.

:o :o :o :o :o :o :o :o :o :o

Paul, did you base your rom on version 2.0 or 3.0 ?

But guys, If I am not mistaken, the maximum rom the actual zx81 can read it 8k, right ?

I mean, we can't have this eprom installed for real, can we ?

How could we install a bigger eprom on the actual machine? What modification would it require from technical standpoint ?
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Setting up an eprom with coral basic interpreter

Post by xubuntu »

OUR NEW ROM IS INCREDIBLE :mrgreen:
User avatar
Paul
Posts: 1545
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Setting up an eprom with coral basic interpreter

Post by Paul »

xubuntu wrote: Sat Nov 05, 2022 6:01 am AMAZING. Magic. PURE MAGIC.

:o :o :o :o :o :o :o :o :o :o

Paul, did you base your rom on version 2.0 or 3.0 ?
It's version three
The original Zeddy adresses the devices in 16 K bunches. So the only thing to make Shure is that the necessary adress lines are connected. I'm not Shure.
The other thing: I'm not sure the code is ROM capable.
I needed to enable write to ROM to make it run.
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Setting up an eprom with coral basic interpreter

Post by xubuntu »

Me too, I had to switch off "write protection".

If anyone knows what it takes for all 16k to be readable/addressable (whatever you call it), please let us know, thank you.
Post Reply