Jet Boat Protection or Variant?

reminisce about classic bbc micro and acorn electron games here
Related forum: adventures


Post Reply
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Jet Boat Protection or Variant?

Post by melchett »

I remember having Jet Boat as a child and I don't remember it being an original version - however the version I had, it was next to impossible to steer the boat, the tip would judder incessantly and you would have to fight to control it with the left/right keys. Was this a result of the protection from the original modifying the code, a corruption or a variant to make it harder? Does anyone else have a similar memory. Seeing it in Acorn: A World In Pixels inspired me to try the version on bbcmicro.co.uk and it's playable, unlike the version I had. I probably have it on cassette somewhere and maybe. if this lockdown continues, I might have some time to capture it.
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

I know you've all been on tenterhooks since I raised the original post...

So... after some on and off attempts at rescuing files from cassettes into UEF, I now have a process that seems to work which I have documented elsewhere on the forum. As a consequence, I made it my mission to capture my version of Jet Boat that I had as a child. I have attached it to this post.

A few points to make about it:

1. It is a variant to the one on the Complete BBC Micro Games archive - certainly on initial loading screen.
2. On a real BBC Micro Model B, it does the juddering front of the boat thing - it does NOT in BeebEm though (I'll try some other emulators at the weekend)
3. On a real BBC Micro Model B, the one in the archive does not judder and is actually quite playable - my version randomly turns the boat.

Any thoughts on why?
Attachments
jetboat.uef
(12.83 KiB) Downloaded 12 times
User avatar
0xC0DE
Posts: 992
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Jet Boat Protection or Variant?

Post by 0xC0DE »

Disclaimer: I've never seen or played this game.

Could it be the joystick control?
Maybe reading some different spurious values from the joystick on real hardware vs an emulator?
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

Interesting - I can probably the files now, I moved it out of the UEF onto an SSD so I can get to the files more easily. I will try some other emulators sometime over this weekend too. Would be great if someone else could try this on a real BBC to see if the behaviour is the same.
jetboat.ssd
(30 KiB) Downloaded 11 times
User avatar
scarybeasts
Posts: 734
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Jet Boat Protection or Variant?

Post by scarybeasts »

0xC0DE wrote:
Fri Apr 02, 2021 7:44 am
Disclaimer: I've never seen or played this game.

Could it be the joystick control?
No obvious steering judder in beebjit or jsbeeb.

I like the joystick hypothesis. The code does seem to be checking ADC conversions regularly at $0F2F:

Code: Select all

[ITRP] 0F2F: LDX #$01
[ITRP] 0F31: LDA #$80
[ITRP] 0F33: JSR $FFF4
[ITRP] 0F36: CPY #$F5
[ITRP] 0F38: BCS $0F4A
[ITRP] 0F3A: BCC $0F47
[ITRP] 0F3C: LDX #$01
[ITRP] 0F3E: LDA #$80
[ITRP] 0F40: JSR $FFF4
[ITRP] 0F43: CPY #$0A
[ITRP] 0F45: BCC $0F4A
[ITRP] 0F47: LDY #$00
[ITRP] 0F49: RTS
Interesting game. Not sure I'd tried it before. I quite like it!


Cheers
Chris
User avatar
vanekp
Posts: 993
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: Jet Boat Protection or Variant?

Post by vanekp »

looking at the uef it does not look like the original software invasion type of format.
as the original has the normal invasion copy protection see screen shot below.
Attachments
JetBoat.png
Regards Peter.
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

0xC0DE wrote:
Fri Apr 02, 2021 7:44 am
Could it be the joystick control?
scarybeasts wrote:
Fri Apr 02, 2021 8:20 pm
I like the joystick hypothesis. The code does seem to be checking ADC conversions regularly at $0F2F:

Interesting game. Not sure I'd tried it before. I quite like it!
Thank you 0xC0DE and Chris for your comments - if it is polling for random values, it makes it unplayable. I hated it back i in the day, and wondered why Robin Leatherbarrow included that. The version I have on MMB doesn't seem to do that which I think is this version:

http://www.bbcmicro.co.uk/game.php?id=187

Does that contain the ADC conversions regularly? I was wondering if it was a consequence of someone breaking the protection at some point.
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

vanekp wrote:
Fri Apr 02, 2021 9:30 pm
looking at the uef it does not look like the original software invasion type of format.
as the original has the normal invasion copy protection see screen shot below.
I can't speak for its heritage other than I probably received it from a computer club as a child mid to late 80s (it isn't on an original cassette). I was wondering if it was a consequence of someone breaking the protection at some point? Great idea if that's the case as it's pretty unplayable with the random movements and turns...

Andy
User avatar
scarybeasts
Posts: 734
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Jet Boat Protection or Variant?

Post by scarybeasts »

melchett wrote:
Sat Apr 03, 2021 4:05 pm
Thank you 0xC0DE and Chris for your comments - if it is polling for random values, it makes it unplayable. I hated it back i in the day, and wondered why Robin Leatherbarrow included that. The version I have on MMB doesn't seem to do that which I think is this version:

http://www.bbcmicro.co.uk/game.php?id=187

Does that contain the ADC conversions regularly? I was wondering if it was a consequence of someone breaking the protection at some point.
Yes, it has the same routine called at $0F2F, called regularly. I haven't checked for differences in handling of the return value.

Does this game actually support joysticks, out of interest? The concept of using the ADC conversions as a source of randonmess is really interesting -- is this a documented technique at all?


Cheers
Chris
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

scarybeasts wrote:
Sat Apr 03, 2021 9:00 pm
Yes, it has the same routine called at $0F2F, called regularly. I haven't checked for differences in handling of the return value.

Does this game actually support joysticks, out of interest? The concept of using the ADC conversions as a source of randonmess is really interesting -- is this a documented technique at all?
It doesn't support joysticks just the keymapping you can see on the way in. I cannot find an emulator that reproduces how my physical hardware works either. Still to try B2 but have tried B-Em, BeebEm, JSBeeb so far. What I'm most curious about is the author's intent - if the randomness was to make the boat harder to control or a by product of protection. I prefer the game without the random direction changes however he could reasonably have been trying to add "sea waves" or "wind gusts". Given both versions have the code at $0F2F it seems it was deliberate however on my BBC B, the version on Tricky's menu SD Card image doesn't have the random direction changes (I'll check that again).

Which debugger do you use? I find the BeebEm one quite cumbersome. And haven't yet figured out how to toggle the debugger back off on JSBeeb (ctrl+home switches it on, I'll play some more later).

And thank you again Chris.
User avatar
scarybeasts
Posts: 734
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Jet Boat Protection or Variant?

Post by scarybeasts »

melchett wrote:
Sun Apr 04, 2021 10:55 am
Given both versions have the code at $0F2F it seems it was deliberate however on my BBC B, the version on Tricky's menu SD Card image doesn't have the random direction changes (I'll check that again).
Great, I'd be interesting to confirm that there's indeed the difference in behavior between the two versions on real hardware. (Mine is out of commission at this time.)

It would also be interesting to check what sort of ADC wobble exists on a beeb with nothing plugged into the ADC port. I've never tried this before but it looks like this might be achieved with:
*FX16,1
PRINT ADVAL(1)
(re-run the print a few times)
Which debugger do you use? I find the BeebEm one quite cumbersome. And haven't yet figured out how to toggle the debugger back off on JSBeeb (ctrl+home switches it on, I'll play some more later).
I use beebjit. I have a bias because I wrote it :) I'm also in the process of making the breakpoints arbitrarily powerful, e.g. this works in latest head:

(6502db) b expr 'pc == 0xfff4 && a == 0x80 && x == 1'
(break on OSBYTE 128 if X is 1)

I also did this:
(6502db) b expr 'pc == 0xfff4 && a == 0x80 && x != 1'
(break on OSBYTE 128 if X is not 1)

This shows a hit in a routine at $0F4D which is calling OSBYTE 128 with X set to 0. Isn't that checking for joystick fire buttons? Is it possible the game has undocumented joystick support?


Cheers
Chris
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

I found my joystick, no idea if it still works but will plug it in late tonight and try - it's too nice a day in the South of England to miss. I will also try and see if the *FX command yields anything - although I could just assemble that polling in a loop on a real beeb and see what it produces too.

Haven't tried beebjit - will try it over the next week or so.
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

scarybeasts wrote:
Sun Apr 04, 2021 11:40 am
Great, I'd be interesting to confirm that there's indeed the difference in behavior between the two versions on real hardware. (Mine is out of commission at this time.)

....

This shows a hit in a routine at $0F4D which is calling OSBYTE 128 with X set to 0. Isn't that checking for joystick fire buttons? Is it possible the game has undocumented joystick support?
Trying this morning - after some experimentation, it seems that all versions on my BBC B have the same behaviour and randomly veer the boat off to the left at varying degrees of harshness. However... if I have a joystick plugged into the joystick port (either my hold analogue joysticks or my Konix Speedking), then the game behaves properly when using the keyboard.

I hadn't noticed it before but the title screen before the game starts says "Press SPACE or FIRE to start". Pressing fire on a joystick starts the game and I can control using the joystick... doh.

I have come to the conclusion that my joystick port isn't well as sometimes I cannot control the boat and it goes straight down the screen. I tried Tricky's rather excellent pac-man and at times I cannot go right without waggling the joystick connector to find a sweet spot. So I'm wondering if without a joystick inserted, it's sending random "go left" values.

Note that if you started the game with the keyboard you seem to be able to accelerate with the fire button too and I guess control the boat (haven't managed to try this yet).

I was always keyboard first as a child so maybe the joystick connector has been an issue since the late 80s. I'll ask on the hardware forum if there are any diagnostics I can run to confirm that (and if so, what fix if any could be applied).
scarybeasts wrote:
Sun Apr 04, 2021 11:40 am
It would also be interesting to check what sort of ADC wobble exists on a beeb with nothing plugged into the ADC port. I've never tried this before but it looks like this might be achieved with:
*FX16,1
PRINT ADVAL(1)
(re-run the print a few times)
Given what I described above, I'm not sure how reliable tests on my ADC channels are?

Here is the output (taken every few seconds) and output in hex obviously:

>PRINT ~ADVAL(1)
EAD0
>PRINT ~ADVAL(1)
EC00
>PRINT ~ADVAL(1)
E710
>PRINT ~ADVAL(1)
E520
>PRINT ~ADVAL(1)
E030
>PRINT ~ADVAL(1)
EC80
>PRINT ~ADVAL(1)
E5A0
>PRINT ~ADVAL(1)
D290
>PRINT ~ADVAL(1)
E430

Thanks again for you help.

Andy
User avatar
Cybershark
Posts: 402
Joined: Wed Jun 14, 2006 11:16 pm
Contact:

Re: Jet Boat Protection or Variant?

Post by Cybershark »

Hey, I always wondered what the deal was with Jetboat.
I never played it back in the day (on real hardware) but it was something that I grabbed from the archive and tried on Beeb-Em without any joy. I tried redefining the keys, but the boat would always turn fully in one direction as if I was holding a key down. Found it a great shame, as this looked like a really uncommon 8-way scroller that I'd have liked to devote more time to.

Out of interest I tried the (ssd) version you posted above on JSBeeb and it played just fine :D
User avatar
Elk2019
Posts: 68
Joined: Wed Apr 03, 2019 6:25 pm
Contact:

Re: Jet Boat Protection or Variant?

Post by Elk2019 »

I recently discovered Jet Boat from Software Invasion. It was an early attempt to create a Micromachines type game. Was there any game similar to this on the Electron? If not, would it be possible to port this game to the Elk?
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

Cybershark wrote:
Tue Apr 06, 2021 11:39 pm
Hey, I always wondered what the deal was with Jetboat.
I never played it back in the day (on real hardware) but it was something that I grabbed from the archive and tried on Beeb-Em without any joy. I tried redefining the keys, but the boat would always turn fully in one direction as if I was holding a key down. Found it a great shame, as this looked like a really uncommon 8-way scroller that I'd have liked to devote more time to.

Out of interest I tried the (ssd) version you posted above on JSBeeb and it played just fine :D
Which version gave you random direction changes in an emulator? I haven't been able to reproduce that as it seems to need the "noise" from a real ADC chip. All the versions I have (my UEF/SSD, the bbcmicro.co.uk one, the one on Tricky's SD card image) all work ok in Beeb-Em - do you have any of the joysticks or mouse options checked?

When it plays without the random direction changes it's a neat game. I cursed it back in the day because of that so never enjoyed it then.
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

Elk2019 wrote:
Wed Apr 07, 2021 10:49 am
I recently discovered Jet Boat from Software Invasion. It was an early attempt to create a Micromachines type game. Was there any game similar to this on the Electron? If not, would it be possible to port this game to the Elk?
I'm sure it's possible to port - it does use hardware scrolling on the Beeb but Repton, Exile etc were all ported to the Electron to use whatever techniques to do the scrolling. Would need the source code reverse engineered first...

Worth asking the Electron experts on here...
User avatar
scarybeasts
Posts: 734
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Jet Boat Protection or Variant?

Post by scarybeasts »

melchett wrote:
Mon Apr 05, 2021 9:49 am
Trying this morning - after some experimentation, it seems that all versions on my BBC B have the same behaviour and randomly veer the boat off to the left at varying degrees of harshness. However... if I have a joystick plugged into the joystick port (either my hold analogue joysticks or my Konix Speedking), then the game behaves properly when using the keyboard.

I hadn't noticed it before but the title screen before the game starts says "Press SPACE or FIRE to start". Pressing fire on a joystick starts the game and I can control using the joystick... doh.
Perhaps this is a bug in Jet Boat right here? Unless the joystick fire button was pressed, maybe it shouldn't be looking at ADC conversion values. I've no idea what voltages are supposed to be sensed when nothing is connected to the pins. I wonder if any electronics experts could comment?


Cheers
Chris
User avatar
MartinB
Posts: 5417
Joined: Mon Mar 31, 2008 10:04 pm
Location: Obscurity
Contact:

Re: Jet Boat Protection or Variant?

Post by MartinB »

It sounds as if the game doesn’t, as you might expect, exclude and ignore the joystick(s) input when keyboard control is selected. Instead, it appears to always unconditionally monitor the joysticks for movement and if any is detected (or even perceived), the joystick is assumed to be in use and the scaled input is fed to the boat steering demands. To do this, the code will make successive samples of the joystick channel(s) and if a successive digitised sample delta of larger than a certain figure is detected, the control input is used. If this digitised delta were arbitrarily set to say 100 in the code, then if an open unloaded joystick port were generating a ‘noise’ variance of greater than 100, the joystick movement detection will trigger and the erroneous input effect will occur. However, on an analogue port with (stationary) loading joysticks connected or on an emulator, the noise delta will be much less or zero and so no issue is seen. That’s my take on what I’m reading.

(....and yes, significant noise variance on each channel is to be expected from an unloaded A-D of the topic Beeb type.)
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

MartinB wrote:
Wed Apr 07, 2021 9:22 pm
Instead, it appears to always unconditionally monitor the joysticks for movement and if any is detected (or even perceived), the joystick is assumed to be in use and the scaled input is fed to the boat steering demands.
Yeah I'm pretty certain too that's what's happening - I know for instance that if I start the game with the keyboard controls, I can accelerate with the fire button. Unfortunately, my Joystick 1 X control pin is the part that is broken on my analogue port and so I cannot see if that moves it when I start with the keyboard. But yes certainly lots of randomness when I don't have a joystick plugged in.

I still come back to wondering what the intent of the author was here. Did he want some randomness to direction or did he only ever play with joysticks or, more importantly, did he only test the keyboard controls when he had a self-centering joystick plugged in but not used. My feeling is that it's the latter.

Again, love the game when it's not afflicted by the randomness!
Andy1979
Posts: 214
Joined: Mon Mar 27, 2017 10:04 pm
Contact:

Re: Jet Boat Protection or Variant?

Post by Andy1979 »

I'm running into this same issue playing Jet Boat on my Master Compact, both on original hardware (using MMFS and joystick-port SD card reader) and in Beebjit emulating a compact.

Has anyone found a version that works properly on the Compact?
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

Andy1979 wrote:
Thu Apr 29, 2021 12:27 pm
I'm running into this same issue playing Jet Boat on my Master Compact, both on original hardware (using MMFS and joystick-port SD card reader) and in Beebjit emulating a compact.

Has anyone found a version that works properly on the Compact?
I noticed on my BBC B that if I plug in a joystick it would stop the juddering motion because it's giving absolute joystick position values rather than a constant stream of random x/y values. It's then playable. Just make sure, if you have non-self centering joysticks, that they are in the zero position for X. I did therefore reasonably wonder if the author permanently left his joystick plugged in and hence never noticed the issue with keyboard only when the joysticks were unplugged.

For the emulators, you can do similar on e.g BeebEm if you switch on Joystick support. I haven't tried Beebjit yet, I'll have a look tomorrow hopefully and see if you can do something similar. I'll try and hack a version tomorrow too that either NOPs out the joystick checks or always sets them to zero.
Andy1979
Posts: 214
Joined: Mon Mar 27, 2017 10:04 pm
Contact:

Re: Jet Boat Protection or Variant?

Post by Andy1979 »

melchett wrote:
Sat May 01, 2021 4:49 pm
I noticed on my BBC B that if I plug in a joystick it would stop the juddering motion because it's giving absolute joystick position values rather than a constant stream of random x/y values. It's then playable. Just make sure, if you have non-self centering joysticks, that they are in the zero position for X.
The problem with the compact is that it has no analogue joystick port, and I'm using the digital joystick port for the MMFS SD card. Ideal solution would indeed be a version with joystick code stripped out.
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

Andy1979 wrote:
Sun May 02, 2021 12:49 pm
The problem with the compact is that it has no analogue joystick port, and I'm using the digital joystick port for the MMFS SD card. Ideal solution would indeed be a version with joystick code stripped out.
I didn't know they removed the analogue joystick port on the Compact - interesting machine given the motherboard is still under the keyboard, assumed it was similar to one of those Viglen conversion cases for the BBC B. Can you use it without the "plinth"?

I started disassembling JetBoat today using BeebDis and was a little distracted with that and also ScaryBeasts "command line" emulator beebjit. They are both fantastic tools for getting behind the code.

So long story, short, I think this version fixes the judder by ignoring joystick control altogether. My ADC chip today was cycling through high values from DCxx to EDxx so not quite triggering the joystick left code. I don't know why those values vary day to day, maybe electrical noise, temperature, humidity etc. Normally the code triggers a joystick left on a F5xx or greater value (only checks the top 8-bits of the 16-bit value). I lowered the check in the code to C0xx and tried it with and without the patch and it seems to stop the randomness completely.

Can you download and try this version please (no joystick, well the fire button will work)
jetboat.ssd
(30 KiB) Downloaded 1 time
This is what I changed, see the penultimate line of code.

Code: Select all

.fn_get_joystick_x
		; OSBYTE &80 reads the ADC chip
		; Reading channel 1 the x axis of the joystick
		; This part checks for left
        LDX     #$01
        LDA     #$80
        JSR     OSBYTE

.check_joystick_left
		; If the joystick MSB value > F5 (max FF) then assume user
		; is trying to go left
        CPY     #$F5
        BCS     left_or_right_detected

		; Not going left
        BCC     no_left_or_right_detected

.fn_check_joystick_right
		; OSBYTE &80 reads the ADC chip
		; Reading channel 1 the x axis of the joystick
		; This part checks for right
        LDX     #$01  
        LDA     #$80
        JSR     OSBYTE

		; If the joystick value is < 0A the assume user
		; is trying to go right
        CPY     #$0A
        BCC     left_or_right_detected

.no_left_or_right_detected
		; indicate to caller that NO left or right was detected
        LDY     #$00
        RTS

.left_or_right_detected
		; indicate to caller that left or right WAS detected
        LDY     #$01   <---- Changed this to $00
        RTS

Let me know how you get on.
Last edited by melchett on Tue May 04, 2021 1:41 pm, edited 1 time in total.
Andy1979
Posts: 214
Joined: Mon Mar 27, 2017 10:04 pm
Contact:

Re: Jet Boat Protection or Variant?

Post by Andy1979 »

melchett wrote:
Mon May 03, 2021 7:02 pm
I didn't know they removed the analogue joystick port on the Compact - interesting machine given the motherboard is still under the keyboard, assumed it was similar to one of those Viglen conversion cases for the BBC B. Can you use it without the "plinth"?
Form factor is the best thing about it. The plinth is just the disk drive and PSU, mostly empty space, and you can use the machine without it. All connections on the back of the keyboard. Base unit only needs 5V, so using a standard 5V 'power brick' and an SD card it's way smaller than a B or Master. It's basically a cut down Master with some ports removed but same performance.
melchett wrote:
Mon May 03, 2021 7:02 pm
I started disassembling JetBoat today using BeebDis and was a little distracted with that and also ScaryBeasts "command line" emulator beebjit. They are both fantastic tools for getting behind the code.
Beejit is awsome.
melchett wrote:
Mon May 03, 2021 7:02 pm
Can you download and try this version please (no joystick, well the fire button will work)
Works great for me under -compact emulation with DFS2.45 in Beebjit, which is how I've been doing all my testing for Compact compatibility. No other version worked like this. Great job =D>

I don't have the Compact set up at the moment, so will be later in the week before I can test on real hardware.
melchett
Posts: 396
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: Jet Boat Protection or Variant?

Post by melchett »

Glad it works so far - should work on the real hardware too, please let me know.

Regards, Andy
Andy1979
Posts: 214
Joined: Mon Mar 27, 2017 10:04 pm
Contact:

Re: Jet Boat Protection or Variant?

Post by Andy1979 »

melchett wrote:
Tue May 04, 2021 1:43 pm
Glad it works so far - should work on the real hardware too, please let me know.
Delighted to confirm this works perfectly on my Master Compact under MMFS =D>
Post Reply

Return to “8-bit acorn software: classic games”