Joined: 4/1/2010
Posts: 90
Thanks a lot HHS, this knowledge about the RNG could lead to a few interesting things - especially the portion where you say, that the bosses have separate RNG behavior Also, I love those small bits of trivia, I'll check that out :) Edit: Unfortunately I didn't manage to make the message appear or make the people disappear in any of the houses... I wonder what I'm doing wrong
Joined: 6/4/2013
Posts: 8
Hmm the hidden textbox/field music isn't working for me either. :(
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
Ah, sorry, it's 7ECF6F.
Joined: 6/4/2013
Posts: 8
Oh yeah, it works now ty. Pretty interessting stuff! ;)
Joined: 4/1/2010
Posts: 90
Since there are separate RNG-values for bosses compared to regular enemies, is it safe to assume, that after a soft-reset, the boss should always behave the same? Further, which values affect the boss' RNG? Does money/levels/stats/name of the characters matter?
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
Yes, when you load a game, the boss RNG is initialized to one of 55 known states, depending on the file's checksum. So, everything which can be saved in a file matters.
Joined: 4/1/2010
Posts: 90
Thank you for that information :) BJW managed to do something very interesting: http://www.twitch.tv/bjw/c/5256665 Any idea what is happening here? oô
Tompa
Any
Editor, Expert player (2141)
Joined: 8/15/2005
Posts: 1934
Location: Mullsjö, Sweden
Haha, that was awesome. You should have saved and checked where you would have ended up after the save. Neat glitch!
PJ
He/Him
Joined: 2/1/2011
Posts: 181
Location: Western NY
Hahahaha what? Incredible!
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
In that case, he would simply have continued from where he left off. I have no idea what caused this. Perhaps something he did in the menu or during a previous dialogue?
Joined: 4/1/2010
Posts: 90
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
To address some of the points in that thread: About the status bar color issue, both the text window and the status bars use the same palette index, but the game switches the palette as necessary. The status bar may flash blue if some processing took too long, so that the game was unable to load the orange palette in time. This is also why the window becomes orange if it is left on screen when the game thinks it is not, as the game then stops switching the palette. I don't think enemy level numbers are ever displayed on the screen, are they? Hit Up indeed does not work right unless you are tangled (and neither does Hit Down). When tangled, it works fine, and it gives you a boost or reduction of 1/4 after the initial reduction by 1/16 because of the tangle. The critical rate is halved by gloves, swords, axes and spears. The function that multiplies your weapon experience with 99 and divides by the maximum weapon experience is used to determine what to display in the menu. The boss random seed is determined by the file checksum, not the save counter (although the save counter is included in the checksum). Character behaviour (except for bosses) is given here: http://www.mediafire.com/view/s971u01cs1gh5eq/somacn.txt And the game script is here: http://www.mediafire.com/view/l328ub6gu17t8i6/somscpt.txt This has some information about rooms: http://www.mediafire.com/view/6ga1vidqcoc8coz/somroom.txt The "Scripts" lines list the arrival script followed by scripts invoked by stepping on triggers. The "Ent" lines list paths to a room by path number, starting location, exit type, and the direction walked when entering. For BG1 and BG2 we have a list of room parts to load (part index, x, y). Then, a list of characters follows. This gives the x, y, floor number, direction, type, script, trigger type and whether the character can be pushed. Trigger types are: - None: The character can't be interacted with. - Near: Trigger when player is within 24 pixels. - Face: Trigger when player is within 8 pixels and facing the character. - BothFace: Trigger when player is within 8 pixels and both are facing each other. - Talk8: Can be talked to within 8 pixels. - Talk28: Can be talked to within 28 pixels. - FaceTalk: Can be talked to within 28 pixels when both are facing each other. Near, Face and BothFace are bugged in that if multiple players trigger these at the same time, the game jumps to C1:D017, but they forgot to set the accumulator to 8 bits. This code does the following when interpreted with wrong flag settings:
lda Characters.XSpeed,x
beq loc_C1D042
eor $06
bpl loc_C1D042
lda $02
and #$980
ora ($1d,x)
and #$9de0
and #$24e0
cop #$10
…
loc_C1D042:
lda Characters.YSpeed,x
beq loc_C1D06D
eor $07
bpl loc_C1D06D
lda $02
and #$980
cop #$1d
…
loc_C1D06D:
lda Characters.XSpeed,y
beq loc_C1D07E
eor $06
bmi loc_C1D07E
lda #$1901
and #$99e0
and #$b9e0
ora [$e0] ; continue into C1D081

loc_C1D07E:
lda Characters.YSpeed,y

loc_C1D081:
beq locret_C1D08F
eor $07
bmi locret_C1D08F
lda #$1902
and #$99e0
and #$60e0 ; continue into C1D090

locret_C1D08F: rts

loc_C1D090:
lda Characters.XSpeed,x
beq loc_C1D0B7
eor $06
bpl loc_C1D0B7
eor $06
and #$980
ora ($99,x)
dec a
cpx #$3a9d
cpx #$84a9
ora Characters.PushDirection,x
sta Characters.PushDirection,x
lda #$1904
and #$99e0
and #$80e0
ora (EnableBG2),y
asl $e0 ; continue into C1D0BA

loc_C1D0B7:
lda Character.XSpeed,y

loc_C1D0BA:
beq loc_C1D0C8
eor $06
bmi loc_C1D0C8
lda #$1901
and #$99e0
and #$bde0
ora [$e0] ; continue into C1D0CB

loc_C1D0C8:
lda Characters.YSpeed,x

loc_C1D0CB:
beq loc_C1D0EF
eor $07
bpl loc_C1D0EF
eor $07
and #$980
ora ($99,x)
tsc
cpx #$389d
cpx #$88a9
ora Characters.PushDirection,x
sta Characters.PushDirection,x
lda #$1908
and #$99e0
and #$80e0
ora (EnableBG2),y
ora [$e0] ; continue into C1D0F2

loc_C1D0EF:
lda Characters.YSpeed,y

loc_C1D0F2:
beq loc_C1D100
eor $07
bmi loc_C1D100
lda #$1902
ora Characters.PushDirection,y
sta Characters.PushDirection,y
loc_C1D100:
rep #$20
txa
sta Characters.Pusher,y
rts
If we could just reach the TSC, we might be able to jump to a controlled address. For this to happen, the player must be standing still. The NPC must be moving east if the player is north of the NPC, otherwise west. The word at the long address at $e0 must be between $0001 and $7fff. Finally, an interrupt must happen after C1D081 but before C1D0C9, which changes this word so that it becomes negative. So it's questionable whether one will be able to pull this off at all. If we get to one of the COP instructions, we end up executing a SBC nnnnnn, x instruction and continuing from $7e0003. At this point, we have: $03: seems to always be ff - sbc $nn00aa, x $04: 0a - asl $05: 00 - brk $06: 00 - brk (player on right) or 80 - bra (player on left) $07: 00 - brk (player below) or 80 - bra (player above) $08: horizontal distance $09: vertical distance $0A: horizontal center distance $0B: vertical center distance $0C: varies $0D: varies $0E-$0F: script number and activation mode I still don't know why the money window glitch happened. Somehow, it entered the dialogue option selection state. This can only happen when executing command 5A or 5B, or when closing a window, as far as I can tell. One can then easily jump to any byte within 512 bytes of the last option command, which was the save prompt in script 0050. For some reason, it then sometimes continues presenting a choice, allowing for further jumps. That is how he managed to jump to the Neko dialogue.
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
HHS wrote:
The NPC must be moving east if the player is north of the NPC, otherwise west.
Correction: The NPC must be moving south or east if the player is north of the NPC, otherwise north.
Joined: 4/1/2010
Posts: 90
Wow...That's a lot of information, thanks a lot o.o Does the chest spawning not having a location set at that point the first frame it's spawned have any significance? Since you can interact with anything loaded if the location-information is not yet loaded
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
Whoever told you that the location information is not loaded was wrong. Rather, the distance to each player has not yet been calculated. Anyway, the chest itself is fine, it's the dialogue that's messing up for some reason. The game enters dialogue selection mode if 7e1d00 bit 7 is set after writing text, or if command 5A is encountered outside of text. This bit is cleared when continuing with non-dialogue commands, which is normally the case after making a choice. This is also cleared when entering a new room. The bit is set after closing a window, and when encountering command 5B. I can see nothing in the code that would make any of this happen after opening the money window.
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
If you can produce a SMV that shows the palette being messed up when opening the money window, I might be able to determine why it does so. But it might just be the HDMA being started after the frame has started, which would make the SNES read color data from the wrong location but would not be able to corrupt main RAM.
Joined: 4/1/2010
Posts: 90
The information about location not being loaded is actually something I assumed myself. It has no other source than that being the only explanation I could come up with and it seemed to be true for all instances where I came across that But it makes a lot more sense if the distance between that character is simply not yet calculated. Unfortunately, the only occrance of the glitch is what BJW encountered on his casual VC playthrough. I tried for quite some time, but couldn't reproduce anything so far. A different question, in your gigantic data table of values, there is the follwing: 7ecc00 Player names And later there is 7ecc24 Hats Does that mean that the entire region between those is taken up by the player names? Edit: Also, what was the reason that the Slow Down evasion lowering doesn't work? Is it possible, that it works on the last frame of the Slow Down effect?..
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
I am now able to beat the game shortly after getting Undine. However, I believe I've found a way to do it right after leaving Potos, which I am going to try to test now.
Joined: 4/1/2010
Posts: 90
What? o_o
PJ
He/Him
Joined: 2/1/2011
Posts: 181
Location: Western NY
Yagamoth wrote:
What? o_o
^
Joined: 4/1/2010
Posts: 90
I should sleep.. But want to know now o-o That sounds amazing HHS :D
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
Okay, what I had in mind yesterday didn't quite work out, but this is still going to be fairly short. Probably sub 15.
PJ
He/Him
Joined: 2/1/2011
Posts: 181
Location: Western NY
Video plz.
Joined: 4/1/2010
Posts: 90
I'm so curious what the thing is going to be ^^
Joined: 5/23/2010
Posts: 16
Dude, so much teasing. ;(