Users browsing this thread: 1 Guest(s)
I need help with a 'mystery' code located in my project's F0 bank

#3
Posts: 175
Threads: 23
Thanks Received: 22
Thanks Given: 7
Joined: Feb 2016
Reputation: 8
Status
Enlight
This is a new subroutine for the character class names. Angelo moved it in later versions to F2/3400.


I pulled the following from my own update's readme:

Code:
Original:
 C3/6282: F0 5D       BEQ $62E1    ; Branch if no status effect
 C3/6284: 64 F1       STZ $F1
Modified:
 C3/6282: 4C91F0      JMP $F091    ; Break out of status effect check
 C3/6285: EA          NOP          ; Operation moved from C3/6284 to C3/F093


New Subroutine C3/F091
 C3/F091: F0 05       BEQ $F098    ; Branch if no status effect, from C3/6282
 C3/F093: 64 F1       STZ $F1      ; Operation from C3/6284
 C3/F095: 4C 86 62    JMP $6286    ; Return to status effect check
 C3/F098: A9 FF       LDA #$FF     ; Print space before job name (for alignment)
 C3/F09A: 8D 80 21    STA $2180    ; (Writes space to WRAM)
 C3/F09D  4C A3 F0    JMP $F0A3    ; Jump to code for printing the job name
 C3/F0A0: EA          NOP
 C3/F0A1: EA          NOP
 C3/F0A2: EA          NOP


New Subroutines & Data (Angelo)

 C3/F0A3: B9 00 00     LDA $0000,Y
 C3/F0A6: 22 00 34 F2  JSL $F23400  ; New subroutine in F2 bank for class names
 C3/F0AA: 4C 05 35     JMP $3505

And a the subroutine itself from my notes...
Code:
New Subroutine F2/3400:
F2/3400: C2 20       REP #$20
F2/3402: B9 00 00    LDA $0000,y
F2/3405: 29 FF 00    AND #$00FF
F2/3408: 0A          ASL A
F2/3409: AA          TAX
F2/340A: BF 00 63 F2 LDA $F26300,x  <-- class names
F2/340E: AA          TAX
F2/340F: A0 10 00    LDY #$0010
F2/3412: A9 00 00    LDA #$0000
F2/3415: E2 20       SEP #$20
F2/3417: BF 00 00 F2 LDA $F20000,x
F2/341B: F0 09       BEQ $3426
F2/341D: 8D 80 21    STA $2180
F2/3420: E8          INX
F2/3421: 88          DEY
F2/3422: F0 0E       BEQ $3432
F2/3424: 80 F1       BRA $3417
F2/3426: C8          INY
F2/3427: 88          DEY
F2/3428: F0 08       BEQ $3432
F2/342A: A9 FF       LDA #$FF
F2/342C: 8D 80 21    STA $2180
F2/342F: 88          DEY
F2/3430: D0 FA       BNE $342C
F2/3432: 9C 80 21    STZ $2180
F2/3435: 6B          RTL

Hope that helps!
Quote  
[-] The following 2 users say Thank You to SilentEnigma for this post:
  • Marketa Lazarova (08-08-2021), NPCnextdoor (08-08-2021)



Messages In This Thread
RE: I need help with a 'mystery' code located in my project's F0 bank - by SilentEnigma - 08-08-2021, 11:07 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite