Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2020-10-18 22:12:16

95girl
Member
Registered: 2012-03-25
Post 90/90

Help me restore Sabrina gym's bug please?

https://youtu.be/EF3RlidjDJk

I'd like to restore this bug using pokered's github and the script for Saffron gym please

Offline

#2 2020-10-20 21:45:40

PkMn
New member
Registered: 2020-08-15
Post 6/7

Re: Help me restore Sabrina gym's bug please?

I wish to know where I screwed up this.

I never touched the Saffron Gym script but Sabrina is saying the winning text after losing against her, maybe something related to rival text that I restored?

Anyway about your question, I'm already looking at since I've succesfully restored other japanese glitches over international like select and subselect glitches. I will post a result in the next few days since I already have the code but it needs to be fixed and adapted first so don't use it.

This code is on bank_017.asm when decompiling midori/aka with mgbdis.

SaffronGymScript:
    ld hl, wCurrentMapScriptFlags
    bit 6, [hl]
    res 6, [hl]
    call nz, .extra
    call EnableAutoTextBoxDrawing
    ld hl, SaffronGymTrainerHeader0
    ld de, SaffronGymScriptPointers
    ld a, [wSaffronGymCurScript]
    call ExecuteCurMapScriptInTable
    ld [wSaffronGymCurScript], a
    ret
    
Gym6CityName:
    db "SAFFRON CITY@"

Gym6LeaderName:
    db "SABRINA@"

.extra:
    ld hl, Gym6CityName
    ld de, Gym6LeaderName
    jp LoadGymLeaderAndCityName

SaffronGymText_5d048:
    xor a
    ld [wJoyIgnore], a
    ld [wSaffronGymCurScript], a
    ld [wCurMapScript], a
    ret

SaffronGymScript3:
;    ld a, [wIsInBattle] Not present in jap code?
    jp z, SaffronGymText_5d048
    ld a, $f0
    ld [wJoyIgnore], a

SaffronGymText_5d068:
    ld a, $04
    ldh [$8c], a
    call DisplayTextID
    ld hl, $d6d4
    set 7, [hl]
    ld bc, $ea01

Call_017_46df: ; ?
    call GiveItem
    jr nc, .BagFull

    ld a, $05
    ldh [$8c], a
    call DisplayTextID
    ld hl, $d6d4
    set 6, [hl]
    jr .asm_5d091

.BagFull
    ld a, $06
    ldh [$8c], a
    call DisplayTextID

.asm_5d091
    ld hl, wObtainedBadges
    set 0, [hl]
    ld hl, wBeatGymFlags
    set 0, [hl]
    ld a, $04
    ld [$cc4d], a
    ld a, $11
    call $3e9d
    ld a, $22
    ld [$cc4d], a
    ld a, $11
    call $3e9d
    ld hl, $d76a
    res 0, [hl]
    res 7, [hl]
    ld hl, $d6d4
    set 2, [hl]
    jp SaffronGymText_5d048

SaffronGymText1:
    ld a, a
    jr z, .asm_5d134

    bit 6, a
    jr nz, .asm_5d12c

    call z, SaffronGymText_5d068
    call DisableWaitingAfterTextDisplay
    jr .asm_5d15f

.asm_5d12c
    ld hl, SaffronGymText_5d16e
    call PrintText
    jr .asm_5d15f

.asm_5d134:
    ld hl, SaffronGymText_5d162
    call $3c79 ; not PrintText? 
    ld hl, wd72d
    set 6, [hl]
    set 7, [hl]
    ld hl, SaffronGymText_5d167
    ld de, SaffronGymText_5d167
    call SaveEndBattleTextPointers
    ldh a, [$8c]
    ld [wSpriteIndex], a
    call EngageMapTrainer
    call InitBattleEnemyParameters
    ld a, $01
    ld [wGymLeaderNo], a
    xor a ; what's this? :S
    ldh [$b4], a
    ld a, $03
    ld [$d57b], a
    ld [$d97c], a

.asm_5d15f:
    jp TextScriptEnd

Last edited by PkMn (2020-10-20 23:11:40)

Offline

Board footer

Powered by FluxBB