The "Ask Dr Beep anything" thread

General Chit Chat about Sinclair Computers and their Clones
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: The "Ask Dr Beep anything" thread

Post by dr beep »

siggi wrote: Thu Nov 09, 2023 4:29 pm
dr beep wrote: Tue Nov 07, 2023 8:09 pm I played on a ZX81 in the '80s but never had one.
Did you use a Zeddy emulator or a ZX81 of someone else?
My first contact was by someone who had a ZX81. I got myself a ZX Spectrum at age 15.
I always wondered why software was not compatible. In 1995 I started to code my first ZX81 emulator on the ZX Spectrum which finished in 1997.

In 2011 I coded SHOGUN and to test 1K hires I eventually bought a ZX81.
Once I had the model for all games and my old TV broke I donated my ZX81 to Ben Versteeg from ByteDelight.

Now I use emulation only which is easier since I can do things while on the road with my laptop.
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: The "Ask Dr Beep anything" thread

Post by dr beep »

mrtinb wrote: Wed Nov 08, 2023 6:44 pm Have you ever tried programming for the Lambda 8300? It has base memory of 2k, but with a different charset, and no hires or pseudo-hires.
Now your question may come again.......


No, I never coded on the Lambda.
So far I have coded on
ZX81
ZX Spectrum
Sam Coupe
TRS80 MC10
and
Videopac/Odyssey2
User avatar
siggi
Posts: 990
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: The "Ask Dr Beep anything" thread

Post by siggi »

dr beep wrote: Tue Nov 07, 2023 8:09 pm Now I use emulation only which is easier since I can do things while on the road with my laptop.
Me too:
ZX81 laptop with Lego docking station:
https://forum.tlienhard.com/phpBB3/down ... hp?id=2612

:mrgreen:
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
siggi
Posts: 990
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: The "Ask Dr Beep anything" thread

Post by siggi »

dr beep wrote: Wed Nov 08, 2023 4:07 pm
mrtinb wrote: Wed Nov 08, 2023 6:57 am What is your most favorite instruction/feature when coding on the Z80 in assembly?
On the ZX81 that is the feature that code can be executed during line display, the call to upper memory.

In hires I use this mainly to prevent display of a user defined character.

In lowres it is used by the system with the HALT, but I use opcodes like LD B,B etc.... to show a space on the screen, but I can store information about that screenposition on the screen. My latest program Game of Life stores the number of adjacent colonies in that space. Snakebingo keeps the track of the tail in it, Minesweeper the number of mines and Pathmaze the paths available. Kman keeps the data of what is eaten, a dot or a powerdot.

More games use the trick.
If its my turn now:
I understand, that you can place hidden opcodes, having bit 6 set, into dfile. But they may not do more than a NOP (like ld b,b). Otherwise the display routine will fail. So there are few opcodes, which can be used.
Can you store data like 1,2,3,4,5 in dfile? If yes: how?
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: The "Ask Dr Beep anything" thread

Post by dr beep »

siggi wrote: Fri Nov 10, 2023 8:06 pm If its my turn now:
I understand, that you can place hidden opcodes, having bit 6 set, into dfile. But they may not do more than a NOP (like ld b,b). Otherwise the display routine will fail. So there are few opcodes, which can be used.
Can you store data like 1,2,3,4,5 in dfile? If yes: how?
Yes, the data stored on the screen will display as a NOP/space.
In GOL the white spaces hold data. For GOL I count up to 4. Above 3 is according to the rules a dead colony. I use LD D,B LD D,C LD D,D, LD D,E and LD D,H for these counts. The opcodes are #58 to #5C. Subtract #58 and you have the number of adjacent colonies.

You can't use all LD opcodes. BC and HL are used by the display so you can't change them.
LD D,(HL) can't be used since this is 7 tstates.

When you store the useable codes in a table you can translate them to a value upon the place in the table, just read and count until your value comes.

For Minesweeper I used a different method. I started with #40 for no bombs around and then #51 to #5F for up to 7 bombs. Each bomb was counted twice, so only the odd values are used, thus skipping the LD D,(HL) and LD E,(HL).

Theoratically 8 bombs can be around a field. This would make #61, LD H,C which crashes the game, so a check is done that a field has never 8 bombs.
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: The "Ask Dr Beep anything" thread

Post by dr beep »

BUMP UP NOTICE!
User avatar
mrtinb
Posts: 1911
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: The "Ask Dr Beep anything" thread

Post by mrtinb »

I've received your book with 81 games for Christmas. I believe you also worked on a book with programming examples for 1k games. Has that been released as a physical book yet?
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: The "Ask Dr Beep anything" thread

Post by dr beep »

mrtinb wrote: Mon Jan 15, 2024 1:01 am I've received your book with 81 games for Christmas. I believe you also worked on a book with programming examples for 1k games. Has that been released as a physical book yet?
Hello Martin,
yes I was working on it but at the moment I am very busy with a lot of things and I simply can't find the time or effort to continue it, it is not off but just on low fire at the moment.
Post Reply