Unkatris, another tetris clone

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
antoniovillena
Posts: 23
Joined: Fri Aug 15, 2014 5:48 pm

Unkatris, another tetris clone

Post by antoniovillena »

This is my first 1K game to ZX81. It's an adaptation of another one written to ZX Spectrum, but including 26 levels because the original one fitted only the half of the memory.

Game is here:

http://sinclairzxworld.com/download/file.php?id=2053

Source code:

http://sourceforge.net/p/emuscriptoria/ ... ee/tetris/
Last edited by antoniovillena on Wed Sep 10, 2014 3:44 pm, edited 2 times in total.
User avatar
marste
Posts: 145
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: Unkatris, another tetris clone

Post by marste »

Very nice example of 1K game!... It will surely be a nice reference for me!! :)
I had nice time playing it!! :D
Last edited by marste on Mon Sep 08, 2014 7:42 pm, edited 1 time in total.
User avatar
marste
Posts: 145
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: Unkatris, another tetris clone

Post by marste »

PS: would it run also on a "real" unexpanded ZX81? should it be loaded with a special loader (in case which one)?
(I'm asking because of the "strange setup" of the machine code that seems starting at 4000h instead of the "standard" saved system variables)
antoniovillena
Posts: 23
Joined: Fri Aug 15, 2014 5:48 pm

Re: Unkatris, another tetris clone

Post by antoniovillena »

Yes, it would work in a real ZX81. Not tested because I don't have this machine but due to emulator accuracy (EightyOne) I am 99% sure. Just load the .tzx or .wav from audio out in your laptop/phone to the EAR connector in the ZX81.

The game has 2 blocks, the first block only loads from 4000h to 4008h and the second block loads the rest of the RAM. Unfortunately it won't support .p file format, so I've released an utility to convert 1k binary to .z81, .tzx and .wav.

http://sourceforge.net/p/emuscriptoria/ ... s/make1k.c

With this method you will have almost the whole RAM to program, compared with a standard .p file and BASIC loader it's about 50 bytes more.
Last edited by antoniovillena on Mon Sep 08, 2014 8:34 pm, edited 2 times in total.
antoniovillena
Posts: 23
Joined: Fri Aug 15, 2014 5:48 pm

Re: Unkatris, another tetris clone

Post by antoniovillena »

If you want to learn about this method, I recommend you the example in this folder:

http://sourceforge.net/p/emuscriptoria/ ... ree/chess/

It's the 1K Chess. chess.asm is the original game (binary identical), with only 2 bytes of free RAM. I have used my method in nchess.asm, with another optimisations, so in this file we have 137 bytes of free RAM. Both games are functionally equivalents.
User avatar
yerzmyey
Posts: 1237
Joined: Thu May 15, 2008 10:11 am
Location: Rubber Planet
Contact:

Re: Unkatris, another tetris clone

Post by yerzmyey »

Wow, this is a tetris for 1K??? Really goooooood!!!!
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/
antoniovillena
Posts: 23
Joined: Fri Aug 15, 2014 5:48 pm

Re: Unkatris, another tetris clone

Post by antoniovillena »

Thank you for the feedback. It's not very original and there was before another tetris clone for 1k zx81, but I did it as a challenge.
User avatar
marste
Posts: 145
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: Unkatris, another tetris clone

Post by marste »

antoniovillena wrote:If you want to learn about this method, I recommend you the example in this folder:

http://sourceforge.net/p/emuscriptoria/ ... ree/chess/

It's the 1K Chess. chess.asm is the original game (binary identical), with only 2 bytes of free RAM. I have used my method in nchess.asm, with another optimisations, so in this file we have 137 bytes of free RAM. Both games are functionally equivalents.
Very nice, each byte more count!!!

But where the program starts without RAND USR? :)
antoniovillena
Posts: 23
Joined: Fri Aug 15, 2014 5:48 pm

Re: Unkatris, another tetris clone

Post by antoniovillena »

marste wrote: But where the program starts without RAND USR? :)
To the address pointed by the last 2 bytes of the file. In case of nchess.asm there is a "defw DRIVER", so the program starts on DRIVER label, and in case of unkatris.asm the start label is "inic".
antoniovillena
Posts: 23
Joined: Fri Aug 15, 2014 5:48 pm

Re: Unkatris, another tetris clone

Post by antoniovillena »

Post Reply