View Single Post
  #1    
Old December 5th, 2010, 02:26 AM
knizz's Avatar
knizz
 
Join Date: Aug 2007
About:
This IDA-Script decompiles PokeScript ... in IDA. (obviously)

Instructions:
Once per database: "File"->"IDC File..."->"fix.idc"
For every script: 1. Select Script 2. "File"->"IDC File..."->"pokedec.idc"

Result:
Code:
081A8DFD     scr_081A8DFD:   .byte lockall           @ DATA XREF: per_step_scripts+60
081A8DFD                                             @ per_step_scripts:off_0806D700
081A8DFE                     .byte change_text_color
081A8DFF                     .byte 3
081A8E00                     .byte special_call
081A8E01                     .short 0xC7
081A8E03                     .byte set_to_waitstate
081A8E04                     .byte cmp_var_val
081A8E05                     .short 0x800D
081A8E07                     .short 1
081A8E09                     .byte if_jump
081A8E0A                     .byte 1
081A8E0B                     .long scr_081A8E11
081A8E0F                     .byte release
081A8E10                     .byte end
081A8E11     scr_081A8E11:   .byte check_money       @ DATA XREF: ROM:081A8E0B
081A8E12                     .long 1
081A8E16                     .byte 0
081A8E17                     .byte cmp_var_val
081A8E18                     .short 0x800D
081A8E1A                     .short 0
081A8E1C                     .byte if_jump
081A8E1D                     .byte 1
081A8E1E                     .long scr_081A8E2E
081A8E22                     .byte cmp_var_val
081A8E23                     .short 0x800D
081A8E25                     .short 1
081A8E27                     .byte if_jump
081A8E28                     .byte 1
081A8E29                     .long scr_081A8E3C
081A8E2D                     .byte end
081A8E2E     scr_081A8E2E:   .byte load_message      @ DATA XREF: ROM:081A8E1E
081A8E2F                     .byte 0
081A8E30                     .long unk_081A61E5
081A8E34                     .byte callstd
081A8E35                     .byte 4
081A8E36                     .byte goto
081A8E37                     .long scr_081A8E4D
081A8E3B                     .byte    2
081A8E3C     scr_081A8E3C:   .byte special_call      @ DATA XREF: ROM:081A8E29
081A8E3D                     .short 0x175
081A8E3F                     .byte load_message
081A8E40                     .byte 0
081A8E41                     .long unk_081A6197
081A8E45                     .byte callstd
081A8E46                     .byte 4
081A8E47                     .byte goto
081A8E48                     .long scr_081A8E4D
081A8E4C                     .byte    2
081A8E4D     scr_081A8E4D:   .byte special_call      @ DATA XREF: ROM:081A8E37
081A8E4D                                             @ ROM:081A8E48
081A8E4E                     .short 0x14C
081A8E50                     .byte set_to_waitstate
081A8E51                     .byte screen_special_effect
081A8E52                     .byte 1
081A8E53                     .byte special_call
081A8E54                     .short 0xC8
081A8E56                     .byte set_to_waitstate
081A8E57                     .byte end
This is the whiteout-script btw.
Attached Files
File Type: zip ida-poke-script..zip‎ (9.7 KB, 39 views) (Save to Dropbox)
__________________
Firered IDA 6.1 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support (no longer in development)
Reply With Quote