Bug in The Golden Figurine

feedback, questions and discussion relating to www.bbcmicro.co.uk
User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Bug in The Golden Figurine

Post by lurkio » Mon May 11, 2020 11:34 pm

We've had a bug report from a user of bbcmicro.co.uk about the game The Golden Figurine:
A bbcmicro.co.uk user wrote:The Golden Figurine is fine until approx 1/3 onto the game when I go to use the pick axe to dig out the skull behind the wall ... Here's a screen shot of where the game gets stuck. Same place every time. I don't know if this gives you any ideas with the coding? Essentially I have in my possession a pick axe. I don't drop the object as I usually would (on one of the yellow tiles like the fish pictured). I simply make contact with the wall where the skull is buried behind. The earth (red) begins to disappear allowing access to pick up the skull and the game freezes at this point ... It's a shame because the game works flawlessly and exactly as I remember it up to this point. It takes 10-15mins to get to this point in the game ...
  • image.png
Continuing, the bbcmicro.co.uk user wrote:Right, so I put BeebEm on the ... laptop and played the Golden Figurine. It plays the same as the in-browser emulator and freezes at the same place also unfortunately ... I did the whole save-state thing ... please see the attached. If you simply walk the character to the wall on the left you should see the earth begin to disappear and then the game will freeze.

Does anyone have any idea what's causing the apparent bug in this game?

:?:

User avatar
Arcadian
Site Admin
Posts: 3426
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: Bug in The Golden Figurine

Post by Arcadian » Mon May 11, 2020 11:48 pm

Might be worth asking the user to try the TAPE version out on a couple of emulators (e.g. BeebEm, B-Em) which may help indicate whether it's an emulation issue or a tape <> disc xfer problem.
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

User avatar
billcarr2005
Posts: 1551
Joined: Fri Sep 09, 2005 4:01 pm
Location: UK
Contact:

Re: Bug in The Golden Figurine

Post by billcarr2005 » Tue May 12, 2020 7:50 pm

The main game seems to be run from BASIC. Seems like the offending line *could be*

Code: Select all

970IF S%=208:IF GS%=TRUE:FORP%=21TO24:PRINTTAB(4,P%)"  ":NEXT


At least that removes the scenery in the appropriate place...

On further inspection it must just be coincidence :D

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Wed May 13, 2020 9:05 am

Arcadian wrote:
Mon May 11, 2020 11:48 pm
Might be worth asking the user to try the TAPE version out on a couple of emulators (e.g. BeebEm, B-Em) which may help indicate whether it's an emulation issue or a tape <> disc xfer problem.
Done! The user replied:
The tape version runs at twice the speed as the disc. This is how I remember it on the Electron....no wonder I was finding it easier than I remember! ... I am absolutely amazed I could get as far as I did at full tape speed back in the day.

Thanks for the tip on the speed options. I set it to 0.5 and it’s pretty much the same speed as the disc version.

Unfortunately...the tape version freezes at the exact same place as the disk version.
:idea:

Michael Brown
Posts: 2303
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Bug in The Golden Figurine

Post by Michael Brown » Wed May 13, 2020 5:01 pm

Hi,
If your using the image I put on disc, then it runs slower as I added a FOR/NEXT loop in the basic to slow it down as it did seem to run too fast.
Some of the Atlantis titles that were both BBC/Electron compatible had routines that checked which computer it was running on and adjusted automatically, but this one didn't so I added a slow-down routine.
Glad to see that the game is faulty on the tape version and its not something I've done for once!

regards,
Mick.

User avatar
Diminished
Posts: 339
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Bug in The Golden Figurine

Post by Diminished » Wed May 13, 2020 5:21 pm

I played this on the Beeb BITD and it was indeed ridiculously fast.

Is it possible that this game was intended for the Elk, and actually never worked properly on the Beeb? i.e. it crashed on the hardware after being loaded from an original tape? Sadly I don't have my tape copy any more.

Also I have a suspicion that there was never an official disc release, but that's just a hunch. Maybe it can't cope with &1900 PAGE?

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Wed May 13, 2020 5:37 pm

Diminished wrote:
Wed May 13, 2020 5:21 pm
Is it possible that this game was intended for the Elk, and actually never worked properly on the Beeb? i.e. it crashed on the hardware after being loaded from an original tape? Sadly I don't have my tape copy any more.
Looks like there was an official "Electron/BBC" release:

Diminished wrote:
Wed May 13, 2020 5:21 pm
Also I have a suspicion that there was never an official disc release, but that's just a hunch.
I think that's true.

:idea:

User avatar
Diminished
Posts: 339
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Bug in The Golden Figurine

Post by Diminished » Wed May 13, 2020 5:44 pm

lurkio wrote:
Wed May 13, 2020 5:37 pm
Looks like there was an official "Electron/BBC" release:
I'm wondering if they just put it on the market without ever bothering to test it to completion on the Beeb. It was a budget release, and if memory serves, probably put out towards the end of the machine's lifetime, but again this is based on very fuzzy memories.

I mean, the game was close to being unplayably fast on a Model B, even for my 10-year-old reflexes.

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Thu May 14, 2020 1:33 pm

Diminished wrote:
Wed May 13, 2020 5:44 pm
I'm wondering if they just put it on the market without ever bothering to test it to completion on the Beeb.
You might be right...

The user who originally reported the bug has now sent me a walkthrough that gets you to the point in the game where it keeps crashing in BeebEm:
Hopefully you can follow the map attached, I've numbered the screens for better reference.

1) The first object you need is the Magnet. This can be found at the top of Screen #15.
2) Take the Magnet to Screen #19 and drop it on the tile below the opposing magnet above...the wall above will open up.
3) Head back to the right to Screen #20, pick up the Trampoline.
4) Now you're going to beyond where you started, dropping the Trampoline on the tile at the bottom of the mountain in Screen #22.
5) Now go back through the screens to the right (1-6...and into Screen #21). Drop down the gap in the ground to enter Screen #23 and fall to the right...pick up the Flame.
6) Head back to the mountain Screen #22 where you left the Trampoline.
7) Bounce up the mountain to Screen #26...drop the Flame on the tile next to the Snowman...he'll melt.
8 ) Continue left to Screen #27, the Pick Axe is at the far left.
9) You then take the Pick Axe all the way through and up to Screen #33. I don't think you need to drop the Pick Axe...just make contact with the wall on the left. The ground and the wall should disappear providing access to the Skull...but this is where the crash occurs.
Image

The only way I could get through the walkthrough was by using the cheat version of the game which can be found at EveryGameGoing.com:
To run the cheat version in BeebEm you have to first switch to BBC Master 128 mode and then type *DISC and then CHAIN"CHEAT".

Having done all that and then struggled through the walkthrough, I found that the game still crashed in the same place!

So there don't seem to be any versions of the game out there that work on a BBC Micro or a BBC Master.

Now, the versions I've tested *might* work on an Electron, but I'm having trouble getting the game to run in the Elkulator emulator. I may come back to it at some point...

:idea:

-
Attachments
Golden Fig Map - Numbered Screens.gif.zip
(507.02 KiB) Downloaded 14 times

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Thu May 14, 2020 5:22 pm

I managed to get the cheat version of the game working in ElectrEm. See screenshot.

And I can confirm that the game *doesn't* crash in ElectrEm!

Screenshot 2020-05-14 at 17.16.13.jpg

So it really does look like the game might never have been playtested on a Beeb before it was originally released!

:evil:

User avatar
Diminished
Posts: 339
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Bug in The Golden Figurine

Post by Diminished » Thu May 14, 2020 8:33 pm

I know I never completed this game. I don't remember the crash at all, but I have an inkling that maybe it is the reason why I never did.

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Thu May 14, 2020 8:45 pm

Unless an original non-crashing BBC Micro copy turns up, I think it's not unreasonable to assume that this game has always been buggy on the Beeb.

:?:

EDIT: The user who originally reported the bug has now played the game through to completion in ElectrEm, using the cheat version on the .SSD from Everygamegoing.com.

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Sun May 17, 2020 2:06 am

billcarr2005 wrote:
Tue May 12, 2020 7:50 pm
The main game seems to be run from BASIC. Seems like the offending line *could be*

Code: Select all

970IF S%=208:IF GS%=TRUE:FORP%=21TO24:PRINTTAB(4,P%)"  ":NEXT
At least that removes the scenery in the appropriate place... On further inspection it must just be coincidence :D
I think the offending line might actually be this one:

Code: Select all

90IF GS%=FALSE:IF ?&60=30:IF ?&7C=8:IF ?&7D=19:FORP%=21 TO 24:PRINTTAB(4,P%)"  ":SOUND0,-15,5,2:PROCN(50):NEXT:GS%=TRUE
The offending statement in that line seems to be the SOUND command. When I hacked the BeebEm savestate to change the sound channel from 0 to 1, I was suddenly able to touch the wall by the skull without causing the game to crash! Not sure why this works. (I'm also not sure if this crude hack is all you need to be able to complete the game on the Beeb.)
I wonder if the reason that the hack seems to work has something to do with the difference in the other sound effects that the game produces on the Elk versus the Beeb? E.g. on the Elk there's a harsh noise when you touch one of those red spike thingies, but on the Beeb there's silence...

:?:

User avatar
richardtoohey
Posts: 3942
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Bug in The Golden Figurine

Post by richardtoohey » Sun May 17, 2020 7:51 am

Could a sound buffer be filled and something (BASIC?) is waiting for it to be emptied?

And because BBC and Electron a bit different in terms of sound abilities, it works on Electrons but not BBC Bs?

Is that even possible? :?: :-k

User avatar
billcarr2005
Posts: 1551
Joined: Fri Sep 09, 2005 4:01 pm
Location: UK
Contact:

Re: Bug in The Golden Figurine

Post by billcarr2005 » Sun May 17, 2020 9:55 am

lurkio wrote:
Sun May 17, 2020 2:06 am

I think the offending line might actually be this one:

Code: Select all

90IF GS%=FALSE:IF ?&60=30:IF ?&7C=8:IF ?&7D=19:FORP%=21 TO 24:PRINTTAB(4,P%)"  ":SOUND0,-15,5,2:PROCN(50):NEXT:GS%=TRUE
The offending statement in that line seems to be the SOUND command. When I hacked the BeebEm savestate to change the sound channel from 0 to 1, I was suddenly able to touch the wall by the skull without causing the game to crash! Not sure why this works. (I'm also not sure if this crude hack is all you need to be able to complete the game on the Beeb.)
Great detective work!
Line 970 is for when you revisit the room and the hole has already been dug #-o
Stranger still is that if you change 258 to 0, (c 258 0 in BeebEM's debugger) to allow ESCAPE to be pressed then type

Code: Select all

FORP%=21 TO 24:PRINTTAB(4,P%)"  ":SOUND0,-15,5,2:PROCN(50):NEXT:GS%=TRUE
it works without issue :roll:

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Sun May 17, 2020 11:50 am

billcarr2005 wrote:
Sun May 17, 2020 9:55 am
Great detective work!
Thanks, but I think I ended up using a sledgehammer to crack a nut: instead of just inspecting the BASIC program to find the offending line, I used the Trace feature of the debug version of Tom Seddon's b2 emulator, which seems to be the only(?) Beeb emulator that lets you record what the CPU is doing whenever you want without setting a breakpoint. So I played the cheat version of the game in b2 up to the point just before the crash, and I then started recording a trace: I then crashed the game and stopped the recording. Even though the trace had only been running for a few seconds, the resultant text file of the trace was quite large! But it showed that the last bit of machine code to be executed from user-RAM before the crash was the routine at &17B5, which is called at line 70 in the BASIC program. The rest of the trace bounces between the BASIC ROM and the OS.

billcarr2005 wrote:
Sun May 17, 2020 9:55 am
Stranger still is that if you change 258 to 0, (c 258 0 in BeebEM's debugger) to allow ESCAPE to be pressed then type

Code: Select all

FORP%=21 TO 24:PRINTTAB(4,P%)"  ":SOUND0,-15,5,2:PROCN(50):NEXT:GS%=TRUE
it works without issue :roll:
Perhaps even stranger is that if you hack the savestate to overwrite the BASIC token for SOUND with the token for END (&E0), and if you then load that hacked savestate and touch the wall near the skull, the game will obviously end and drop you to the BASIC prompt -- but if you then copy and paste your line of BASIC which I quoted above, BillC, the machine hangs!

If, however, you follow those same steps that I've just decribed but as soon as you get to the BASIC prompt you immediately type

Code: Select all

?&258=0
and then press Escape and then copy and paste your line of code, BIllC, then the line will execute and play the SOUND0 noise and return you back to the BASIC prompt as expected!

So for some reason it seems to be the act of enabling and pressing Escape that causes the line to work and the SOUND0 to play.

:?

EDIT: Ah, enabling and pressing Escape isn't the only way to cause the line to work and the SOUND0 to play -- another way is to type in *FX15 (or *FX21,4) before you paste the line of BASIC. So it looks like you were on the right track, Richard..?

:idea:

EDIT2: Yes, and here's yet another hack of the savestate. I've removed spaces from line 90 to make room for the insertion of OSCLI"FX15" just before the start of the FOR loop:

Code: Select all

90IF GS%=FALSEIF?&60=30IF?&7C=8IF?&7D=19:OSCLI"FX15":FORP%=21TO24:PRINTTAB(4,P%)"  ":SOUND0,-15,5,2:PROCN(50):NEXT:GS%=TRUE
:idea:

User avatar
Diminished
Posts: 339
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Bug in The Golden Figurine

Post by Diminished » Mon May 18, 2020 1:53 am

Good work.

What's the best way to fix this, then?

What happens if you just get rid of the SOUND altogether? Or move it outside the loop? Or just reduce the duration from 2 to 1 (or 0)?
lurkio wrote:
Sun May 17, 2020 11:50 am
Tom Seddon's b2 emulator, which seems to be the only(?) Beeb emulator that lets you record what the CPU is doing whenever you want without setting a breakpoint
I think this may be true -- I always ended up just crudely hacking this capability into b-em whenever I needed it. Ditto adding a command to the debugger to dump all 32K of RAM.

b-em's debugger could use some work.

User avatar
richardtoohey
Posts: 3942
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Bug in The Golden Figurine

Post by richardtoohey » Mon May 18, 2020 7:56 am

More proof (?!) it's something to do with the sound.

Load the UEF state from the top of this thread.

Jump a couple of times to check sound on.

Press Q to turn sound off.

Run left into the wall. It doesn't crash/hang/whatever it's doing.

You can press S again to turn sound back on almost immediately.

But why ... :-k

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Mon May 18, 2020 2:14 pm

Hmm. I just tested the STH disc version of Golden Figurine:
I loaded the .SSD into BeebEm, booted the game, immediately saved state, hex-edited* a single byte in the savestate file to give myself the infinite-energy poke (?&FCD=&60), loaded the edited savestate file into BeebEm, and then played the game through to the crashpoint -- and I found that this version of the game doesn't crash! (It also plays a vaguely correct sound-effect whenever you touch a red spike -- and that's even before you apply any pokes!)

So it looks like
  • the version of the game on Mick's "30th Anniversary" disc 037,
  • the version on bbcmicro.co.uk (which is the same as Mick's),
  • and the version on Everygamegoing.com (which is unique) --
  • and also the original(?) tape version on STH (tested by the user who first reported the crash) --
are all buggy on the Beeb.

Given that the STH tape version has the bug, it's possible that the bug was fixed by whoever created the STH disc version (which I just linked to, at the top of this post).

:roll:


* Why didn't I use the debugger to apply the poke instead of hex-editing a savestate? Because the Mac BeebEm debugger doesn't seem to recognise the "c" command!

User avatar
richardtoohey
Posts: 3942
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Bug in The Golden Figurine

Post by richardtoohey » Tue May 19, 2020 2:09 am

The only code difference between the two BASIC chunks appears to be this:

Code: Select all

diff -uw fig1.txt fig2.txt  
--- fig1.txt	Tue May 19 12:53:32 2020
+++ fig2.txt	Tue May 19 12:53:22 2020
@@ -16,7 +16,6 @@
160CALL&1256:CALL&102B:CALL&108C:CALL&102B:CALL&1601:IF ?&61=1:PROCK
   170CALL&1695:IF ?&62=1:PROCG
   180CALL&26EA:CALL&2773
-  185FORbbc%=0TO100:NEXTbbc%
   190UNTIL ?&87=1 OR ?&8E>0 OR J%:R%=?&8E:IF R%=0 OR J% GOTO250
   200OX%=?&7C:IF R%=1 S%=S%+20:X%=?&7C-2:Y%=26:IF S%=170 S%=192
   210IF R%=2 S%=S%-1:X%=36:Y%=?&7D
So maybe it's Mick's change after all? Won't having added that line made the BASIC a bit longer and so potentially have overwritten some of the machine code? :-k But would seem strange that the only side-effect is a crash at a certain point in the game if the sound is on :?:

So fig1.txt is the crashing version, and fig2.txt is the version that you said doesn't crash, lurkio.

*Obviously* could be some other change and this is a complete red herring.

Files on disc version:

Code: Select all

$.LOAD        FF1900 FF8023 000110 05C
$.!BOOT       000000 FFFFFF 00000E 05B
$.FIGURIN     FF1900 FF8023 000B20 04F
$.FIG-2       001100 005D68 004CA0 002
Files on crashing versions:

Code: Select all

$.FIGURI3  L  001100 005D60 004D00 01A
$.FIGURI2  L  005000 005000 000620 013
$.FIGURIN  L  001900 008023 000F2B 003
$.!BOOT    L  000000 000000 000030 002
Not sure I'm helping much #-o

EDIT: That was the only CODE difference, but a number of (unnecessary) spaces were removed from the original e.g. line 850

Code: Select all

-  850PLOT69,A%*64+24,1000-(?(R%-1)*32):UNTILA%=255:VDU23,252,37,171,170,186,217,107,255,255:FORP%=3TO42STEP3
+  850PLOT69,A%*64+24,1000-(?(R%-1)*32):UNTILA%=255:VDU23,252,37,171,170,186,217,107,255,255:FORP%=3 TO 42 STEP 3
... and that was probably done to make sure the end of the BASIC ended up being the same. :-s Think I'm chasing my tail!

User avatar
Diminished
Posts: 339
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Bug in The Golden Figurine

Post by Diminished » Tue May 19, 2020 10:11 am

sigh

Does anybody have an original tape copy of this game?

User avatar
leenew
Posts: 4140
Joined: Wed Jul 04, 2012 4:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: Bug in The Golden Figurine

Post by leenew » Tue May 19, 2020 10:43 am

^^ **cracks knuckles** ^^ 8)


EDIT: It appears that my comment above has caused confusion :lol:
In my mind I saw this: Diminished seeing this thread and noticing we have failed to get the bottom of it.
He then sighs, rolls up his sleeves and cracks his knuckles** undertaking the challenge with confidence of completing it quickly and easily.

Even the cracking of knuckles comment was not clear apparently...
In my world - interlacing your fingers then turning your palms outward and pushing your arms away -thus making a cracking sound with your finger joints - signifies someone about to undertake a challenge - not someone who is about to undertake violence!! :lol:

Lee

User avatar
Diminished
Posts: 339
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Bug in The Golden Figurine

Post by Diminished » Tue May 19, 2020 11:43 am

leenew wrote:
Tue May 19, 2020 10:43 am
In my mind I saw this: Diminished seeing this thread and noticing we have failed to get the bottom of it.
He then sighs, rolls up his sleeves and cracks his knuckles** undertaking the challenge with confidence of completing it quickly and easily.
Partially accurate. I don't know about quickly and easily. Actually I'm hoping someone will produce the tape image, and then someone other than me will do the analysis. :lol:

I would really just like to see whether my theory that this never worked properly on the Beeb was correct or not. Unfortunately it seems that once again some of the archived versions have been messed about with, so we have no idea what's what.
not someone who is about to undertake violence!!
I didn't take it that way at all.

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

Re: Bug in The Golden Figurine

Post by vanekp » Tue May 19, 2020 12:43 pm

The only tape version (CRC-32: 6e3b3194) I have and I am sure came for STH is this one https://www.stairwaytohell.com/bbc/arch ... ine_BE.zip
and line 90 looks the same in this version (CRC-32: 6e3b3194) which seems to be where the problem lies according to this tread.

Calculation date: 2020-05-19 13:41:40
File: GoldenFigurine_BE.uef
Path: D:\Downloads\
Size: 12,5 KB (12.784 Bytes)
CRC-32: 6e3b3194
Peter.

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Tue May 19, 2020 2:19 pm

vanekp wrote:
Tue May 19, 2020 12:43 pm
line 90 looks the same in this version (CRC-32: 6e3b3194) which seems to be where the problem lies according to this tread.
Well, line 90 is the symptom, but I don't think it's the cause because line 90 is the same in the working (non-crashing) version of the game (the STH disc version) and in at least one (and probably all) of the buggy (crashing) versions of the game (the STH tape version)!

:?

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Tue May 19, 2020 2:58 pm

Diminished wrote:
Tue May 19, 2020 10:11 am
Does anybody have an original tape copy of this game?
Most of the STH tape-images (UEFs) were, I think, created by Arcadian from original tapes. I wonder if he can confirm that that's what he did in the case of Golden Figurine..?

I know that, ideally, we'd still want an original physical tape release of the game to verify that it's been imaged accurately, but in its absence a confirmation from Arcadian is probably the next best thing.

:idea:

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

Re: Bug in The Golden Figurine

Post by vanekp » Tue May 19, 2020 3:40 pm

lurkio wrote:
Tue May 19, 2020 2:19 pm
vanekp wrote:
Tue May 19, 2020 12:43 pm
line 90 looks the same in this version (CRC-32: 6e3b3194) which seems to be where the problem lies according to this tread.
Well, line 90 is the symptom, but I don't think it's the cause because line 90 is the same in the working (non-crashing) version of the game (the STH disc version) and in at least one (and probably all) of the buggy (crashing) versions of the game (the STH tape version)!

:?
but it clearly gets stuck on line 90 as it should print 4 lines of spaces but it stops on the 1st pass (which an be seen from the 1st post) of the for next loop and the only other thing in the loop is the sound statement and as said if you disable the sound and do that bit it works so a very strange problem, why its hanging on the sound, as if you type that bit in by itself it works fine..
Peter.

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Tue May 19, 2020 4:00 pm

vanekp wrote:
Tue May 19, 2020 3:40 pm
but it clearly gets stuck on line 90 as it should print 4 lines of spaces but it stops on the 1st pass (which an be seen from the 1st post) of the for next loop
Yes, that's what happens in the STH tape version (and in the other crashy versions), but not in the STH disc version.

vanekp wrote:
Tue May 19, 2020 3:40 pm
and the only other thing in the loop is the sound statement and as said if you disable the sound and do that bit it works
Yes, the disable-sound workaround is needed if you want to avoid a crash in the STH tape version, but the workaround is unnecessary in the STH disc version, which doesn't seem to crash under any circumstances.

vanekp wrote:
Tue May 19, 2020 3:40 pm
so a very strange problem
Agreed!

vanekp wrote:
Tue May 19, 2020 3:40 pm
why its hanging on the sound, as if you type that bit in by itself it works fine..
Just to clarify: before you type that bit in by itself, you first have to clear the buffer for sound channel zero, either by pressing Escape or by typing *FX15 or *FX21,4. But I don't know why (or if!) the channel-zero buffer is "full up" in the first place..!

:?

User avatar
lurkio
Posts: 2771
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Bug in The Golden Figurine

Post by lurkio » Wed May 20, 2020 11:45 am

BREAKING NEWS!!

I think I know the cause of the bug that makes some versions of the game crash in BeebEm near the skull/wall: if you change a *FX command in the loader program from *FX212,3 to *FX212,216 then everything works!

*FX212 allows you to "Read/write BELL (CTRL G) SOUND information" according to the Beeb Advanced User Guide.

The loader in the original(?) tape version of the game on STH has *FX212,3 which, in BeebEm, seems to remove the sound-effect when you touch a red spike and also was the apparent cause, in BeebEm, of the skull/wall/SOUND0 crash.

The loader in the working, non-crashing STH disc version of the game has *FX212,216.

I launched BeebEm, loaded the STH tape, set PAGE to the address specified by the game, and then LOADed the BASIC program FIGURINE2 from tape. I then carefully used *MZAP in Disc Doctor to overwrite the *FX212,3 command with spaces. Next, I manually typed in *FX212,216 at the commandline. I then typed RUN to run the loader program, which proceeded to load the game as usual. When the game had finished loading I saved state, edited the savestate file to give myself infinite energy, loaded the savestate, and played the game through to the crashpoint -- and it didn't crash! Plus, a sound was played whenever I touched a red spike. All good.

I repeated the procedure, using Mick's version of the game from his 30th Anniversary disc 037 -- with the same result: no crash!

Why does this fix seem to work? I really don't know...

:?:
Last edited by lurkio on Wed May 20, 2020 12:30 pm, edited 6 times in total.

User avatar
leenew
Posts: 4140
Joined: Wed Jul 04, 2012 4:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: Bug in The Golden Figurine

Post by leenew » Wed May 20, 2020 12:05 pm

lurkio wrote:
Wed May 20, 2020 11:45 am
BREAKING NEWS!!

I think I know the cause of the bug that makes some versions of the game crash in BeebEm near the skull/wall:

Why does this fix seem to work? I really don't know...

:?:
Well someone knows!
If the original tape has a *FX212,3 and the working disc version changed trhis to a *FX212,216 then someone must have grasped the significance of it at some point?
On a side note - does the *FX212,216 break the game on an Elk? :-k :-

Lee.

Post Reply

Return to “the complete BBC games archive”