News: 11 March 2016 - Forum Rules

Author Topic: locating different attributes in simon's Quest  (Read 3545 times)

TheWhipperSnapper

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
locating different attributes in simon's Quest
« on: March 10, 2013, 12:35:03 pm »
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?
« Last Edit: March 10, 2013, 12:42:31 pm by TheWhipperSnapper »

Da_GPer

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: locating different attributes in simon's Quest
« Reply #1 on: March 11, 2013, 02:20:49 am »
You should try asking Bisqwit on his retranslation post he has. He has done quiet a lot on improving this already awesome game.

Pikachumanson

  • Hero Member
  • *****
  • Posts: 607
    • View Profile
Re: locating different attributes in simon's Quest
« Reply #2 on: March 11, 2013, 04:32:20 am »
He already did.

Bisqwit

  • Sr. Member
  • ****
  • Posts: 424
  • Polite, but politically incorrect.
    • View Profile
    • http://iki.fi/bisqwit/
Re: locating different attributes in simon's Quest
« Reply #3 on: March 13, 2013, 01:36:18 am »
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:
Code: [Select]
_loc_1D36F
        $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.
« Last Edit: March 13, 2013, 02:10:18 am by Bisqwit »

TheWhipperSnapper

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: locating different attributes in simon's Quest
« Reply #4 on: March 13, 2013, 09:11:21 pm »
Thank you Bisqwit. I can't wait to try these.