Author Topic: Blade Runner - another broken game! Bug needing a fix :(  (Read 8275 times)

0 Members and 1 Guest are viewing this topic.

Offline Xyphoe

  • 6128 Plus
  • ******
  • Posts: 910
  • Country: gb
    • GX4000.CO.UK
  • Liked: 346
  • Likes Given: 191
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #25 on: 21:13, 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

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.526
  • Country: es
  • Liked: 685
  • Likes Given: 496
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #26 on: 21:32, 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..

Offline Xyphoe

  • 6128 Plus
  • ******
  • Posts: 910
  • Country: gb
    • GX4000.CO.UK
  • Liked: 346
  • Likes Given: 191
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #27 on: 21:55, 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?

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.526
  • Country: es
  • Liked: 685
  • Likes Given: 496
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #28 on: 22: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.
« Last Edit: 23:40, 27 October 17 by dragon »

Offline Xyphoe

  • 6128 Plus
  • ******
  • Posts: 910
  • Country: gb
    • GX4000.CO.UK
  • Liked: 346
  • Likes Given: 191
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #29 on: 13: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

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.526
  • Country: es
  • Liked: 685
  • Likes Given: 496
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #30 on: 15:54, 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

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.

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.526
  • Country: es
  • Liked: 685
  • Likes Given: 496
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #31 on: 20: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...
 
« Last Edit: 13:48, 29 October 17 by dragon »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #32 on: 13: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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #33 on: 14: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.

« Last Edit: 15:19, 29 October 17 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.526
  • Country: es
  • Liked: 685
  • Likes Given: 496
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #34 on: 15: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.

Code: [Select]
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 :).
« Last Edit: 16:13, 29 October 17 by dragon »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #35 on: 16: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.
« Last Edit: 16:37, 29 October 17 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Xyphoe

  • 6128 Plus
  • ******
  • Posts: 910
  • Country: gb
    • GX4000.CO.UK
  • Liked: 346
  • Likes Given: 191
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #36 on: 08: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

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?

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.526
  • Country: es
  • Liked: 685
  • Likes Given: 496
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #37 on: 10: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).
« Last Edit: 11:30, 01 November 17 by dragon »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Blade Runner - another broken game! Bug needing a fix :(
« Reply #38 on: 15:47, 06 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.


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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource