Was Bird Strike ever fixed?

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


Friga
Posts: 41
Joined: Tue Apr 06, 2021 2:49 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by Friga »

Hi Iain, Great minds think alike :D

I did in fact spend some time over the weekend with Omniflop and an old Comapq PC running XP (about 2002 vintage). I installed the BBC drive in the PC OK and tried all sorts of options but to no avail. My beeb disks and drive were mostly 80 track, and that may be an issue. It never managed to read a full disk image.

Seems like it should be setup as a 720Kb 3.5" drive. However it all seems to depend on the PC disk controller chipset being able to recognise the drive and handle the different speed of the old beeb drive.

I have ordered a Gotek from Aliexpress, so hope to have that in about 2 weeks.
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Friga wrote:
Tue Apr 27, 2021 2:20 pm
Hi Iain, Great minds think alike :D

I did in fact spend some time over the weekend with Omniflop and an old Comapq PC running XP (about 2002 vintage). I installed the BBC drive in the PC OK and tried all sorts of options but to no avail. My beeb disks and drive were mostly 80 track, and that may be an issue. It never managed to read a full disk image.

Seems like it should be setup as a 720Kb 3.5" drive. However it all seems to depend on the PC disk controller chipset being able to recognise the drive and handle the different speed of the old beeb drive.

I have ordered a Gotek from Aliexpress, so hope to have that in about 2 weeks.
Ah well, worth a try! Did you install the two Windows drivers? - without them it'll only read DOS formats apparently. But yeah, it seems to be a bit hit and miss, and dependent on the floppy controller in questions.

I'm expecting a load of old family floppies at some point (nothing special, certainly nothing commercial) that I'd like to preserve so I've got a load of things on order. Bits to make a Greaseweazel F1 (hoping to get on the list for an F7 when more are available), cables, connectors, etc etc :lol:

PS I *think* (see your PMs) the Gotek will need FlashFloppy firmware on it to be DFS-compatible. You'll need something like this to flash it (Aliexpress alternatives are available). Probably something to ask about on here while you wait :)

I saw a great video about how to flash it a few days ago. I'll see if I can find it...

Edit: It's here, from about the 6 minute mark.
Friga
Posts: 41
Joined: Tue Apr 06, 2021 2:49 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by Friga »

Yes, tried with both drivers,all combinations of BIOS.
This thread viewtopic.php?t=8451 implies it wont work with a DFS(FM) disk or 80 track. I dont really have spare disks to play around with either.

Thanks for the video - very clear. I'll get prepared to flash it.
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Friga wrote:
Wed Apr 28, 2021 11:04 am
Yes, tried with both drivers,all combinations of BIOS.
This thread viewtopic.php?t=8451 implies it wont work with a DFS(FM) disk or 80 track. I dont really have spare disks to play around with either.

Thanks for the video - very clear. I'll get prepared to flash it.
As per my PM, here's the file containing a working FF.CFG and a blank DFS disk image. Just extract both to the root of the usb drive you have for the gotek (needs to be formatted FAT32). :)
Attachments
FF.zip
(4.58 KiB) Downloaded 11 times
Friga
Posts: 41
Joined: Tue Apr 06, 2021 2:49 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by Friga »

Hi Iain,

Thanks for the files. I got the Gotek drive today, added header and screen, and have started to set it up. The new Goteks are based on Artery microcontrollers so the process of flashing it with FlashFloppy has changed a bit, but was easier in practice. I'll post on the hardware forum soon. The FF files were very useful.

Got your PMs about the cables etc, and will try with the Beeb tomorrow. I'll expect some messing around with twists etc. Does the Gotek need separate power also, or does it come off the 40-way data cable?

Thanks for your help - nearly there!

Andy
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Friga wrote:
Tue May 11, 2021 2:36 pm
Hi Iain,

Thanks for the files. I got the Gotek drive today, added header and screen, and have started to set it up. The new Goteks are based on Artery microcontrollers so the process of flashing it with FlashFloppy has changed a bit, but was easier in practice. I'll post on the hardware forum soon. The FF files were very useful.

Got your PMs about the cables etc, and will try with the Beeb tomorrow. I'll expect some messing around with twists etc. Does the Gotek need separate power also, or does it come off the 40-way data cable?

Thanks for your help - nearly there!

Andy
Hi Andy,

Great news! I'm fairly sure you'll have to power the gotek off its power connector. Mine doesn't work without power supplied, but it came with a cable that plugged into the beeb's auxilliary power connector underneath, so that's how I run it.

It only needs 0V and 5V. Mine has a 3.5" floppy-style power connector on the board where 0V are the middle two pins and 5V is the right hand pin. There's a diagram here for reference. Just double-check you've not got 12V and 5V mixed up before plugging it in!

Having said that, it's probably not too fussy about where it gets its power from, so if you bought one of those usb-to-serial ttl adapters you could probably run it from that (usually the red wire is 5V and the black one is 0V, but again check!).

Alternatively whip the cover off your floppy drive and see what you can hook up. Mine is mains-powered and the internal power supply terminates at a standard molex plug with 12V/0V/0V/5V.

Getting exciting! :mrgreen:
Friga
Posts: 41
Joined: Tue Apr 06, 2021 2:49 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by Friga »

Hi Iain - no sucess yet.
I posted here about my Gotek issues: viewtopic.php?f=3&t=22541
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Exciting news! @Friga has successfully transferred one of his his source discs to the gotek, and we're in the process of working through the files it contains to figure out what they all are. They should be available on github in the near future :D :D :D

One thing that's come out of this already is an answer to the question I'd always wanted to ask: What are the level 4 aircraft?

I think I'd always flip-flopped between the two main ideas - a twin-prop/twin-tail fixed-wing aircraft and a chinook-style helicopter. What puzzled me most was a couple of pixels at the bottom right of the sprite, as seen here:
bs_plane4_tape.PNG
bs_plane4_tape.PNG (1.21 KiB) Viewed 581 times
They are present on the tape version, but when I looked at Andy's original binary they are not:
bs_plane4_source.PNG
bs_plane4_source.PNG (1.31 KiB) Viewed 581 times
To my mind this now removes the helicopter possibility! :lol:

I've done some debugging with beebjit this morning, and I think I can conclude that these pixels are some kind of artefact/bug in the (infamous) protection system that some Firebird games had. The pixels are the very last byte of the game that loads, and should be &00. The memory location where they live (&2FFF) is &00 before the final encrypted block of the game is loaded, where the byte changes to &3A. The block is then decrypted in place (from what I can see), but the final memory location is not and remains at &3A.

Code: Select all

2FC0: 00 00 00 00 14 00 00 00 30 00 00 10 3C 10 00 00  ........0...<...
2FD0: 38 28 28 3E 14 3C 30 00 30 00 00 20 3C 20 00 00  8((>.<0.0.. < ..
2FE0: 10 00 00 00 3C 00 00 00 30 00 00 34 3C 34 10 00  ....<...0..4<4..
2FF0: 38 28 28 3A 14 38 20 00 20 00 00 00 3C 00 00 3A  8((:.8 . ...<..:
So, either the encrypted version of the binary was one byte short, or the decryption routine stops one byte short for some reason. The original deprotection work done by "Mr Spock" would have carried this incorrect byte across to the disc images we have today.

I guess the upshot of this is that we have a game that's true to the commercial release, but not true to the author's original submission to the publisher. It's an easy enough fix - the last byte of my .asm file just needs to be changed to &00.

But should it be? :?:

Edit: Interestingly, the sprite in the Electron version did not suffer from this defect.
Last edited by iainfm on Sat May 15, 2021 11:37 am, edited 1 time in total.
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Also discovered - the source of the artefacts at &1B11:

$.KEYS

Code: Select all

   10*KEY 0 RUN|M
   20*KEY 1 |V4|NL.|M
   30*KEY 2 LDA
   40*KEY 3 STA
   50*KEY 4 JSR
   60*KEY 5 RTS
   70*KEY 5 SAVE"S"|M
   80*KEY 6 PAGE=&3000:MODE4:*L.S 3000|M
   90*KEY 7 |V2|W|@|L|@|@|@|@|@|@|@|@
  100*KEY 8 CALLQ%|M
  110*KEY 9 P.~!&
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Also discovered - a file that sets up the screenshot for the cassette inlay card (although the top is cropped off).
Cassette.png
bstapebox.jpg
User avatar
MarkMoxon
Posts: 196
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by MarkMoxon »

iainfm wrote:
Sat May 15, 2021 11:02 am
I guess the upshot of this is that we have a game that's true to the commercial release, but not true to the author's original submission to the publisher. It's an easy enough fix - the last byte of my .asm file just needs to be changed to &00.

But should it be? :?:
Could you extend the build process to be able to build both versions from the same source? I've been doing that with Elite, and it's a great way to document all the variations.

It's fantastic to see so much thought and effort going into the digital archaeology of Bird Strike. Great job Iain!

Mark
User avatar
MarkMoxon
Posts: 196
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by MarkMoxon »

MarkMoxon wrote:
Sat May 15, 2021 4:53 pm
iainfm wrote:
Sat May 15, 2021 11:02 am
But should it be? :?:
Could you extend the build process to be able to build both versions from the same source? I've been doing that with Elite, and it's a great way to document all the variations.
Just seen you already have variables in the source for building different variants - so you can already do this. Ignore me! :shock:

Mark
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

MarkMoxon wrote:
Sat May 15, 2021 4:53 pm
It's fantastic to see so much thought and effort going into the digital archaeology of Bird Strike. Great job Iain!
Mark
Thank you so much :D
MarkMoxon wrote:
Sat May 15, 2021 5:30 pm
Just seen you already have variables in the source for building different variants - so you can already do this. Ignore me! :shock:
Mark
:mrgreen:

Yep, my other thought would be to re-use one of my proof-of-concept cheat codes to toggle the byte at &2FFF between &3A and &00 with a key press.
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

A bit more computing history - some of the sources refer to Firefly as the publisher, which was the original name for Firebird
FireFly Beeb.png
Friga
Posts: 41
Joined: Tue Apr 06, 2021 2:49 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by Friga »

Lots of fun from exploring this, Iain, and some more data on its way to you .

Andy
User avatar
Dave Footitt
Posts: 967
Joined: Thu Jun 22, 2006 10:31 am
Location: Abandoned Uranium Workings
Contact:

Re: Was Bird Strike ever fixed?

Post by Dave Footitt »

Great thread, I bought Bird Strike back in the day and have many fond memories of playing it.

=D> =D> =D>
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Friga wrote:
Sun May 16, 2021 1:36 pm
Lots of fun from exploring this, Iain, and some more data on its way to you .

Andy
Great - I'll take a look asap!
Dave Footitt wrote:
Sun May 16, 2021 3:50 pm
Great thread, I bought Bird Strike back in the day and have many fond memories of playing it.

=D> =D> =D>
Thanks very much! :mrgreen:


With my (very moth-eaten) software testing hat on, I've decided that the spurious &3A byte in the wave 4 sprite constitutes a defect as it causes the end product to differ from the original design. It's a bug that's been introduced by the publisher during packaging, in effect.

So, here's a version with it fixed. This is the only change to this version (aside from a couple of labels being added to the .asm file). Changes have been pushed the github repo. I'll add another release later (or roll this one up into any other changes).

It's easy enough to revert for any purists - just change ORIGINAL to TRUE and run it through beebasm.
Attachments
BirdStrike-fixed.ssd
(19.25 KiB) Downloaded 6 times
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Just a little update on the project. I've been through the disc images that @Friga has sent me and updated my github listing with comments that reference his assembly labels, and which of the source files match the disassembly.

As yet we're unable to define a set of instructions that would allow the game to be built directly from the sources - a couple of smallish sections are proving elusive, and there are some minor differences in the code vs disassembly.

Andy will publish the sources on github soon, and is currently reacquainting himself with his code and converting it to a beebasm format in the process :D

In the meantime, here's another little gem I discovered - Andy's own sprite editor (written in basic). There is also code for an Electron emulator (for the bbc micro) which is presumably how he developed the Elk version . I've not figured out how to work it yet though.
editor.png
User avatar
0xC0DE
Posts: 1029
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Was Bird Strike ever fixed?

Post by 0xC0DE »

iainfm wrote:
Sat May 22, 2021 2:59 pm
There is also code for an Electron emulator (for the bbc micro) which is presumably how he developed the Elk version . I've not figured out how to work it yet though.
I'm curious how that is supposed to work? There is not much to emulate. 99% of the code will simply work fine, but more slowly.
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
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

0xC0DE wrote:
Sat May 22, 2021 3:27 pm
I'm curious how that is supposed to work? There is not much to emulate. 99% of the code will simply work fine, but more slowly.
PM sent. Just got it working - I think it emulates the electon sound and video system as well as slowing the machine down. Trying to change to mode 7 changes to mode 4, for example. I suspect it restricts the sound channels to one...or however many the elk had. I'm not very familiar with the electron I'm afraid.
User avatar
0xC0DE
Posts: 1029
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Was Bird Strike ever fixed?

Post by 0xC0DE »

iainfm wrote:
Sat May 22, 2021 4:08 pm
0xC0DE wrote:
Sat May 22, 2021 3:27 pm
I'm curious how that is supposed to work? There is not much to emulate. 99% of the code will simply work fine, but more slowly.
PM sent. Just got it working - I think it emulates the electon sound and video system as well as slowing the machine down. Trying to change to mode 7 changes to mode 4, for example. I suspect it restricts the sound channels to one...or however many the elk had. I'm not very familiar with the electron I'm afraid.
Thanks for your PM! It intercepts a few OSWRCH (e.g. MODE), OSWORD (e.g. SOUND, ENVELOPE) calls and hooks into IRQ1V to add an overall delay to the Beeb. Interesting!
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
User avatar
BigEd
Posts: 4103
Joined: Sun Jan 24, 2010 10:24 am
Location: West Country
Contact:

Re: Was Bird Strike ever fixed?

Post by BigEd »

An emulated Elk mode for the Beeb sounds quite intriguing!
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Now I've seen @Friga's labels, the code is making a lot more sense to me...maybe I'm getting a bit better at reading 6502 as well. :lol:

The original source for where the bug is looks like this:

Code: Select all

.bf 
  JSRcht:STXnl:INCfc:   \increment frame counter, game level
  LDAde:CMP#15:BMIb0:   \if de, difficulty? = 15, go .b0
  LDAfc:AND#1:BEQb0:DECde:DECde:DECinb
  .b0 INCtm+1:INCtm+1:
  LDA #12:JSR &FFEE:      \OSWRCH clear the screen
(The label tm+1 is the same memory location as L1A09 in my disassembly.)

I think the intention was to limit the value of tm+1/L1A09 using the CMP de with #15 on the 'difficulty?' line. However, the BMI only skips the DECde line and not the INCtm+1 line.

Moving the label .b0 to after the INCtm+1 (x2) line seems to prevent the bug from occurring.

I've not built a version with it like this, but I've tested it in BeebEm by changing the address the BMIs jump to to &1F09....which seems to fix the game as well. I'm not sure if both BMIs should be changed or just the first one though...maybe just the first one would do? Edit: but then, moving the label would change both BMI offsets so what I've done in the debugger is emulating that.
b0.PNG
Friga
Posts: 41
Joined: Tue Apr 06, 2021 2:49 pm
Contact:

Re: Was Bird Strike ever fixed?

Post by Friga »

For anyone interested in the sprite editor, I have spent a few hours working out how it worked, and written up some notes.
In the meantime, here's another little gem I discovered - Andy's own sprite editor (written in basic).
I posted here in the development tools forum:
viewtopic.php?f=55&t=22665
iainfm
Posts: 406
Joined: Thu Jan 02, 2020 8:31 pm
Location: Dumbarton
Contact:

Re: Was Bird Strike ever fixed?

Post by iainfm »

Little bit of an update - with the help of @Friga's original labels I've made some more sense of why the graphics glitch does what it does.

As a brief recap - the bomb-dropping routine goes out of bounds and starts treating memory areas above the bomb-tracking area as bombs, reducing pairs of memory locations to zero during its loop.

The first memory area it encounters (&2D5F) contains pointers to cloud sprites that describe how the clouds get drawn from relatively few sprites. This creates a corruption I'd not spotted before - a minor change to the clouds at level 13. The bytes of memory it reduces to zero contain &40 twice. Paired together this generates address &4040, which is where the first spurious bomb falls from as level 13 starts (as @billcarr2005 noted in this post.

Code: Select all

.L2D5F
        EQUB    $80,$40,$40,$00,$80,$00,$40,$80    \ Cloud sprite pointers
The next memory area to 'get it' is &2D68, which is a block of pointers that are used as offsets to &1A00/&1B00 and provides the pigeon animations. One by one these offsets are reduced to zero, which is why the pigeon corruption occurs.

Code: Select all

.L2D68  \ .bis
        EQUB    $88,$A0,$B8,$D0,$E8,$D0,$B8,$88    \ Pigeon animation sprite offsets
The next obvious thing to change is the player's bullet sprite pointer at &2D72. I'm not sure what causes the ultimate crash, but I suspect an address is encountered that points to a code location which gets zeroed. The &00 6502 instruction is BRK, so the game stops.

Good progress is being made by @Friga on recovering the original code and documenting it. Watch this space :D
Post Reply

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