21. @stillinbeta ; #bangbangconwest
● Use MissingNo Glitch
● Get Code Execution
● Live-Patch Assembly Code
● Listen on Link Port
How does it work!?
22. @stillinbeta ; #bangbangconwest
● Use MissingNo Glitch
● Get Code Execution
● Live-Patch Assembly Code
● Listen on Link Port
● Modify Memory
How does it work!?
23. @stillinbeta ; #bangbangconwest
● Use MissingNo Glitch
● Get Code Execution
● Live-Patch Assembly Code
● Listen on Link Port
● Modify Memory!
How does it work!?
● getMemoryValue(address)
● setMemoryValue(address, value)
34. @stillinbeta ; #bangbangconwest
0x00 Index # of the Species 1 byte
0x01 Current HP 2 bytes
0x03 Level 1 byte
0x04 Status condition 1 byte
0x05 Type 1 1 byte
0x06 Type 2 1 byte
0x07 Catch rate/Held item 1 byte
0x08 Index number of move 1 1 byte
0x09 Index number of move 2 1 byte
0x0A Index number of move 3 1 byte
0x0B Index number of move 4 1 byte
0x0C Original Trainer ID number 2 bytes
0x0E Experience points 3 bytes
0x11 HP EV data 2 bytes
0x13 Attack EV data 2 bytes
0x15 Defense EV data 2 bytes
0x17 Speed EV data 2 bytes
0x19 Special EV data 2 bytes
0x1B IV data 2 bytes
0x1D Move 1's PP values 1 byte
0x1E Move 2's PP values 1 byte
0x1F Move 3's PP values 1 byte
0x20 Move 4's PP values 1 byte
0x21 Level 1 byte
0x22 Maximum HP 2 bytes
0x24 Attack 2 bytes
0x26 Defense 2 bytes
0x28 Speed 2 bytes
0x2A Special 2 bytes
35. @stillinbeta ; #bangbangconwest
0x00 Index # of the Species 1 byte
0x01 Current HP 2 bytes
0x03 Level 1 byte
0x04 Status condition 1 byte
0x05 Type 1 1 byte
0x06 Type 2 1 byte
0x07 Catch rate/Held item 1 byte
0x08 Index number of move 1 1 byte
0x09 Index number of move 2 1 byte
0x0A Index number of move 3 1 byte
0x0B Index number of move 4 1 byte
0x0C Original Trainer ID number 2 bytes
0x0E Experience points 3 bytes
0x11 HP EV data 2 bytes
0x13 Attack EV data 2 bytes
0x15 Defense EV data 2 bytes
0x17 Speed EV data 2 bytes
0x19 Special EV data 2 bytes
0x1B IV data 2 bytes
0x1D Move 1's PP values 1 byte
0x1E Move 2's PP values 1 byte
0x1F Move 3's PP values 1 byte
0x20 Move 4's PP values 1 byte
0x21 Level 1 byte
0x22 Maximum HP 2 bytes
0x24 Attack 2 bytes
0x26 Defense 2 bytes
0x28 Speed 2 bytes
0x2A Special 2 bytes
36. @stillinbeta ; #bangbangconwest
message GetPokemonRequest {} message Pokemon {
uint32 id = 1;
uint32 hp = 2;
uint32 level = 3;
uint32 max_hp = 4;
uint32 attack = 5;
uint32 defense = 6;
uint32 speed = 7;
uint32 special = 8;
uint32 position = 99;
}
message Party {
repeated Pokemon party = 1;
}
37. @stillinbeta ; #bangbangconwest
D163 - # Pokémon In Party
D164 - Pokémon ID 1
D165 - Pokémon ID 2
D166 - Pokémon ID 3
D167 - Pokémon ID 4
D168 - Pokémon ID 5
D169 - Pokémon ID 6
D16A - End of list
D16B - Pokémon 1
D197 - Pokémon 2
D1C3 - Pokémon 3
D1EF - Pokémon 4
D21B - Pokémon 5
D247 - Pokémon
49. @stillinbeta ; #bangbangconwest
/// This tells Postgres this library is a Postgres extension
pg_magic!(version: pg_sys::PG_VERSION_NUM);
/// The pg_extern attribute wraps the function in the proper
functions syntax for C extensions
#[pg_extern]
fn add_one(value: i32) -> i32 {
(value + 1)
}
55. @stillinbeta ; #bangbangconwest
.addNewItem ; add an item not yet in the inventory
pop hl
ld a, d
and a ; is there room for a new item slot?
jr z, .done
; if there is room
inc [hl] ; increment the number of items in the inventory
ld a, [hl] ; the number of items will be the index of the new item
add a
dec a
ld c, a
ld b, 0
add hl, bc ; hl = address to store the item
ld a, [wcf91]
ld [hli], a ; store item ID
ld a, [wItemQuantity]
ld [hli], a ; store item quantity
ld [hl], $ff ; store terminator
jp .success
56. @stillinbeta ; #bangbangconwest
.addNewItem ; add an item not yet in the inventory
pop hl ; pop stack into accumulator
ld a, d ; move a from d
and a ; is there room for a new item slot?
jr z, .done
; if there is room
inc [hl] ; increment the number of items in the inventory
ld a, [hl] ; the number of items will be the index of the new item
add a ; double accumulator
dec a ; subtract one
ld c, a ; move accumulator to 0
ld b, 0 ; put 0
add hl, bc ; # of items * 2 - 1 + location of index
ld a, [wcf91] ; move item ID to a
ld [hli], a ; store item ID
ld a, [wItemQuantity] ; move item quantity to a
ld [hli], a ; store item quantity
ld [hl], $ff ; store terminator in next slot
jp .success
57. @stillinbeta ; #bangbangconwest
.addNewItem ; add an item not yet in the inventory
pop hl ; pop stack into accumulator
ld a, d ; move a from d
and a ; is there room for a new item slot?
jr z, .done
; if there is room
inc [hl] ; increment the number of items in the inventory
ld a, [hl] ; the number of items will be the index of the new item
add a ; double accumulator
dec a ; subtract one
ld c, a ; move accumulator to 0
ld b, 0 ; put 0
add hl, bc ; # of items * 2 - 1 + location of index
ld a, [wcf91] ; move item ID to a
ld [hli], a ; store item ID
ld a, [wItemQuantity] ; move item quantity to a
ld [hli], a ; store item quantity
ld [hl], $ff ; store terminator in next slot
jp .success