Users browsing this thread: 1 Guest(s)
Invoke Game Saving Screen Event Command

#1
Posts: 19
Threads: 9
Thanks Received: 4
Thanks Given: 15
Joined: May 2019
Reputation: 2
Status
None
Hi again everyone! Still chipping away at a few things here and ran into another speedbump.

I saw Event Command AB is "Invoke Game Loading Screen" (used at startup), and it got me wondering... what about a new command to save? If we did this, we could have NPCs save our game from a Yes/No dialogue box instead of standing on a shiny and opening the menu. I know how I'd be able to program the actual event, but I would need to program a new Event Command using one of the unused actions. That brought me to the C0 disassembly (my nemesis!). I was hoping I could take the code for command AB, copy it to free space, adjust it to "save" instead of "load", and point the new event command there. Simple, right? The problem here is that I don't know what this dang AB command does! My C0 disassembly (mostly) isn't commented. Can anyone help? Am I on the right track?

Code:
Invoke game loading screen
(gen. act. AB)

C0/B91B:    A902        LDA #$02        
C0/B91D:    8D0002      STA $0200
C0/B920:    20CAC6      JSR $C6CA
C0/B923:    AFF17F30    LDA $307FF1
C0/B927:    18          CLC
C0/B928:    690D        ADC #$0D
C0/B92A:    8FF17F30    STA $307FF1
C0/B92E:    8D6D1F      STA $1F6D
C0/B931:    8DA11F      STA $1FA1
C0/B934:    8DA21F      STA $1FA2
C0/B937:    8DA41F      STA $1FA4
C0/B93A:    8DA31F      STA $1FA3
C0/B93D:    8DA51F      STA $1FA5
C0/B940:    AD0502      LDA $0205
C0/B943:    2980        AND #$80
C0/B945:    851A        STA $1A
C0/B947:    ADDF1E      LDA $1EDF
C0/B94A:    297F        AND #$7F
C0/B94C:    051A        ORA $1A
C0/B94E:    8DDF1E      STA $1EDF
C0/B951:    6458        STZ $58
C0/B953:    20F36C      JSR $6CF3
C0/B956:    208603      JSR $0386
C0/B959:    A901        LDA #$01
C0/B95B:    4C5C9B      JMP $9B5C

Any help would be greatly appreciated!  Smile
  Find
Quote  

#2
Posts: 242
Threads: 19
Thanks Received: 101
Thanks Given: 105
Joined: Dec 2018
Reputation: 18
Status
Moog
Don't know how much I can help you here, but your C0 does seem to be out of date.

Code:
Invoke game loading screen
(gen. act. AB)

C0/B91B:    A902        LDA #$02        
C0/B91D:    8D0002      STA $0200
C0/B920:    20CAC6      JSR $C6CA      (jump to C3/0000->C3/001B)
C0/B923:    AFF17F30    LDA $307FF1
C0/B927:    18          CLC
C0/B928:    690D        ADC #$0D
C0/B92A:    8FF17F30    STA $307FF1
C0/B92E:    8D6D1F      STA $1F6D      (RNG index)
C0/B931:    8DA11F      STA $1FA1      (index when overworld encounter will occur)
C0/B934:    8DA21F      STA $1FA2      (index when town/dungeon encounter will occur)
C0/B937:    8DA41F      STA $1FA4      (overworld addition for encounter rate)
C0/B93A:    8DA31F      STA $1FA3      (town/dungeon addition for encounter rate)
C0/B93D:    8DA51F      STA $1FA5      (Veldt pack #, obviously $1FA1-$1FA5 will be the same at load up)
C0/B940:    AD0502      LDA $0205
C0/B943:    2980        AND #$80
C0/B945:    851A        STA $1A
C0/B947:    ADDF1E      LDA $1EDF
C0/B94A:    297F        AND #$7F
C0/B94C:    051A        ORA $1A
C0/B94E:    8DDF1E      STA $1EDF
C0/B951:    6458        STZ $58
C0/B953:    20F36C      JSR $6CF3      (calls equipment check function)
C0/B956:    208603      JSR $0386
C0/B959:    A901        LDA #$01
C0/B95B:    4C5C9B      JMP $9B5C
This is what I found in the same spot of mine. Hope it helps.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite