"Chesszoom 1K" - new ZX81 true hi-res demo

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
PROSM
Posts: 8
Joined: Sun Apr 16, 2023 6:32 pm

"Chesszoom 1K" - new ZX81 true hi-res demo

Post by PROSM »

Hello all,

I'm posting here a little 1K demo that I wrote to help me get to grips with true hi-res display techniques on the ZX81. Chesszoom 1K presents a bouncing chessboard animation, with smooth movement in all three dimensions.

screenshot.png
screenshot.png (5.87 KiB) Viewed 4610 times

This should work on any ZX81 which is capable of true hi-res (including all un-expanded machines, plus those fitted with compatible RAM packs). Attached is a ZIP file containing the tape image, source code and readme file. I hope you enjoy the demo and/or find the source code useful.

Cheers!

EDIT: Replaced ZIP file to fix typo in readme
Attachments
chesszoom1k.zip
(9.46 KiB) Downloaded 99 times
My Sinclair software to-date
Working on something, as always :)
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: "Chesszoom 1K" - new ZX81 true hi-res demo

Post by dr beep »

I like it.

Took a look in the source and you can save bytes when you use the optimized hires model.
PROSM
Posts: 8
Joined: Sun Apr 16, 2023 6:32 pm

Re: "Chesszoom 1K" - new ZX81 true hi-res demo

Post by PROSM »

Thanks! Glad you like it :mrgreen:

I'm interested by your mention of an optimised hires model. Would you happen to have a link to an ASM template, or be able to describe the steps necessary?
My Sinclair software to-date
Working on something, as always :)
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: "Chesszoom 1K" - new ZX81 true hi-res demo

Post by dr beep »

PROSM wrote: Mon Aug 21, 2023 4:55 pm Thanks! Glad you like it :mrgreen:

I'm interested by your mention of an optimised hires model. Would you happen to have a link to an ASM template, or be able to describe the steps necessary?

Code: Select all

; Model 1K hires

 	ORG #4009 

; program starts here, both BASIC and machinecode
; the initialization also repairs any possible 48K bug.

basic 	EX AF,AF' 		; delay intrupt,opcode no bit6
	LD H,B 			; preset for 48K bug to #40
 	JR init0 		; continue where room

 	DEFB 236,212,28 	; The BASIC
 	DEFB 126 		; fully placed over sysvar
 	DEFB 143,0,18 		; start BASIC=#4009 also MC

 	DEFW last 		; needed by loading
chadd 	DEFW last-1
xptr 	DEFW 0
stkbot 	DEFW last
stkend 	DEFW last
berg 	DEFB 0
mem 	DEFW 0
 	DEFB 128

 	DEFB 0,0,0 

; all above reusable AFTER loading
lastk 	DEFB 255,255,255 	; used by ZX81
margin 	DEFB 55 		; used by ZX81
nxtlin 	DEFW basic 		; reusable after load
init0 	LD IX,hr 		; hr lowbyte bit 5 reset
				; lowbyte over flagx which resets bit 5 on load
				; HR must be set on right address or game crashes
	LD E,L 			; DE now #xx.L
taddr 	DEFW 0 			; used by ZX81 on LOAD only
				; unharmed code
 	LD B,4 			; copy >1K code
frames 	DEFB #16+1 		; LD D,n , after LOAD -1
 	DEFB #C0 		; highbyte must have bit 7 set
coords 	LDIR 			; DE now #C0.L = Hl +#8000
 				; fix 48K bug before display
prcc 	JP start 		; continue to mainprog

cdflag 	DEFB 64 		; used by ZX81

; Place ANY code to fill up to above #4040



; some lowres, HR must start AFTER #403F, but before #4070
hr 	LD HL,lowres+#8000 	; the lowres display
 	LD BC,#309 		; minimum needed #11
 	LD A,#1E
 	LD I,A
 	LD A,#FB
 	CALL #2B5 		; show lowres screen

;hrpart

; fixed end of HR-routine
exit 	CALL #292 		; back from intrupt
 	CALL #220
 	LD IX,hr
 	JP #2A4

x 	EQU 101
lowres 	DEFB 118,0,0,0
score 	DEFB 28,28,28,28,0
lives	db 28,0

 	DEFB "S"+x,"L"+x,"I"+x,"N"+x,"G"+x,"S"+x,"H"+x,"O"+x,"T"+x,128
 	DEFB "S"+x,"A"+x,"M"+x,0
hiscore DEFB 28,28,35,37,118
 	DEFB 118,#e9

vars 	DEFB 128

last EQU $ 
Post Reply