Harrier Attack

General software. From trouble with the Banyan Tree to OCP Art Studio, post any general software chat here. Could include game challenges...
Post Reply
User avatar
Hedge1970
Manic Miner
Posts: 388
Joined: Mon Feb 18, 2019 2:41 pm

Harrier Attack

Post by Hedge1970 »

I dont know why I was drawn to this game but here I am... It says in the instructions that the keys are redefinable. I could not find out how to do this, I assumed perhaps that this option was somehow disabled from the files stored here, so I bought a copy of the game on ebay. Yet again I am unable to re-define the keys. Perhaps the instructions on the site are wrong or perhaps they pertain to a different version?? The version I bought on ebay unfortunately did not come with instructions (just case and insert) so i am a bit stumped. Its a long shot but does anyone know the details??

Running on real zx spectrum 48k

https://ia800604.us.archive.org/view_ar ... Attack.txt
User avatar
Luzie
Manic Miner
Posts: 917
Joined: Fri May 01, 2020 2:07 pm

Re: Harrier Attack

Post by Luzie »

As the only hint about Harrier Attack having User-Defined-Keys is in this Text-File: https://archive.org/download/World_of_S ... Attack.txt
I think this is a wrong information. Even on the original Durell Casette Inlay there´s no note about UDKs:
Image
User avatar
Hedge1970
Manic Miner
Posts: 388
Joined: Mon Feb 18, 2019 2:41 pm

Re: Harrier Attack

Post by Hedge1970 »

Yeah that’s kind of what I figured. Shame as the cursor keys are a pain to use.
User avatar
spider
Dynamite Dan
Posts: 1107
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: Harrier Attack

Post by spider »

Best guess, perhaps they ran out of space to fit a define routine in, I've not checked that though. Bear in mind it was a 16K game.

There is also (as well as the CBM and CPC versions) Atari XXL and Oric versions too. Unsure if these versions offered define keys, the Atari one appears to be an unreleased version recovered, pretty sure the Oric one was released.

NB: The Amstrad CPC and CBM versions do not appear to offer a define keys option, I've just checked those two.
User avatar
Hedge1970
Manic Miner
Posts: 388
Joined: Mon Feb 18, 2019 2:41 pm

Re: Harrier Attack

Post by Hedge1970 »

Yeah I thought maybe the instructions are for one of the other formats, thanks for checking
User avatar
jdanddiet
Manic Miner
Posts: 213
Joined: Tue Jun 23, 2020 1:11 pm

Re: Harrier Attack

Post by jdanddiet »

I could ask Mike Richardson?
As a little aside, until I spoke to Mike for the Scuba dive article, I never knew that this was actually a conversion of an Oric original, created by Ron Jeffs who worked at Durell.
cmonkey
Drutt
Posts: 15
Joined: Mon Dec 02, 2019 8:55 pm
Location: Leeds, UK

Re: Harrier Attack

Post by cmonkey »

There was plenty of space left for a redefine keys routine as the game only occupies memory up to $7900.

I'm not a huge fan of cursor key control schemes either so I've edited the control scheme and changed it to QAOP for direction, M for missiles/rockets and symbol shift for bombs. Eject is still on space. This control scheme works pretty well for running on original hardware but not quite as well for emulation (where you'd probably choose to use space for bombs instead of eject). There doesn't seem to be a way to attach the edited TZX here.

The code changes were as follows :-

Code: Select all

routine at 6c77 handles left/right movement of the harrier during normal gameplay. patch it for O/P
6c91		ld bc,$dffe		; segment $df (YUIOP)
		in a,(c)		; read keyboard segment
		and 3			; get rid of the bits we're not interested in
		cp 3			; were either O or P pressed?
		jr z,$6caf		; jump if not
		bit 1,a			; was O pressed?
		jr z,$6caa		; jump if so
		bit 0,a			; was P pressed?
		jr nz,$6caf		; jump if not
		ld a,1			; move harrier right
		jr $6cac
		nop			; NOPs needed to put 6caa instruction in correct place as it's the target
		nop			; of a relative jump at 6c82 
6caa		ld a,-1			; move harrier left


routine at 6d09 handles up/down movement of the harrier during normal gameplay, patch it for Q/A
6d22		ld a,$fd		; segment $fd (ASDFG)
		in a,($fe)		; read keyboard segment
		bit 0,a			; was A pressed?
		jr z,$6d3f		; jump if so
		ld a,$fb		; segment $fb (QWERT)
		in a,($fe)		; read keyboard segment
		bit 0,a			; was Q pressed?
		jr nz,$6d40		; jump if not
		

routine at 6e0e handles dropping bombs - change keyboard segment that it reads
6e2b		ld bc,$7ffe		; change segment from $ef (67890) to $7f (BNMSymShSpace) - no change for which bit to check


routine at 6f9e handles firing a missile/rocket - change keyboard segment that it reads
6fba		ld bc,$7ffe		; change segment from $ef (67890) to $7f (BNMSymShSpace) - no change for which bit to check


routine at 7435 handles landing the harrier on the aircraft carrier after the mission - patch it for QAOP
7468		ld a,$df		; segment $df (YUIOP)
		in a,($fe)		; read keyboard segment
		and 3			; get rid of the bits we're not interested in
		cp 3			; were either O or P pressed?
		jr z,udt		; jump if not to up_down_test (udt)
		bit 1,a			; was O pressed?
		jr z,lp			; jump if so to left_pressed (lp)
		bit 0,a			; was P pressed?
		jr nz,udt		; jump if not to up_down_test (udt)
		inc l			; move harrier right
		jr udt
lp		dec l			; move harrier left
		
udt		ld a,$fd		; segment $fd (ASDFG)
		in a,($fe)		; read keyboard segment
		bit 0,a			; was A pressed?
		jr z,dp			; jump if so to down_pressed (dp)
		ld a,$fb		; segment $fb (QWERT)
		in a,($fe)		; read keyboard segment
		bit 0,a			; was Q pressed?
		jr nz,bt		; jump if not to bounds_test (bt)
		dec h			; move harrier up
		jr bt
dp		inc h			; move harrier down
		nop			; padding (original routine was 43 bytes, my routine is 42 bytes)
		
bt - address 7493 - bounds test						


finally patch instruction at 75ea to allow take-off from carrier via Q instead of 7
75ea		cp $51			; allow take-off from carrier via Q key

If you apply the above changes to the Durell release TZX available here and patch up the parity byte at the end of the TZX (change from $fa to $3b) you should have a fully working game with remapped controls. If someone could tell me how to attach TZX (or zipped TZX) to this post then I'd attach my pre-patched game to save you the bother of patching it yourselves!

I find the game much easier to play with QAOP directional control and even managed to get a semi-respectable score on level 1 using the new control layout.

Image
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2644
Joined: Mon Nov 13, 2017 3:16 pm

Re: Harrier Attack

Post by Ast A. Moore »

If you’re only testing the lowest or highest bit, then a rotate instruction (rra/rla) is faster and smaller. Then test the carry bit:

Code: Select all

		rra			; was P pressed?
		jr nc,$6caf		; jump if not
		rra			; was O pressed?
		jr z,$6caa		; jump if so

etc.

You can’t directly attach a file to a post. You’ll need to upload it to a file-sharing site and then share the link.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Sparky
Manic Miner
Posts: 611
Joined: Tue Dec 15, 2020 9:42 pm

Re: Harrier Attack

Post by Sparky »

I also had bought this game as a teen. I was (and still am) into any game that involves airplanes.
Alex
User avatar
Luzie
Manic Miner
Posts: 917
Joined: Fri May 01, 2020 2:07 pm

Re: Harrier Attack

Post by Luzie »

cmonkey wrote: Sun May 16, 2021 12:36 pm I'm not a huge fan of cursor key control schemes either so I've edited the control scheme and changed it to QAOP for direction, M for missiles/rockets and symbol shift for bombs. Eject is still on space. This control scheme works pretty well for running on original hardware but not quite as well for emulation (where you'd probably choose to use space for bombs instead of eject). There doesn't seem to be a way to attach the edited TZX here.
[mention]cmonkey[/mention] Thanks for doing the changes! Putted your TZX-File for download here: https://forum.tlienhard.com/phpBB3/down ... p?id=12205

Have to find a little spare time to further test it, but at first try QAOPM seems to work well and easier for me than the cursor-keys!

btw. Harrier Attack was, in my youth, one of those games who forces me to burn in the cursor-keys into my hands and brain :D
User avatar
bluespikey
Manic Miner
Posts: 987
Joined: Tue Jun 30, 2020 3:54 pm

Re: Harrier Attack

Post by bluespikey »

But without contigous keys, how would Quicksilva key overlays works?

Image
Post Reply