Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-04-21 21:23:14

Torchickens
Member
Registered: 2011-01-02
Post 42/47

"Switch on!" PC function - Unused?

In Red, Green, Blue, Yellow (I haven't tested Japanese Yellow however); if you modify the start of text code to begin with an FD (rather than a 00: print text or 08: execute code, etc.); then interacting with it will load a predefined text box that says "switch on!" (Japanese: スイッチ オン!) and brings you directly to the Pokémon Storage System (you do not have to select Bill's PC or your PC). This function is next to FC; a function that brings up just the item storage system and is used in the player's house.

Is FD and the text "Switch on!" ever used?

Here are some screenshots of it.

iYaHWhWNHa8Hd.pngiML3BQCV9nG1R.png

Last edited by Torchickens (2015-04-21 21:45:20)

Offline

#2 2015-04-22 17:18:34

Danny-E 33
Administrator
Registered: 2012-06-09
Post 869/1,119

Re: "Switch on!" PC function - Unused?

It looks like the text command $FD is referenced in scripts/billshouse.asm

BillsHouseTextPointers: ; 1e834 (7:6834)
    dw BillsHouseText1
    dw BillsHouseText2
    dw BillsHouseText3
    dw BillsHouseText4

BillsHouseText4: ; 1e83c (7:683c)
    db $fd

and in some cable club code (command $FD is used in text predef $23)

JustAMomentText:: ; 21865 (8:5865)
    TX_FAR _JustAMomentText
    db "@"

    ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
    cp SPRITE_FACING_UP
    ret nz
    call EnableAutoTextBoxDrawing
    ld a, $23
    jp PrintPredefTextID

PredefText23:: ; 21878 (8:5878)
    db $FD ; FuncTX_BillsPC

And it looks like the switch on text is only used by command $FD if bit 3 of $cd60 is unset

BillsPC_:: ; 0x214c2
    ld hl, wd730
    set 6, [hl]
    xor a
    ld [wccd3], a
    inc a               ; MONSTER_NAME
    ld [wNameListType], a
    call LoadHpBarAndStatusTilePatterns
    ld a, [wListScrollOffset]
    push af
    ld a, [wFlags_0xcd60]
    bit 3, a
    jr nz, BillsPCMenu
    ld a, $99
    call PlaySound
    ld hl, SwitchOnText
    call PrintText

Lastly, it looks like bit 3 is set when Bill's PC is being accessed through the PC

ActivatePC: ; 17e2c (5:7e2c)
    call SaveScreenTilesToBuffer2  ;XXX: copy background from wTileMap to wTileMapBackup2
    ld a, (SFX_02_45 - SFX_Headers_02) / 3
    call PlaySound  ;XXX: play sound or stop music
    ld hl, TurnedOnPC1Text
    call PrintText
    call WaitForSoundToFinish  ;XXX: wait for sound to be done
    ld hl, wFlags_0xcd60
    set 3, [hl]

Offline

#3 2015-04-24 13:04:15

Torchickens
Member
Registered: 2011-01-02
Post 43/47

Re: "Switch on!" PC function - Unused?

Thanks for your research Danny. Indeed, when I set bit 3 of $CD60 my custom text box went straight to the storage system without "switch on!" (though the blank text box at the bottom popped up).

Last edited by Torchickens (2015-04-24 13:10:26)

Offline

Board footer

Powered by FluxBB