Bug in The Golden Figurine

feedback, questions and discussion relating to www.bbcmicro.co.uk
User avatar
dv8
Posts: 333
Joined: Mon Jun 22, 2009 10:07 pm
Contact:

Re: Bug in The Golden Figurine

Post by dv8 » Wed May 20, 2020 12:34 pm

lurkio wrote:
Wed May 20, 2020 11:45 am
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!

Why does this fix seem to work? I really don't know...
The lower 3 bits of the *FX212 value control the hold and sync parameters of the sound. A value of 3 causes the sound system to wait for 3 other channels with synced notes. Since this never happens the sounds don't get played and eventually the queue fills up.

I think the author of the game intended to set the bell to use envelope 3, in which case the correct setting is *FX212,16.

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

Re: Bug in The Golden Figurine

Post by lurkio » Wed May 20, 2020 1:17 pm

dv8 wrote:
Wed May 20, 2020 12:34 pm
The lower 3 bits of the *FX212 value control the hold and sync parameters of the sound. A value of 3 causes the sound system to wait for 3 other channels with synced notes. Since this never happens the sounds don't get played and eventually the queue fills up.
I presume that the *FX211,0 (which also appears in the tape loader, immediately prior to the *FX212,3) is the reason that it's sound channel zero that gets filled up and hence it's the SOUND0 statement that eventually causes the game to hang?

dv8 wrote:
Wed May 20, 2020 12:34 pm
I think the author of the game intended to set the bell to use envelope 3, in which case the correct setting is *FX212,16.
Thanks. I've just tested this, and using *FX212,16 does produce quite an alarming noise -- which is appropriate because you have just touched a deadly spike, after all!

Btw, if you do use *FX212,16 then the parameter to *FX211 doesn't seem to matter..?

:?:

EDIT: Btw, another issue with the tape loader is that it pokes ?&2AC=0 for some reason. That poke will disable whichever ROM is in slot 11 on the Beeb, I believe:
I don't think that that poke is necessary for The Golden Figurine to run correctly, and in fact it could cause problems, depending on what ROM is in slot 11!

User avatar
dv8
Posts: 333
Joined: Mon Jun 22, 2009 10:07 pm
Contact:

Re: Bug in The Golden Figurine

Post by dv8 » Wed May 20, 2020 4:18 pm

lurkio wrote:
Wed May 20, 2020 1:17 pm
I presume that the *FX211,0 (which also appears in the tape loader, immediately prior to the *FX212,3) is the reason that it's sound channel zero that gets filled up and hence it's the SOUND0 statement that eventually causes the game to hang?
Exactly. The loader calls *FX211,0 (channel 0), *FX212,3 (envelope 1, sync 3), *FX213,4 (pitch 4), *FX214,1 (duration 1), making the VDU7 beep equivalent to SOUND &300,1,4,1.

On the Elk the sync bits are ignored so this behaves just like SOUND 0,1,4,1. On the Beeb the sync bits matter and this causes any other sound played on channel 0 to get stuck in the queue.

The *FX212,3 looks like a bug in the original game, selecting envelope 1 rather than envelope 3. The author probably didn't notice because the noise really doesn't sound that much different when played with envelope 1. (*FX212,0 will select envelope 1 just like the Elk version but without the sync problem).
lurkio wrote:
Wed May 20, 2020 1:17 pm
Thanks. I've just tested this, and using *FX212,16 does produce quite an alarming noise -- which is appropriate because you have just touched a deadly spike, after all!

Btw, if you do use *FX212,16 then the parameter to *FX211 doesn't seem to matter..?
Something isn't quite right there, the effect does need to be played on channel 0 (*FX211,0).
I wouldn't describe the sound as alarming. On channel 0 it's kind of a 'crunchy' sound and when you land on the spikes it's a bit like a machine gun. On any other channel it sounds like an irritating high-pitched 'cheep'.

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

Re: Bug in The Golden Figurine

Post by vanekp » Wed May 20, 2020 5:31 pm

Here is a patch copy of GoldenFigurine
GoldenFigurine_BE(Fixed).uef
(11.98 KiB) Downloaded 13 times
when i have removed line 180 (?&2AC=0) and changed line 130 to *FX212,16 in the program FIGURINE2.
and a quick save just before the point of using the axe
TheGoldenFigurineSave.uef
(177.5 KiB) Downloaded 13 times
the disc version of the game from Complete BBC Micro Games with the same modification as above
Disc037-GoldenFigurine.ssd
(200 KiB) Downloaded 15 times
and it seems to now work fine with the suggestions from dv8.
Peter.

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

Re: Bug in The Golden Figurine

Post by richardtoohey » Thu May 21, 2020 12:11 am

=D> =D> =D>

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

Re: Bug in The Golden Figurine

Post by Michael Brown » Thu May 21, 2020 12:48 pm

Fantasic work fixing this game!

I wonder how many more games have bugs not yet found?
Hopefully, there are now enough of us here on this site to sort anything that springs up!

Mick.

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

Re: Bug in The Golden Figurine

Post by lurkio » Thu May 21, 2020 4:26 pm

Thanks to everyone in this thread for helping to figure out what the heck was going on with The Golden Figurine!

Using the infinite-energy cheat (?&FCD=&60) and a bugfixed version of the game (*FX212,16), I was able to follow the complete walkthrough, which, together with the accompanying map, has been created and sent to us by "DJR", the bbcmicro.co.uk user who reported the original bug and who also put up with -- and actually acceded to -- my repeated requests that he playtest various different versions of the game -- many thanks to him, too!:
DJR wrote:1) Go through screens 1-11 in order, eat the tomato because you're not going to be able to come back to this room again.
2) Drink the Magic Potion at the bottom of screen 12 and you'll float all the way up to screen 15...pick up the magnet.
3) Exit screen 15 to the right and fall down several screens to screen 16.
4) Head left to screen 19 and drop the magnet on the tile at the bottom to oppose the magnet at the top...opening up the wall.
5) Head right to screen 20 and collect the Trampoline.
6) Take the Trampoline to screen 4 and drop it on either tile.
7) Use the Trampoline to bounce up to the top of Screen 3 and keep jumping until you arrive at the bottom of screen 34.
8 ) You need to the Bright Star at the top of screen 34.
9) Drop back down to screen 3 and then right to screen 4 and put the Bright Star down on the other tile.
10) Pick up the Trampoline again and take it to the bottom of the mountain on screen 22.
11) Head right again to screen 21 and drop down far right to screen 23...pick up the Flame.
12) Take the flame back to screen 22 and bounce up the mountain.
13) Jump the gap on screen 25 and drop the Flame on the tile next to the Snowman...he'll melt...
14) ...Allowing access to screen 27 and the Pick Axe on the far left.
15) Take the Pick Axe to screen 4 and drop it on the spare tile. Pick up the Bright Star.
16) Take the bright star back up the mountain and claim your first key in screen 35.
17) The mountain section is now complete and you won't be using the Bright Star again...so drop it wherever you can (I used screen 27).
18) Now you are going back to screen 4 for the Pick Axe and taking it to screen 33.
19) Head to the wall on the far right while holding the Pick Axe and the earth will disappear allowing access to the Skull.
20) You'll need to go and drop the Pick Axe somewhere now (screen 29) in order to retrieve the Skull.
21) Beware of the fish, it is bait! Unless you have another object to replace the fish with don't eat it...it will leave you stranded in screen 33 unable to jump back over the blue tree.
22) Drop the back down all the way to the main floor and down into screen 23.
23) Go right into screen 36 and complete the skull pattern in the wall. The wall will open up...your second key is in screen 37.
24) Climb back up to screen 28 and up into screen 38 for the first time. Go right to screen 39 and go across the water for the Plug.
35) Take the Plug back to screen 4 and store it on one of the tiles.
36) Now you're heading back to the mountain on screen 22 for the Trampoline once again.
37) Take the trampoline and drop it where you found the plug up in screen 39.
38) Bounce up into screen 40 and head across the sky to screen 43.
39) Drop into screen 44 on the left side and retrieve the third key...exit on the right side back up into screen 43.
40) Back the way you came...picking up the Trampoline for the final time in screen 39.
41) Take the Trampoline all the way to as far right as you can go in the game (to this point)...drop it on the tile in screen 46.
42) Head back to screen 4 for the Plug....take the Plug to where you left the Trampoline on screen 46.
43) Bounce up to the upper surface of screen 46 and go right to screen 47...drop the Plug in the hole, repairing the boat.
44) Do your best Kate Winslet impression to sail the boat across the water to screen 50.
45) Go to the top of the tower...you need the Tuning Fork in screen 54.
46) Drop back down out of the tower and go through screen 55 and into 56 for your 4th key.
47) Take the Tuning Fork all the way back through the game and up to screen 28....finally you can retrieve the 5th key that's been making fun of you in the glass bottle!
48) You now have all 5 keys. Go to screen 57 and claim your prize; one Golden Figurine.

If you're using the cheat version then this is just a case of doing everything in the right order and not falling into an inescapable trap. If you're not using the cheat then you'll have to strategically chose when and where to pick your food sources and keep your strength up. Save states really help but it's quite doable with some practice without.
:)

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

Re: Bug in The Golden Figurine

Post by Diminished » Thu May 21, 2020 6:37 pm

Nicely done. =D>

I might consider trying to beat this again, since I suspect it was this bug that stopped me back in the late 80s ...

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

Re: Bug in The Golden Figurine

Post by vanekp » Thu May 21, 2020 7:35 pm

I played it through yesterday with this fix and was able to finish the game with no problems.
Peter.

User avatar
LordVaderUK
Posts: 208
Joined: Thu Jan 31, 2019 12:26 am
Location: Hampshire
Contact:

Re: Bug in The Golden Figurine

Post by LordVaderUK » Thu May 21, 2020 8:21 pm

I have watched and read this thread with admiration - the skills on show, debugging a 30+ year old programme! It's been like watching a detective solve a crime by following the clues and gathering evidence :shock:
Loving my BBC Master 128

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

Re: Bug in The Golden Figurine

Post by richardtoohey » Thu May 21, 2020 11:02 pm

I think it needed a few more red herrings, and there wasn't a proper twist at the end! :lol:

Post Reply

Return to “the complete BBC games archive”