Sorting out the zx81 library set on z88dk

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
stefano
Posts: 584
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Sorting out the zx81 library set on z88dk

Post by stefano »

I've been recently working on the less common versions of the LAMBDA 8300 ROMs, and hopefully I made everything more flexible by adding two new subtypes ("mono" for the v1 ROM and "cac3" for the CAC-3 and the NF300).

While woring on it I noticed that I had never ported some of the ZX81 functions, such as the ones manipulating the whole display (text inversion, etc..).

The zx81 specific code should now be easier to port on LAMBDA targets and, partially on the ZX80.

I thought it is nice to show that you can find a random editor, even online:
bitfont_0.png
Still, my favourite one is the z88dk's sprite editor. The interface does not look cool, but you can do lots of magic with it.

Well, this program will work on all the mentioned models, the ZX81 and the ZX80:

Code: Select all


/*

     Depending on the versions of your computer:
	 zcc +zx80 -create-app test.c
	 zcc +zx81 -create-app test.c
	 zcc +lambda -create-app test.c
	 zcc +lambda -subtype=mono -create-app test.c
	 zcc +lambda -subtype=cac3 -create-app test.c
    
*/

#include <stdio.h>
#include <graphics.h>
#include <games.h>
#include <lib3d.h>
#include <zx81.h>

char skull[]={8,7,129,90,60,36,60,90,153};



main()
{
	clg();

	putc4x6(13);
	putc4x6(13);
	putc4x6(13);
	putc4x6(13);
	putc4x6(13);
	putc4x6(' ');
	putc4x6(' ');
	putc4x6(' ');
	putc4x6(' ');
	putc4x6(' ');
	putc4x6('h');
	putc4x6('e');
	putc4x6('l');
	putc4x6('l');
	putc4x6('o');

	puts_cons ("  zx80/81/lambda library TEST");

	putsprite (spr_or,10,10,skull);
	circle(14,13,9,1);
	
	fgetc_cons();

	mirrortxt();
	fgetc_cons();

	invtxt();
	fgetc_cons();

	mirrortxt();
	fgetc_cons();

	invtxt();
	fgetc_cons();

}

bitfont_1.png
bitfont_2.png
I just noticed that the keyboard input in zx81 mode is not designed to leave the display visible when in FAST mode. It is not a real problem in most of the cases but it won't be good for those few ZX80 with a "NEW ROM" installed.
Attachments
test_lambda_old.P
(3.23 KiB) Downloaded 133 times
User avatar
stefano
Posts: 584
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Sorting out the zx81 library set on z88dk

Post by stefano »

I finally succeded in getting the display visible in FAST mode also on the ZX81 and on the LAMBDA ROMs (untested).
This program should run correctly on a ZX80 with ZX81 ROM as well as on a ZX81.
Attachments
test_zx81rom_fastmode.p
(3.07 KiB) Downloaded 130 times
User avatar
stefano
Posts: 584
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Sorting out the zx81 library set on z88dk

Post by stefano »

I also updated the ZX81 specific version of DSTAR to get a valid version for the ZX80 with "NEW ROM" (aka ZX81 in FAST mode).
It looks a bit flickery on EO, the results look much better in 50hz mode, but I can't predict how it will be on a real TV.

Probably the "intelligent" color TV and LED TV chipsets will blank out the display.
Attachments
dstar-fast.p
(4.82 KiB) Downloaded 130 times
Post Reply