locating different attributes in simon's Quest

Started by TheWhipperSnapper, March 10, 2013, 12:35:03 PM

Previous topic - Next topic


I've been attempting to find different values for Simon's hit/ knock back distance.
The data that's available states that it's 24 spaces which is 17 in hex. I'm also trying to find the values for when he walks on solid objects as opposed to walking over gaps pits or water traps. I've tried to find this using his X and Y coordinates but so far no luck.  Do you have any suggestions for techniques I could use to find these values?


You should try asking Bisqwit on his retranslation post he has. He has done quiet a lot on improving this already awesome game.


For the record, he asked me whether "there is a way to fix the knock back gravity and jump descent". I could not see what there is that needs "fixing" in them, so I answered accordingly.

The question posted in this thread is different.

Anyway, what you are looking for, re: damage-knockback, is this code:
        $D36F  AD 20 04:    lda ObjectFacingLeft
        $D372  F0 06:       beq +               ; $D37A
        $D374  A0 FF:       ldy #$FF ; Set X velocity to $FF00, which translates into -1 pixels per frame.
        $D376  A9 00:       lda #$00
        $D378  F0 04:       beq ++              ; $D37E

+       $D37A  A0 01:       ldy #$01 ; Set X velocity to $0100, which translates into +1 pixels per frame.
        $D37C  A9 00:       lda #$00
++      $D37E  20 6A D3:    jsr $D36A
        $D381  A9 FD:       lda #$FD
        $D383  A0 80:       ldy #$80
        $D385  20 62 D3:    jsr $D362 ; This sets actor's Y velocity to $FD80, which translates into -2.5 pixels per frame.
        $D388  A9 1F:       lda #$1F
        $D38A  20 87 DD:    jsr SetObjectUnknown40E_to_A_for_Simon
        $D38D  20 CA DC:    jsr DeleteSimonWhipObject
        $D390  A9 06:       lda #$06
        $D392  8D D8 03:    sta ObjectCurrentActionType
        $D395  A9 20:       lda #$20
        $D397  8D B0 04:    sta ObjectUnknown4B0
        $D39A  20 D3 D3:    jsr FindIfThereIsAFloatingPlatform
        $D39D  90 07:       bcc +               ; $D3A6
        $D39F  A9 00:       lda #$00
        $D3A1  9D 7A 04:    sta Ending_PrimaryActionIndex,x
        $D3A4  85 41:       sta $41 
+       $D3A6  A9 5F:       lda #$5F ; The UGH sound effect (DPCM)
        $D3A8  20 18 C1:    jsr AnyBankPlayTracks
        $D3AB  60:          rts

For finding what Simon and other actors are walking on, the game maintains a table of cached level map / solidity in RAM addresses $520 through $6FF. I am not sure how exactly to index that map, but there you have it. It appears to have a horizontal mirroring scheme to it: it stores two screens vertically, and the same screen horizontally twice.
Each tile is indicated as 4 bits (one byte encodes two 16x16 tiles), and a value 0x0 means air, 0xA means solid, 0x3 and 0xC may mean a door. 0x2 may mean a slanted surface (\, ceiling). 0x5 is an "evil" wall (breakable wall). It is also possible that the values are 2-bit, in fact. Functions $1EB37 and $1EA17 in conjunction seem to calculate an offset to this array, invoked by function $1E979.


Thank you Bisqwit. I can't wait to try these.