CPCWiki forum

General Category => Games => Topic started by: Xyphoe on 23:21, 09 May 12

Title: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 23:21, 09 May 12
Hi guys!

It seems I'm not having much luck recently with doing longplays and bugged games!  :(

This time I'm looking at Blade Runner.

It's pretty simple stuff - you've got to shoot 24 'replicants' (move you ship over the map, press fire over a flashing icon (replicant) to land and shoot them - switches to side-scrolling shoot-em-up where you run along and shoot the guy (replicant) that's running away from you avoiding pedestrians and other ships/cars)

The game basically crashes or rather resets to the title screen around the 11th to 13th replicant.
On shooting him one time the game freezes until you press a key - the ship starts it ascent and the game resets to the title screen!!  :o ARGGH!  >:(

I have a snapshot you can load in WinApe attached - it's for the tape version 64k
http://cpc-power.com/index.php?page=detail&onglet=dsk&num=406 (http://cpc-power.com/index.php?page=detail&onglet=dsk&num=406)
http://cpc-power.com/pages/download.php?fiche=406&dsk=9 (http://cpc-power.com/pages/download.php?fiche=406&dsk=9)

If you need any more info or explanation let me know. I took a look in WinApe debugger for text and messages (which you can find from 0280 to 0560), it appears you can complete the game because I see the text "The End" there (I guess there's no ending screen then!)

I hope that someone can work out the cause of this bug and fix it. I've tried other dumps of the game and same/similar thing.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 21:26, 14 May 12
Has anyone taken a look at this at all?
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Puresox on 17:50, 15 May 12
The crapness of the game may have scared them off? :D . Although I do hope someone does take a look , I am missing your Lp's.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Gryzor on 07:50, 16 May 12
I had never seen the game, but it doesn't look that bad. And it looks surprisingly Blade Runner-ish, too! Too bad I can't understand what to do and how to control it...
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: ivarf on 08:13, 16 May 12
I remember the good music in this game.  :D  I never go very far in the game, but still enjoyed it. Several years later I watched the excellent film and was totally stunned
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 14:39, 20 May 12
It's probably not helped matters for those that downloaded the SNAP having to work out what the hell is going on, and fighting against a really hard opponent who very easily kills you (he's one the highest rating replicants and lethal!). Maybe I would have been better doing a vid to show it.

Well I'll leave it a couple more days I think to see if anyone comes in with a fix and will do the longplay anyway noting it's bugged and crashes (by that point you've seen all the game has to offer anyway I suppose!)
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: genesis8 on 16:21, 21 May 12
I wrote a message about your problem on http://cpcrulez.fr/forum/viewtopic.php?f=6&t=4868 (http://cpcrulez.fr/forum/viewtopic.php?f=6&t=4868)

Where they already did patch some problematic games.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 19:03, 21 May 12
Thank you, that's very kind of you.

I may hold off for a bit then and maybe do a quick vid of it in action to help illustrate - you have to run off and shoot the man running *away* from you (everyone else moving towards you are pedestrians) - at this level it's quite hard to shoot him without practice as he very easily kills you.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: genesis8 on 22:40, 21 May 12
Solution by Hermol, webmaster of CPCRulez : 3 NOP starting at &AA6 to avoid coming back to the main menu after the ship goes away from the street.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 20:57, 22 May 12
Quote from: genesis8 on 22:40, 21 May 12
Solution by Hermol, webmaster of CPCRulez : 3 NOP starting at &AA6 to avoid coming back to the main menu after the ship goes away from the street.

Cool, not quite sure what I need to do exactly in WinApe debugger window ... could someone less thick as me elaborate and explain? Sorry  :-[
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Nich on 20:57, 27 May 12
Quote from: Xyphoe on 20:57, 22 May 12
Cool, not quite sure what I need to do exactly in WinApe debugger window ... could someone less thick as me elaborate and explain? Sorry  :-[
You need to select the "Debug" option from the menu, then select "Pause" - or alternatively, just press the F7 key. This will open the WinAPE Debugger window. Click on the bottom window with the list of hexadecimal bytes.

Near the bottom right of the window is a pointing hand. Click on this, or press Ctrl+G, and a window should appear asking for an address to go to. Enter 0AA6. The byte at address 0AA6 should now be highlighted, and the sequence of bytes at this address should be "C2 CF 07". Enter 00 00 00 to overwrite these bytes (00 represents the NOP instruction on a Z80).

Please note that I have not actually played the game so I don't know if Hermol's suggestion works!
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 06:02, 28 May 12
Quote from: Nich on 20:57, 27 May 12
You need to select the "Debug" option from the menu, then select "Pause" - or alternatively, just press the F7 key. This will open the WinAPE Debugger window. Click on the bottom window with the list of hexadecimal bytes.

Near the bottom right of the window is a pointing hand. Click on this, or press Ctrl+G, and a window should appear asking for an address to go to. Enter 0AA6. The byte at address 0AA6 should now be highlighted, and the sequence of bytes at this address should be "C2 CF 07". Enter 00 00 00 to overwrite these bytes (00 represents the NOP instruction on a Z80).

Please note that I have not actually played the game so I don't know if Hermol's suggestion works!

Ahhh thanks Nich, really I knew all the above but what I should have been more specific about was what "NOP" stood for and what to do ... ie enter 00's, but that totally confused me and made me thing I should be doing something completely different.


OK! That kinda worked!
The bug happened, but it went back to the map screen but the replicant wasn't dead, but I was able to select him to fight and I could then kill him, looks like it cleared the bug! I kept going to replicant 24 which should be the last one.....

1) With the NOPs in place, weirdly the game carried on and put 4 new replicants to kill  ???
2) Without (ie the original values back in place) after successfully killing  him without bug happening, I ascended in my ship and it went back to the title screen. Meh. Bug or expected ending to the game?....

However if you look at around 02B4 you will see the text "THE END" ... perhaps this is the message that should flash up when completing the game? Could someone ask Hermol to see what triggers this message and what jumps to it perhaps?

Nearly there!!!
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Johnny Olsen on 15:19, 04 June 12
Hi Xyphoe

you are only allowed to hit 5 pedestrains.
The problem is that when you hit one of the harder replikants (2 or 3 hit to die) you also hit a Pedestrian.

After you hit a hard replikant the code jump from &19a7 to &19c9 and there sub one Pedestrian

Try poke &19a8,&19 maybe it solves the problem.

You can use your "bladerunner_64ktape_test_13.sna" file to test just poke &19a8,&19 and poke &19cc,x  x=Pedestrian hit default 6

The freeze thing is not a bug - the game wait for a keypress in &3239

I can't find the replikants counter (24 replikants or 6 rounds) maybe you have to kill 36 replikants 36=&24 hex.

When you reach 500.000 point you will see the very nice end screen.


198b: ld hl,(&1911)
198e: inc l
198f: ld a,(hl)
1991: inc l
1991: cp &06
1993: ld a,&82
1995: jr nz,&19ca


1997: ld de,&02f2    ---    pointer to the word "Hit"
199a: ld (&0287),de
199e: add a
199f: add a
19a0: push af
19a1: ld a,&03       ---    Hit counter (Replikants) - could be 1,2 or 3
19a3: dec a          ---    Sub one hit
19a4: (&19a2),a      ---    save new hit counter
19a7: jr nz,&19c9    ---    if not zero then jump to &19c9 - Try change to jump to &19c2 (&19a8,&19)

19a9: ld de,&02fa
19ac: ld (&0287),de
19b0: ld a,&c9
19b2: ld (&1bf5),a
19b5: ld a,&fe
19b7: ld (&2040),a
19ba: ld (&1c47),a
19bd: ld a,&af
19bf: ld (&17e4),a

19c2: ld a,(&19cc) 
19c5: inc a          ---    add one hit (Pedestrian)
19c6: ld (&19cc),a


19c9: pop af
19ca: ld (hl),a
19cb: ld a,&05       ---    Hit Counter (Pedestrians)
19cd: dec a          ---    Sub one hit
19ce: ld (&19cc),a   ---    save new hit counter
19d1: srl a
19d3: jp z,&1aac     ---    If Zero the jump to dead
19d6: ld hl,&03f8    ---    else pointer to the message "Warning Pedistricide is an ....."
19d9: dec a
19da: jr z,&19e2



By the way - try poke &1dc,5 when you play the map part
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 04:25, 07 June 12
Hi Johnny,

WOW! Thank you sir for taking the time to look into this and present your findings, that's really appreciated!

I believe we have found at least a work-around for this issue and the cause of it.

Yes it does appear that the 'pedestrian hit' counter is at the root of this and the game subs a pedestrian when hitting this replicant. I think this is a bug somehow, because I've tested when no pedestrian was in the 'line of fie' in front of the replicant to the best I can, it always happens.

Poke &19A8,&19 does appear to work

Also increasing poke &19CC value (ie pedestrian hit counter) does work too.
In the attached .sna that value is really low at 02, and it appears the game stops for killing pedestrians when it's at 01, so if I increase that value I can continue on fine and problem solved!

So well done and I can always rely on you now it seems to fix and find bugs/solutions!  :D

I still think somewhere there's a bug, because otherwise the pedestrian hit counter would have got very low very quickly! Also...

> The freeze thing is not a bug - the game wait for a keypress in &3239

There's no other point in the game where it does require a keypress.

If you shoot pedestrians and too many of them - you get the appropriate message appear in the text window. On 'my bug' the text window isn't scrolling any text at all which is really odd.

Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 04:29, 07 June 12
Quote from: Johnny Olsen on 15:19, 04 June 12
When you reach 500.000 point you will see the very nice end screen.
.
.
.
By the way - try poke &1dc,5 when you play the map part

COOL! So there is an ending, and you have to get to 500,000 points! I see that poke tells the map screen that the number of value per 100,000 points, so poking 5 means 500,000 right?
And voila... ending screen!

Sheesh though... that's an awful lot of points to get. I tested until replicant number 32 and I was on 300,000-ish points :(
To make matters worse there's a set number of scientists, which are slowly being killed off. So it's a kind of global time limit. At this point in the game there's only 1 scientist left, so it's pretty much impossible to complete anyway. Certainly with 1 shot kills and game over!!! GRRR!
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Carnivius on 08:12, 07 June 12
Never played this before but gave it a go cos I like the movie.  It's not a bad little game.  Didn't take long to figure out what was what and I got quite into it.  Helped partially by the rhythm of the music too.   And a strange sense of satisfaction of shooting those replicants in the back.  :)
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Johnny Olsen on 08:57, 07 June 12
Quote from: Xyphoe on 04:29, 07 June 12
COOL! So there is an ending, and you have to get to 500,000 points! I see that poke tells the map screen that the number of value per 100,000 points, so poking 5 means 500,000 right?
yes

Quote from: Xyphoe on 04:29, 07 June 12
I tested until replicant number 32 and I was on 300,000-ish points :(

Maybe there's another way to reach the end screen.
I still think you have to kill 36 replicant's - &24 hex is the way computer's count's which is equal to 36 dec - perhaps an error in the manual

If you poke &19a2,01 you only have to hit the replicant's one time - it would make the game much easier.

Please can i have a snap file with 32 replicant's killed?

Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 22:11, 07 June 12
Quote from: Johnny Olsen on 08:57, 07 June 12
Maybe there's another way to reach the end screen.
I still think you have to kill 36 replicant's - &24 hex is the way computer's count's which is equal to 36 dec - perhaps an error in the manual

Well! After an evening testing (or wasted? Why do I put myself through this and waste my time! lol!) and a lot of snapshot reloading I got all the way up to replicant number 48!!!!!!

After I killed him my score then ticked over the 500,000 mark... which is when I got the ending screen.

Hmmph.

Where did you see the "&24 hex" thing and think this might be a counter for the ending?
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 08:54, 27 October 17
Sorry to necro an old topic, but I've done a huge amount of more work into this game, as has Johnny Olsen again for me.

We've both reached the point where we can do no more. And I'll be live streaming this evening (10pm on YouTube) the game trying to beat with a few things we've implemented and poked.

The game is still very broken and bug ridden. Attached is a text file with all that is wrong, what can be fixed, and what we haven't been able to fix. Any hope of sorting out all the problems I don't think will happen, eg the scientists bug where at the start of a new wave the counter for them doesn't reset back to 4 if some were killed in a previous wave so less spawn, making the game near impossible to beat - Johnny couldn't find this counter and looks like there's a fair bit of self modifying code there too.

Basically it's a mess! See the attached file, and feel free to tune in at 10pm (BST) this evening on YouTube to see me discuss, play and hopefully 'beat' it! https://gaming.youtube.com/c/Xyphoe/live
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Sykobee (Briggsy) on 10:46, 27 October 17
I wonder if the game writers were planning a difficulty selector screen and then ran out of time, and shipped it with the most difficult settings.


E.g., Easy - 1 hit replicants, 10 pedestrians allowed to be killed, 200,000 / 24 to win
Medium - 2 hit replicants, 8 pedestrians allowed to be killed, 300,000 / 36 to win
Hard - 3 hit replicants, 5 pedestrians allowed to be killed, 500,000 / 48 to win


I wonder if someone can make a CPR with the possible bug fixes and a trainer / difficulty selector.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Gryzor on 10:55, 27 October 17
Thanks for the update man! Sadly that will be too late for me to watch, hope I catch it tomorrow!
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 12:03, 27 October 17
Quote from: Xyphoe on 08:54, 27 October 17
Sorry to necro an old topic, but I've done a huge amount of more work into this game, as has Johnny Olsen again for me.

We've both reached the point where we can do no more. And I'll be live streaming this evening (10pm on YouTube) the game trying to beat with a few things we've implemented and poked.

The game is still very broken and bug ridden. Attached is a text file with all that is wrong, what can be fixed, and what we haven't been able to fix. Any hope of sorting out all the problems I don't think will happen, eg the scientists bug where at the start of a new wave the counter for them doesn't reset back to 4 if some were killed in a previous wave so less spawn, making the game near impossible to beat - Johnny couldn't find this counter and looks like there's a fair bit of self modifying code there too.

Basically it's a mess! See the attached file, and feel free to tune in at 10pm (BST) this evening on YouTube to see me discuss, play and hopefully 'beat' it! https://gaming.youtube.com/c/Xyphoe/live (https://gaming.youtube.com/c/Xyphoe/live)

Have you play the spectrum version, it appears a port of it, the spectrum have the bugs?.

O.k then the scientific are located in &007c/0083 The are 16 bytes for each, each 8 byte are x coordinate and y coordinate, when a scientific dead the x coodinated are changed to FF-> so ff= dead.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: arnoldemu on 13:50, 27 October 17
007c is referenced 7 times in the code.


c15, 1164, 11f3, 143e, 146e, 14b4, 1500

c01 appears to generate a random position. so this looks to be initialising.
it also checks at c1a if the value is ff or not.

14da, 14db,14dc, take that out and they should not die.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 14:43, 27 October 17
There are other  indirect checks.

in &116f  when is reading the x coordinate the ff causes  the activation of jump so ff is write back in the same place. This happend at change of level.

inc a ff=0 z flag activated. &116a read x coordinate.

if i have a dead scientific,i add the patch at fly ,he continue dead, because the old ff is here. but eilminating the inc a causes rare effects. without your parch the first scientific is dead now, because i alter the obscure table is reading all time in &0054/55 &005e/f 0068/69  &0072/73 in &14d1/14d7 With you patch apply and eliminating inc a i cause a reset.

Change only 1170/1/2 to 00 appears works, but is strange. It appears is made deliberatery, not a bug really.

This is a dsk  with the two  patches (bug 1+2) to test.

About the other bug, the starpoint is put a breakpoint in memory write in &0AA4. this variable change the valor indicated if the game need load star menu, map etc..  So when bug #3 appear and stop in the breakpoint make a snapshot. From now i can't reproduce it lucky question.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 19:07, 27 October 17
Quote from: dragon on 12:03, 27 October 17
Have you play the spectrum version, it appears a port of it, the spectrum have the bugs?.

O.k then the scientific are located in &007c/0083 The are 16 bytes for each, each 8 byte are x coordinate and y coordinate, when a scientific dead the x coodinated are changed to FF-> so ff= dead.

WELL FOUND!

I think it also solves the random 'game over' I experienced.

I had 1 scientist left, and took a snapshot after I was ascending up after killing a replicant, the map screen loads, then the map screen sort of refreshes itself... then game over occurred.

After the map refreshes the values all changed apart from the ones with FF load. So it's on this reload, it detected that 4 replicants have been killed and it's the end of the wave - thus respawn 4 new replicants and any remaining scientists to new locations.

The values starting from &007C were ->

FF 21
0B 26
FF 21
FF 21

At this point before it could find the game over and kick me, I changed the first one from "FF 21" to "0B 21" .... I didn't get a game over!

So I allowed 1 or 2 seconds to wait and see if the game over kicked in, it didn't. And rechecking the code the 2nd scientist that was alive was NOT anymore - he had changed from "0B 26" to "FF 26".

How he had died... I do not know. I think he had respawned, but on top of a replicant which is an instant kill.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 19:13, 27 October 17
Quote from: dragon on 14:43, 27 October 17
There are other  indirect checks.

in &116f  when is reading the x coordinate the ff causes  the activation of jump so ff is write back in the same place. This happend at change of level.

inc a ff=0 z flag activated. &116a read x coordinate.

if i have a dead scientific,i add the patch at fly ,he continue dead, because the old ff is here. but eilminating the inc a causes rare effects. without your parch the first scientific is dead now, because i alter the obscure table is reading all time in &0054/55 &005e/f 0068/69  &0072/73 in &14d1/14d7 With you patch apply and eliminating inc a i cause a reset.

Change only 1170/1/2 to 00 appears works, but is strange. It appears is made deliberatery, not a bug really.

This is a dsk  with the two  patches (bug 1+2) to test.

About the other bug, the starpoint is put a breakpoint in memory write in &0AA4. this variable change the valor indicated if the game need load star menu, map etc..  So when bug #3 appear and stop in the breakpoint make a snapshot. From now i can't reproduce it lucky question.

Thank you Arnoldemu and Dragon, I appreciate you looking into it.

Although I have to admit the above I don't really understand.

So it seems then that the game has no intention of spawning in 4 scientists at the start of each wave, and if one is dead leaving you 3 ... then 3 is all you get on the start of the next wave! Hardly fair! Because as described in my post above.... they can be instantly wiped out by bad spawns, etc.

Seriously. Fuck this game. :D
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 19:32, 27 October 17
Quote from: Xyphoe on 19:13, 27 October 17
Thank you Arnoldemu and Dragon, I appreciate you looking into it.

Although I have to admit the above I don't really understand.

So it seems then that the game has no intention of spawning in 4 scientists at the start of each wave, and if one is dead leaving you 3 ... then 3 is all you get on the start of the next wave! Hardly fair! Because as described in my post above.... they can be instantly wiped out by bad spawns, etc.

Seriously. Fuck this game. :D

its easy, when you finish one wave the game do this:

Examine the 4 scientific, if a found a scientific die(=ff). I not touch it(he rewrite ff). If he have another number( isalive) i generated a new coordinate(a number diferent of ff) to deploy he in the next wave.

To do that it take ff and made ff+1=00  and then look  if ff+1=0 then is die so i write ff as new cordinate if is another number (05+01=06 for example) i write another number as x coordinate

So if you eliminated the 1170-3 jump, the game now tell, generate all new coordinate to all scientifics die or not,Maybe can be a bug if he search jump to diferent localitation, maybe arnoldemu can examinte that. But i left you decide if is a bug or not. thats my  theory at least.

00=nop= do nothing..
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 19:55, 27 October 17
Quote from: dragon on 19:32, 27 October 17
So if you eliminated the 1170-3 jump

So to be clear, I would poke the following ->

1170 00
1171 00
1172 00
1173 00

It should then generate 4 new scientists at the start of a wave?
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 20:22, 27 October 17
Uh not sorry 1170 to 1172 muy fault.


Put your snapshot here and i can look what i killing the scientific.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 11:56, 28 October 17
Well! The live stream last night was ermmm 'interesting' !

Looks like Blade Runner is even more of a mess than we thought.

If you're interested in seeing what happened the catch up video is here to watch ->

https://www.youtube.com/watch?v=BwpfbVpj8WI
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 13:54, 28 October 17
Quote from: Xyphoe on 11:56, 28 October 17
Well! The live stream last night was ermmm 'interesting' !

Looks like Blade Runner is even more of a mess than we thought.

If you're interested in seeing what happened the catch up video is here to watch ->

https://www.youtube.com/watch?v=BwpfbVpj8WI (https://www.youtube.com/watch?v=BwpfbVpj8WI)

jajaja, very funny. I know why my patch don't work in these case. Becase these part of the code is shared. The game set game over  early and set load the principal screen+initialize the scienficist and go in to the patch.

He only work if you have at least one scientific alive when return to hunt the replicant because the game in this case don`t have set game over.

I am very intrigating that who casues the texas matanze where you are hunter jaja.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 18:38, 28 October 17
O,k i have the diagnostic of the bug 3.  :D (well  is not a bug is  :laugh: XDDD).

That is what is happend: The game is programed so when you go to hunt mode, the game executed &80 times=50 times!!! the subrutine that move the replicants first, and second check if the replicants have killed someone and check if all are dead to kill you.

So basically the replicants  travel and travel(maybe not move or yes depending of your lucky). And kill al scientifics they found in these 50 calls. so all can be dead when you hunt, or with lucky if one survive maybe the replicant are Next to the survivor and kill he when move normal in to the map.

Posible solutions:

A)Kill the call to the subrutine, so he never move the replicants when you go hunt, and they are in the same place after you return. &1676=00,&1677=00,&1678=00

B)Change the number of times he call the subrutine, so they move less and reduce their walk possible radio.  &1675(80)=another number you want try.

This  programmer was a .... but what a nice guy. :D

Arnoldemu, you can take a little look to the spectrum and view if the 80 is setting equal?.

I have tested the option A, And i have finished the game. The option B is necesary check it.

I upload a option b with numer 14(20)  idon't have try it to test...
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: arnoldemu on 12:33, 29 October 17
I have compared code and the cpc code is almost the same as the spectrum code, but the code is moved around.

On spectrum one function is at e1b5 in CPC it's at c0f.

The random number function is different.

Data on spectrum is at 0d047h. Look for these in the attached dissassembly.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: arnoldemu on 13:55, 29 October 17
same code is at d8d8h. same number.

Maybe it is ticking slower on spectrum compared to cpc?
Maybe they are ticking it 6 times too fast on cpc?

Spectrum interrupt is at d600, they are doing something with the data, but only every 16 frames (every 16/50 of a second).

#01F9 on CPC appears to regulate how much this is called.

On spectrum it's switched between 40 and 1 I think, from the spectrum's interrupt. I can't see the same on CPC.

Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 14:42, 29 October 17
Well to fast is, really the speed of replicant depends of their level, level 6 are to fast, the in game map calls the same subrutine, so ithe level 6 can kill all a lot faster that the level 1.

I think the part  where jumps using 01f9 are the part where he check if the replicant are in the same coordinates and if so he kill they. The first part should be movement/ai subrutine.

The repilcants use a table i don't know the use exactly. &0054/55 &005e/5f &0068/69 &0072/73 (are x,y same as scientific), but between replicants the rest of the table is used in these algoritm extracting data and moving it to iy ix.

&14d1(x),d1(y) cp  are where the position are compared with scientifics in the second part.

I'am thinking in another option, that was made a backup in case they kill all when move. So he can't kill you when you are in hunt mode but he can move and kill replicants, so maybe you can return with one alive and  this only can be killed in the map.


org &1671
;detour one
jp &be80

org &167b
;detour 2
jp &be97

org &be80
;we backup of scientifcs status. 
push bc
push de
push hl

ld hl,&007c
ld de,&bee0
ld bc,&0008

ldir
pop hl
pop de
pop bc
;restaure your code
push bc
push de
push hl

jp &1674; go to call movement subrutine when hunt



org &be97
;status subrutine hunt movement call finished
;this subrutine detects if all scientifics are ff, if so they are dead,we restaure de scientifics backup.
push af
push bc
push hl
push de
ld c,&00;counter dead scientifics
ld a,&00 ;temporary
ld b,&04 ;array scientfics number
ld hl,&007c
:bucle
ld a,(hl)

cp &ff ;we look count  the numbers of ff
jp nz,salto
inc c
:salto
inc hl
inc hl
djnz,bucle
ld a,c ;result is in a
cp &04 ;if 4 scientifis are dead we restaure the copy to resucitate they.
jp nz,salida
ld hl,&bee0
ld de,&007c
ld bc,&0008
ldir
:salida
pop de
pop hl
pop bc
pop af
;restaure original code.
xor a
ld (&018e),a
ld (&008e),a
jp &1682


Apply it in the red start screen. The game move the pile to the ram low zone so is free :).
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: arnoldemu on 15:31, 29 October 17
the replicant movement code is not called on spectrum when you are in the scrolling part - where it loops 128 times. EDIT: Same with cpc.
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: Xyphoe on 07:50, 01 November 17
LOL! Great work guys, I do think it's lovely we have people in this scene that care about a crappy old game!

Sorry for the delay in my reply, I'm now completely burnt out on Blade Runner and since the stream didn't want to look or think about it again!  :P

Quote from: arnoldemu on 15:31, 29 October 17
the replicant movement code is not called on spectrum when you are in the scrolling part - where it loops 128 times. EDIT: Same with cpc.

Interesting, so does that mean Dragon's theory is not the case?

If so, perhaps after you kill a replicant on the side-scrolling stage, when you start back on the map before you take control, the replicant has ALREADY moved too quickly and killed the remaining scientist before you even have time to start moving yourself?
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: dragon on 09:41, 01 November 17
Yes, they move, ,i don't know why arnold tell  they not, they not move in all calls,thats depend of the algoritmh but they move.


Anyway efectivily they move too in return to the map, but he need to stay close to the replicant to kill he.


Thats what y always tell the emulators should have a option in ram breakpoints to not only stop when the ram position is writen. It should have a option to stop when a ram position is writen with another diferent value that it have when you put the breakpoint. Or only stop in a value you want to stop.


Actually to check when it moves, you need to put a breakpoint in replicant x/y position and check it 150 times, because he always rewrite the ram direction with same number(not moving) or diferent number(moving).
Title: Re: Blade Runner - another broken game! Bug needing a fix :(
Post by: arnoldemu on 14:47, 06 November 17
Quote from: dragon on 09:41, 01 November 17
Yes, they move, ,i don't know why arnold tell  they not, they not move in all calls,thats depend of the algoritmh but they move.
I put a breakpoint here in the spectrum emulator, but I didn't know how the game works so I didn't see it break at another time.


Quote from: dragon on 09:41, 01 November 17
Anyway efectivily they move too in return to the map, but he need to stay close to the replicant to kill he.


Thats what y always tell the emulators should have a option in ram breakpoints to not only stop when the ram position is writen. It should have a option to stop when a ram position is writen with another diferent value that it have when you put the breakpoint. Or only stop in a value you want to stop.
Yes you can do that in arnold, set the data mask to ff and set the data to the number.
You can also set a hit count so that it hits later.

I was on holiday so I didn't have time to look at this more. I am planning to dissassemble the spectrum version and the cpc version but in a way I can compare them with winmerge tool.
Powered by SMFPacks Menu Editor Mod