’Cause all games were better on the GBC

You are not logged in.

#1 2014-05-20 15:31:57

Registered: 2014-03-27
Post 9/11

Help with events in Pokemon Red Disassembly

Greetings again Skeetendo goers.
I'm working on a side project as a way to learn asm and hex editing, it's going to be a series of hacks I've dubbed the Solo Edition hacks. Any way I tried to insert a new person event into the Pokemon Red source in Route 22 and I've run into a snag. The dialog seems to work as well as the give pokemon asm but the person sprite in game glitches like crazy for some reason.
So my questions I guess would by what would causes this/how can I fix it?
Also if anyone knows of any unused flags in Pokemon Red that would be helpful as well :)

The following is the code I wrote/modified to insert the new person event.

    text "Greetings ", $52, ","
    line "My name is"
    cont "BlueMew!"
    para "I'm going to give"
    line "you an event"
    cont "#MON"

    text "Enjoy your new"
    line "Mew!"

    text "Sorry I have"
    line "nothing more for"
    cont "you ", $52, "."


Route22TextPointers: ; 51175 (14:5175)
    dw Route22Text1
    dw Route22Text2
    dw Route22Text3
    dw Route22Text4


; BlueMew
    db $08 ; asm
    ld a, [$d702]
    bit 0, a ; got mew?
    jr z, .givemew
    ld hl, .text3
    call PrintText
    jr .done
    ld hl, .text1
    call PrintText
    ld bc, (MEW << 8) | 10
    call GivePokemon
    jr nc, .done
    ld a, [$ccd3]
    and a
    call z, WaitForTextScrollButtonPress
    call EnableAutoTextBoxDrawing
    ld hl, .text2
    call PrintText
    ld hl, $d702
    set 0, [hl]
    jr .done
    jp TextScriptEnd
    TX_FAR _Route22BlueMewText1
    db "@"
    TX_FAR _Route22BlueMewText2
    db "@"
    TX_FAR _Route22BlueMewText3
    db "@"


Route22Object: ; 0x50022 (size=27)
    db $2c ; border tile

    db $1 ; warps
    db $5, $8, $0, ROUTE_22_GATE

    db $1 ; signs
    db $b, $7, $3 ; Route22Text3

    db $3 ; people
    db SPRITE_BLUE, $5 + 4, $19 + 4, $ff, $ff, $1 ; person
    db SPRITE_BLUE, $5 + 4, $19 + 4, $ff, $ff, $2 ; person
    db SPRITE_GENTLEMAN, $6 + 4, $c + 4, $ff, $d0, $4 ; BlueMew
    ; warp-to

Any help is greatly appreciated.

Last edited by BlueMew (2014-05-20 15:36:56)


#2 2014-05-20 16:40:46

Danny-E 33
Registered: 2012-06-09
Post 789/1,095

Re: Help with events in Pokemon Red Disassembly

From here, you can see that route 22 uses sprite set 1.
Sprite set 1 doesn't use SPRITE_GENTLEMAN, so when you try to use that sprite on that map, it loads garbage tiles.

Also, there is a ton of unused ram starting at $dee2.

Red Hack: Pokémon Prototype

Total number of registered users: 8000+
Total number of active users: ~12


#3 2014-05-20 17:43:20

Registered: 2014-03-27
Post 11/11

Re: Help with events in Pokemon Red Disassembly

Can't believe I missed that! Thank you for the help and the information Danny-E33.


Board footer

Powered by FluxBB