New ZX81 Games

General games-related topics
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: New ZX81 Games

Post by Fruitcake »

It's working nicely, but note that it isn't compatible with the first edition ZX81 ROM.
User avatar
thewiz
Posts: 58
Joined: Sun Aug 16, 2009 8:36 pm
Location: Crewe

Re: New ZX81 Games

Post by thewiz »

Thanks Fruitcake, I'll look into that.
Memotech rules
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: New ZX81 Games

Post by dr beep »

Fruitcake wrote: Fri Jan 20, 2023 8:08 pm It's working nicely, but note that it isn't compatible with the first edition ZX81 ROM.
That is for many of my games. I use LDIR at #19f9 in the ROM to extend screen and for hiscoreroutine.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: New ZX81 Games

Post by dr beep »

thewiz wrote: Fri Jan 20, 2023 7:29 pm A lot of the techniques given by Johan "Dr Beep" Koelman
in his PDF on fully using the 1K ZX81 have been used, and in fact gave me
the push to write this. So thank you Dr Beep.
1 enthousiast coder made it worthwhile to write the document.
As written to Paul "Fruitcake" Farrow, the CALL the #19F9 in ROM is the issue 1 ROM issue.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: New ZX81 Games

Post by dr beep »

Fruitcake wrote: Fri Jan 20, 2023 8:08 pm It's working nicely, but note that it isn't compatible with the first edition ZX81 ROM.
Paul,

is the ROM the same at location #A6E to #A73?
If so, I will swap my LDIR to that location.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: New ZX81 Games

Post by dr beep »

thewiz wrote: Sat Jan 21, 2023 10:14 am Thanks Fruitcake, I'll look into that.
You can fix it without costs of bytes at the

JP #19F9

Make that

copy LDIR
RET

and on all CALL (cc,) #19F9 make those CALL (cc,) COPY

This should probably fix the issue 1 ROM problem.
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: New ZX81 Games

Post by Fruitcake »

dr beep wrote: Sat Jan 21, 2023 1:00 pm
Fruitcake wrote: Fri Jan 20, 2023 8:08 pm It's working nicely, but note that it isn't compatible with the first edition ZX81 ROM.
Paul,

is the ROM the same at location #A6E to #A73?
If so, I will swap my LDIR to that location.
Yes.


The LDIR at $19F9 in the edition 2 and 3 ROMs is at $19F8 in the edition 1 ROM.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: New ZX81 Games

Post by dr beep »

Fruitcake wrote: Sat Jan 21, 2023 3:10 pm
dr beep wrote: Sat Jan 21, 2023 1:00 pm
Fruitcake wrote: Fri Jan 20, 2023 8:08 pm It's working nicely, but note that it isn't compatible with the first edition ZX81 ROM.
Paul,

is the ROM the same at location #A6E to #A73?
If so, I will swap my LDIR to that location.
Yes.


The LDIR at $19F9 in the edition 2 and 3 ROMs is at $19F8 in the edition 1 ROM.
I know of that change. I use LDIR RET for a copy with a conditinal CALL.
This saves 1 byte and sometime I need that single byte.

At #A6e I can use another LDIR (with a PUSH and a POP) so if the ROM is here the same I can make the games compatible without adding bytes.

Code: Select all

; ----------------------------
; THE 'RECLAIMING' SUBROUTINES
; ----------------------------
;
;

;; RECLAIM-1
L0A5D:  CALL    L0A17           ; routine DIFFER

;; RECLAIM-2
L0A60:  PUSH    BC              ;
        LD      A,B             ;
        CPL                     ;
        LD      B,A             ;
        LD      A,C             ;
        CPL                     ;
        LD      C,A             ;
        INC     BC              ;
        CALL    L09AD           ; routine POINTERS
        EX      DE,HL           ;
        POP     HL              ;
        ADD     HL,DE           ;
L0A6E:  PUSH    DE              ;
        LDIR                    ; Copy Bytes
        POP     HL              ;
        RET                     ;
User avatar
thewiz
Posts: 58
Joined: Sun Aug 16, 2009 8:36 pm
Location: Crewe

Re: New ZX81 Games

Post by thewiz »

Hi,

My solution was to replace it with this "push hl ; call $A6F". Works with editions 1 and 2 for the price of a byte (which gets overwritten anyway).

I'm I able to update the file I previously uploaded or should I reupload?
Memotech rules
User avatar
thewiz
Posts: 58
Joined: Sun Aug 16, 2009 8:36 pm
Location: Crewe

Re: New ZX81 Games

Post by thewiz »

Also, if you are willing to let HL = DE after the call, then "jp $A6E" will work too.

In my last post I meant to put "push hl ; jp $A6F". :oops:
Memotech rules
Post Reply