Darthatron
巨大なトロール。
- 1,152
- Posts
- 18
- Years
- Age 32
- Melbourne, Australia
- Seen Feb 3, 2015
Did you want me to port my Emerald version to FireRed, or are you set?
IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:
Did you want me to port my Emerald version to FireRed, or are you set?
0803ED54: 80 7A
0803F226: 00 29
0803F228: 00 D0
0803F38C: 02 2F
0803F38E: 00 DB
0803F394: 01 28
0803F396: 00 D0
0803BA94: 80 7A
0803BFBE: 00 29
0803BFC0: 00 D0
0803C124: 02 2E
0803C126: 00 DB
0803C12C: 01 28
0803C12E: 00 D0
080695E8: 80 7A
08069A5A: 00 29
08069A5C: 00 D0
08069BC4: 02 2F
08069BC6: 00 DB
08069BCC: 01 28
08069BCE: 00 D0
FireRed (US)
EDIT: Literally no testing was done for the FireRed port. So someone should test it and let me know if it breaks everything. But I really don't see that happening...Code:0803ED54: 80 7A 0803F226: 00 29 0803F228: 00 D0 0803F38C: 02 2F 0803F38E: 00 DB 0803F394: 01 28 0803F396: 00 D0
It loads both stats, doesn't it? Physical to r7 and Special to r8..?The code doesn't work. I set a break on read of the battle data, and the game only ever reads the physical stats - regardless of whether the attack in question is physical or special. In theory, this wouldn't be too hard to fix, but I can't see a way of doing it without a hijack at the moment.
The offending code in BPRE is at 0x3ED6E. It always loads from 0x02023BE6 - the physical attack stat of the Pokémon in question. (Obviously, it can load from other slots as well - point is - it always loads the physical attack stat.)
It is immediately followed by another few load commands which then get the physical defense of the opposing Pokémon.
Obviously - we could hijack this routine in a rather unattractive manner, and force it to recalculate the physical/special byte (as it CAN potentially be overwritten by this point) and then get the correct respective bytes from there.
I'm a bit tired right now, so I hope this makes sense. And I hope it helps explain some of the problems we've been having. Obviously, I haven't checked - but this could be the same on other ROMs like RSE as well - so I'd check carefully if I were you!
Jambo51 out!
0803ED6E loc_0803ED6E: @ CODE XREF: sub_0803ECEC+6Cj
[S-HIGHLIGHT]0803ED6E LDRH R7, [R6,#2] //Attacker's Attack stat
[/S-HIGHLIGHT]0803ED70 LDR R2, [SP,#0x4C+var_48]
0803ED72 LDRH R2, [R2,#4]
0803ED74 STR R2, [SP,#0x4C+var_38]
[S-HIGHLIGHT]0803ED76 LDRH R3, [R6,#8] //Attacker's Special-Attack stat
0803ED78 MOV R8, R3
[/S-HIGHLIGHT]0803ED7A LDR R0, [SP,#0x4C+var_48]
0803ED7C LDRH R0, [R0,#0xA]
0803ED7E STR R0, [SP,#0x4C+var_34]
0803F26E loc_0803F26E: @ CODE XREF: sub_0803ECEC+554j
0803F26E LSLS R0, R0, #1
0803F270 ADDS R1, R0, R2
0803F272 LDRB R1, [R1]
[S-HIGHLIGHT]0803F274 MOVS R5, R7
[/S-HIGHLIGHT]0803F276 MULS R5, R1
0803F278 ADDS R2, #1
0803F27A ADDS R0, R0, R2
0803F27C LDRB R1, [R0]
0803F27E MOVS R0, R5
0803F280 BL div_mod
0803F284 ADDS R5, R0, #0
0803F3CA loc_0803F3CA: @ CODE XREF: sub_0803ECEC+6C2j
0803F3CA LSLS R0, R0, #1
0803F3CC ADDS R1, R0, R2
0803F3CE LDRB R1, [R1]
[S-HIGHLIGHT]0803F3D0 MOV R5, R8
[/S-HIGHLIGHT]0803F3D2 MULS R5, R1
0803F3D4 ADDS R2, #1
0803F3D6 ADDS R0, R0, R2
0803F3D8 LDRB R1, [R0]
0803F3DA MOVS R0, R5
0803F3DC BL div_mod
0803F3E0 ADDS R5, R0, #0
0801F6C2: 86 [B]7A[/B]
0801F908: [B]00[/B] 2E
0801F90A: 41 [B]D1[/B]
.align 2
.thumb
Start:
push {r0-r4}
ldr r0, .CurMoveIndex
ldrb r1, [r0]
lsl r1, r1, #1
[B]ldr r0, .Move_List_Loc
ldr r0, [r0]
ldr r3, .number
add r0, r0, r3
[/B] add r0, r0, r1
ldrh r3, [r0]
[B]cmp r3, #0x0
beq Finish
[/B] lsl r0, r3, #1
add r0, r0, r3
lsl r0, r0, #2
ldr r1, .MoveBase
add r0, r0, r1
ldrb r4, [r0, #10]
lsl r0, r4, #1
add r4, r4, r0
lsl r4, r4, #6
ldr r0, .SplitImages
add r0, r4
ldr r1, .VRAM
mov r2, #0x30
swi #0xB
ldr r0, .SplitImages
add r0, r4
add r0, #0x60
ldr r1, .VRAM
mov r2, #0x1E
lsl r2, #0x04
add r1, r1, r2
mov r2, #0x30
swi #0xB
Finish:
pop {r0-r4}
ldr r4, .Some_Offset
ldr r0, [r4]
ldr r1, .Return_Addr
bx r1
.align 2
.MoveBase: .word 0x08250C04
[B].number: .word 0x00003258
[/B].CurMoveIndex: .word 0x0203B16D
[B].Move_List_Loc: .word 0x0203B140
[/B].VRAM: .word 0x06001800
.SplitImages: .word 0x08YYYYYY
.Some_Offset: .word 0x0203B148
.Return_Addr: .word 0x0813A17D
I want to find a better place to put it. Right now, the image showing if it's physical/special/status appears a frame before the rest of the screen is loaded. :\ I mean, it's not that bad. I just don't love it.
Change these bytes:
Code:@0813A130: 0x2F @0813A17B: 0x47 @0813A1A0: [Pointer to Routine, plus 1 (one).]
Here's the source:
Code:.align 2 .thumb Start: push {r0-r4} ldr r0, .CurMoveIndex ldrb r1, [r0] lsl r1, r1, #1 ldr r0, .Move_List add r0, r0, r1 ldrh r3, [r0] lsl r0, r3, #1 add r0, r0, r3 lsl r0, r0, #2 ldr r1, .MoveBase add r0, r0, r1 ldrb r4, [r0, #10] lsl r0, r4, #1 add r4, r4, r0 lsl r4, r4, #6 ldr r0, .SplitImages add r0, r4 ldr r1, .VRAM mov r2, #0x30 swi #0xB ldr r0, .SplitImages add r0, r4 add r0, #0x60 ldr r1, .VRAM mov r2, #0x1E lsl r2, #0x04 add r1, r1, r2 mov r2, #0x30 swi #0xB Finish: pop {r0-r4} ldr r4, .Some_Offset ldr r0, [r4] ldr r1, .Return_Addr bx r1 .align 2 .MoveBase: .word 0x08250C04 .CurMoveIndex: .word 0x0203B16D .Move_List: .word 0x02003268 .VRAM: .word 0x06001800 .SplitImages: .word 0xYYYYYYYY .Some_Offset: .word 0x0203B148 .Return_Addr: .word 0x0813A17C+1
Change the .SplitImages (0xYYYYYYYY) pointer to where ever you have the images.
The images are uncompressed. And should look like this:
They need to be in this order. Use TileMolester or something to insert them.
They use the same palette as the Types, which is located at 0x08E95DBC in a clean FireRed ROM. :)
HAPPY NEW YEAR!
FireRed (US)
Code:0803ED54: 80 7A 0803F226: 00 29 0803F228: 00 D0 0803F38C: 02 2F 0803F38E: 00 DB 0803F394: 01 28 0803F396: 00 D0
I'm sorry for asking a question you probably think is stupid, but how/where do we insert this code?
■変更箇所
※以下に示す箇所はアセンブリプログラムです。スクリプト処理とは全く異なるので、アセンブリ
に詳しくない場合は絶対に触らないで下さい。
◆ダメージ計算
0x0803e458(EMにおいては0x080690bc)以降の処理を色々と変更。以下、変更の概略
・オフセットの無駄を 8byte 省く
・上記によって生じたスペースを命令を挿入したい箇所に移行
・それに伴って不正な参照をする命令を正常な参照位置に変更
・以下の処理を上記のスペースと前後の命令を書き換えることで実現
‐「レジストリ11をメモリに退避」
‐「レジストリ11に属性用の変数を読み込む」
‐「攻撃・特殊依存を決定する命令でタイプを使用する代わりに技属性を使用」
このサブルーチン内部にある特性「あついしぼう」のダメージ半減処理を以下のように変更
・未使用のオフセット1byte を命令を挿入したい箇所に移行
・不正な参照を正常な参照位置へ変更
・「あついしぼう」の特攻半減処理を技の威力を半減させる命令に変更
このサブルーチン内で特殊技でない時の分岐先をサブルーチン終了処理から天候処理に差替え
天候処理の内部に天候砂嵐時の岩タイプ特防1.5倍の擬似処理を追加
具体的には次の通りである
・天候が砂嵐である
・技の効果対象のタイプに岩が含まれている
・使用した技の属性が特殊である
・上記条件を全て満たす時、ダメージを1.5で除算する
◆倍返し処理
0x0801ee94(EMにおいては0x08047b04)以降のカウンターとミラーコートのサブルーチン処理
を以下のように変更
・タイプ変数の呼び出しを属性変数の呼び出しに変更
・タイプに基づく比較命令を属性に基づく比較命令に変更
◆命中率処理
0x0801d5d4(EMにおいては0x0804629e)以降の命中率に関する処理を以下のように変更
・タイプ変数の呼び出しを属性変数の呼び出しに変更
・特性「はりきり」処理内部にあるタイプに基づく比較命令を属性に基づく比較命令に変更
◆バッジ効果
攻撃、防御、特攻、特防については 0x0803e458(EMにおいては0x080690bc)以降、素早さに
ついては 0x080144f8(EMにおいては0x0803cb54)以降の処理において、バッジ取得によるの各
ステータスの倍率を 1.1倍から1倍に変更。
◆アイテム所持効果変更
電気玉の処理は0x0803e458(EMにおいては0x080690bc)以降のコードを変更。
以下のアイテムについて
「ぎんのこな」「メタルコート」「やわらかいすな」「かたいいし」「きせきのタネ」
「くろいメガネ」「くろおび」「じしゃく」「しんぴのしずく」「するどいくちばし」
「どくバリ」「とけないこおり」「のろいのおふだ」「まがったスプーン」「もくたん」
「りゅうのキバ」「シルクのスカーフ」「うしおのおこう」「のんきのおこう」
0x083a06f8(EMにおいては0x0855cee8)以降のアイテムデータの汎用変数を0xaから0x14
に変更。
I just found a glitch.
Apperently, if you use a Flash Fire boosted Fire attack the game crashes (Goes back to the gameboy screen)
Can't say I've ever tested it, so I don't know.Does anyone also confirm that Hidden Power does minimal damage in the latest patch (I only tested Fire Red)?
the other things:
- rock-type won't get boosted sp.def while sandstorm
- sunny day and rain also won't affect fire and water moves' power
- abilities that boost certain type's power like "Blaze" don't work (as Jambo said)
- power-raising items also don't work...