Page 7 of 7
Re: Artic ZX Galaxians - now with ZONX support (and Chroma81 & UDG)
Posted: Tue Oct 12, 2021 10:20 am
by siggi
kmurta wrote: ↑Sun Oct 10, 2021 10:26 pm
New versions with ZXpand joystick support available for download in
first post
The new version of ZXGLX.P crashes on my Zeddy (56K, no ZxPand, no chroma, no ULA, but with Z80
) when the second screen appears. The old version is running as expected ....
Siggi
Re: Artic ZX Galaxians - now with ZONX support (and Chroma81 & UDG)
Posted: Tue Oct 12, 2021 10:48 am
by mrtinb
siggi wrote: ↑Tue Oct 12, 2021 10:20 am
kmurta wrote: ↑Sun Oct 10, 2021 10:26 pm
New versions with ZXpand joystick support available for download in
first post
The new version of ZXGLX.P crashes on my Zeddy (56K, no ZxPand, no chroma, no ULA, but with Z80
) when the second screen appears. The old version is running as expected ....
Hm.. Maybe the ZXpand Joystick code crashes, when no ZXpand is available.
Maybe code that tests for ZXpand availability should surround the Joystick code.
Re: Artic ZX Galaxians - now with ZONX support (and Chroma81 & UDG)
Posted: Tue Oct 12, 2021 11:09 am
by siggi
Maybe that is the same reason, why SPACEIHR.P also crashed on my Zeddy (WRX, ram 8-64K, M1-NOT for code > 32K) ...
Re: Artic ZX Galaxians - now with ZONX support (and Chroma81 & UDG)
Posted: Tue Oct 12, 2021 11:57 am
by siggi
Strange: when SPACEIHR.P is running on my ZXDeluxe (ZxPand+ZeddyNet), compared to EO the horizontal movement (O/P) is much slower and the fire button (shift) seems to be always activated ...
????
Siggi
Re: Artic ZX Galaxians - now with ZONX support (and Chroma81 & UDG)
Posted: Tue Oct 12, 2021 4:46 pm
by kmurta
siggi wrote: ↑Tue Oct 12, 2021 10:20 am
The new version of ZXGLX.P crashes on my Zeddy (56K, no ZxPand, no chroma, no ULA, but with Z80
) when the second screen appears. The old version is running as expected ....
Siggi
The only reason I see the game crashing is conflicting with the ZXpand IO addresses. Do other games that read the ZXpand joystick work satisfactorily?
https://sinclairzxworld.com/viewtopic.php?f=4&t=833
This is the code I used to read the ZXpand joystick:
Code: Select all
.
.
.
ld b,$e7
ld c,$fe
in d,(c) ;read keyboard
call RDZXPJOY
.
.
.
; ---
; Read ZXpand joystick:
; Return status in A:
;
; Bit --Direction
; 7 Up
; 6 Down
; 5 Left
; 4 Right
; 3 Fire
; 2 indefined
; 1 indefined
; 0 indefined
;
; The corresponding bit will be 0 when the joystick is pushed in that direction.
; Bits 2 to 0 inclusive are undefined, but you might just work out that bit 0
; represents whether a card is present...
RDZXPJOY:
ld a,$a0
ld bc,$e007
out (c),a
ex (sp),hl
ex (sp),hl
in a,(c)
or $07
cp $ff ; test if joystick was activated
jr z,RDKBJOYEND ; jump if not
LEFTFIRE:
ld c,a
and $28 ; tests for left/shot combination
jr nz,LEFT ; jump if not
ld a,$ee ; if yes, associate to the keys "5" + "0"
jr RDKBJOYEND
LEFT:
ld a,c
and $20 ; tests whether joystick was triggered to
jr nz,RIGHTFIRE ; left; if not, jump
ld a,$ef ; if yes, then associate the "5" key
jr RDKBJOYEND
RIGHTFIRE:
ld a,c
and $18 ; tests for right/shot combination
jr nz,RIGHT ; jump if not
ld a,$fa ; if yes, associate to the keys "8" + "0"
jr RDKBJOYEND
RIGHT:
ld a,c
and $10 ; tests whether joystick was triggered to
jr nz,FIRE ; right; if not, jump
ld a,$fb ; if yes, then associate the "8" key
jr RDKBJOYEND
FIRE:
ld a,c
and $08 ; test whether the fire button was activated
jr nz,RDKBJOYEND ; jump if not
ld a,$fe ; if yes, then associate with "0" key
RDKBJOYEND:
and d ; mix with previous contents in d and return
ld d,a
ret
It might be better to give the option to select the patch for the ZXpand Joystick before starting the game, this would avoid this kind of conflict.