How to fully use the 1K ZX81

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

How to fully use the 1K ZX81

Post by dr beep »

39 pages to get every byte out of the 1K ZX81.

If you think you miss something just let a comment here so I can give a reply

Book1K-010.pdf
(211 KiB) Downloaded 307 times
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: How to fully use the 1K ZX81

Post by XavSnap »

Thanks Johan !
:ugeek:
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: How to fully use the 1K ZX81

Post by mrtinb »

It’s a great book, that simply states useful information for software development on the ZX81. Thank you.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
thewiz
Posts: 58
Joined: Sun Aug 16, 2009 8:36 pm
Location: Crewe

Re: How to fully use the 1K ZX81

Post by thewiz »

Thanks Dr Beep, thats great seeing it written up.

When I wrote QFrog, the displayfile was loaded as part of the program so I didn't have to set it up or need a CLS routine. Useful when writing games with a set playing field.

Another trick I used is to use a screen width which is easy to multiple with, e.g. 16 chars gives 15 displayed columns plus the 0x76, or 20 (x16 + x4), etc.

An idea I've never tried is to set DFILE to a page boundary, e.g. 0x4300 (I think it needs to be 0x42ff so the first display position is 0x4300). That way only the low byte needs calculating.

Cheers
Paul
Memotech rules
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: How to fully use the 1K ZX81

Post by dr beep »

thewiz wrote: Wed Nov 30, 2022 10:09 pm Thanks Dr Beep, thats great seeing it written up.

When I wrote QFrog, the displayfile was loaded as part of the program so I didn't have to set it up or need a CLS routine. Useful when writing games with a set playing field.
Most of my games have a display, but often compressed or with extra code, but I did use the trick when needed.
Another trick I used is to use a screen width which is easy to multiple with, e.g. 16 chars gives 15 displayed columns plus the 0x76, or 20 (x16 + x4), etc.
True, any not ^2 needs at least 1 extra calculation
An idea I've never tried is to set DFILE to a page boundary, e.g. 0x4300 (I think it needs to be 0x42ff so the first display position is 0x4300). That way only the low byte needs calculating.
I used this trick a bit in RUB-1K. Each visible field is set to be in the same highbyte so in the table only the lowbyte was held.
Cheers
Paul
Cheers and happy coding
Johan "Dr Beep" Koelman

PS I am thinking of writing the entire ZX81-emulator on the ZX Spectrum story as well.
User avatar
bobs
Posts: 325
Joined: Thu Aug 27, 2009 10:49 pm
Location: UK
Contact:

Re: How to fully use the 1K ZX81

Post by bobs »

I’ve just started reading this. Although we both code the Zeddy for very different types of game styles I’m sure it will be interesting.

I have noticed an error though on page 2, where you state that 2 bytes will be needed to store values up to 655536…

There’s another further down in the Scoring section, where “Even Pacman gaf 10 points for a dot”
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: How to fully use the 1K ZX81

Post by dr beep »

bobs wrote: Sat Dec 10, 2022 8:12 am I have noticed an error though on page 2, where you state that 2 bytes will be needed to store values up to 655536…
when storing it as 16 bit values
There’s another further down in the Scoring section, where “Even Pacman gaf 10 points for a dot”
Gaf (dutch) = gave (english)
User avatar
bobs
Posts: 325
Joined: Thu Aug 27, 2009 10:49 pm
Location: UK
Contact:

Re: How to fully use the 1K ZX81

Post by bobs »

Yes, but 655536? Should be 65536, one too many digits.
User avatar
marste
Posts: 250
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: How to fully use the 1K ZX81

Post by marste »

Thank you Johan, as usual GREAT content!!

I've still to apply it, but I see possibility for few more bytes shaved from the 1K real chess :)

I hope that with this jumpstart introduction more people will start developing on the beautiful and challenging bare 1K ZX81 hardware to exploit it to its fullest!

Happy new year to everyone and as usual happy hacking!
rmbrowngr
Posts: 27
Joined: Thu Dec 09, 2021 2:58 pm

Re: How to fully use the 1K ZX81

Post by rmbrowngr »

I remember reading back in the day, in some magazine (I think), how to optimise writing Basic programmes for less memory usage. Can’t remember which magazine it was.
ZX81 (purchased November 1982), my first computer.
ZXpand+, ZX8-CCB.
Post Reply