diff options
| author | pikalaxalt <PikalaxALT@gmail.com> | 2016-06-20 17:04:36 -0400 |
|---|---|---|
| committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-06-20 17:04:36 -0400 |
| commit | 22f3332ceacfe7248f646eff9397ac3400bacdff (patch) | |
| tree | 60318d05ca293f931aac832c976f1d4f89663e0a /predef | |
| parent | cba3bef397cf350079e0a39f3f2ae59fecc9bafa (diff) | |
Start disassembling cgb/sgb predef fns
Diffstat (limited to 'predef')
| -rwxr-xr-x | predef/cgb.asm | 158 | ||||
| -rwxr-xr-x | predef/sgb.asm | 150 |
2 files changed, 304 insertions, 4 deletions
diff --git a/predef/cgb.asm b/predef/cgb.asm index ed71d8be..96dea80e 100755 --- a/predef/cgb.asm +++ b/predef/cgb.asm @@ -1,4 +1,158 @@ CheckCGB: - dr $9311, $9315 + ld a, [hCGB] + and a + ret + Predef_LoadSGBLayoutCGB: - dr $9315, $9a94 + ld a, b + cp SCGB_RAM + jr nz, .asm_931d + ld a, [wColorLayoutPredefID] +.asm_931d + cp SCGB_PARTY_MENU_HP_PALS + jp z, Function9b75 + call Function9b01 + ld l, a + ld h, $0 + add hl, hl + ld de, .Jumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .return + push de + jp [hl] + +.return + ret + +.Jumptable + dw Function9376 + dw Function9399 + dw Function944a + dw Function945e + dw Function94f1 + dw Function9605 + dw Function968d + dw Function96b7 + dw Function973e + dw Function9757 + dw Function9760 + dw Function976d + dw Function97af + dw Function97d4 + dw Function98be + dw Function98f1 + dw Function9905 + dw Function9728 + dw Function999f + dw Function99d9 + dw Function991e + dw Function9802 + dw Function95d5 + dw Function9561 + dw Function97e1 + dw Function9a03 + dw Function9a2e + dw Function9a5a + dw Function9a7b + dw Function9a94 + dw Function9a47 + dw Function9502 + +Function9376: + dr $9376, $9399 + +Function9399: + dr $9399, $944a + +Function944a: + dr $944a, $945e + +Function945e: + dr $945e, $94eb + +StatsScreenPals: + dr $94eb, $94f1 + +Function94f1: + dr $94f1, $9502 + +Function9502: + dr $9502, $9561 + +Function9561: + dr $9561, $95d5 + +Function95d5: + dr $95d5, $9605 + +Function9605: + dr $9605, $968d + +Function968d: + dr $968d, $96b7 + +Function96b7: + dr $96b7, $9728 + +Function9728: + dr $9728, $973e + +Function973e: + dr $973e, $9757 + +Function9757: + dr $9757, $9760 + +Function9760: + dr $9760, $976d + +Function976d: + dr $976d, $97af + +Function97af: + dr $97af, $97d4 + +Function97d4: + dr $97d4, $97e1 + +Function97e1: + dr $97e1, $9802 + +Function9802: + dr $9802, $98be + +Function98be: + dr $98be, $98f1 + +Function98f1: + dr $98f1, $9905 + +Function9905: + dr $9905, $991e + +Function991e: + dr $991e, $999f + +Function999f: + dr $999f, $99d9 + +Function99d9: + dr $99d9, $9a03 + +Function9a03: + dr $9a03, $9a2e + +Function9a2e: + dr $9a2e, $9a47 + +Function9a47: + dr $9a47, $9a5a + +Function9a5a: + dr $9a5a, $9a7b + +Function9a7b: + dr $9a7b, $9a94 diff --git a/predef/sgb.asm b/predef/sgb.asm index c7a2b950..9a7bac3a 100755 --- a/predef/sgb.asm +++ b/predef/sgb.asm @@ -1,2 +1,148 @@ -Predef_LoadSGBLayout: - dr $8c2d, $9052 +Predef_LoadSGBLayout: ; 8c2d (2:4c2d) + call CheckCGB + jp nz, Predef_LoadSGBLayoutCGB + ld a, b + cp SCGB_RAM + jr nz, .asm_8c3b + ld a, [wColorLayoutPredefID] +.asm_8c3b + cp SCGB_PARTY_MENU_HP_PALS + jp z, SGB_ApplyPartyMenuHPPals + ld l, a + ld h, $0 + add hl, hl + ld de, .Jumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, FinishSGBPredefFunction + push de + jp [hl] + +.Jumptable + dw Function8c90 + dw Function8c97 + dw Function8d3f + dw Function8d46 + dw Function8d95 + dw Function8e3c + dw Function8e43 + dw Function8e51 + dw Function8e4a + dw Function8e9b + dw Function8d8e + dw Function8eb7 + dw Function8e6e + dw Function8f04 + dw Function8d1f + dw Function8e81 + dw Function8e14 + dw Function8e88 + dw Function8f12 + dw Function8e7a + dw Function8e35 + dw Function8f04 + dw Function8e0d + dw Function8dd3 + dw Function8f0b + dw Function8f90 + dw Function8f97 + dw Function8fc3 + dw Function8fca + dw Function8e4a + dw Function8f53 + dw Function8dcc + +Function8c90: + dr $8c90, $8c97 + +Function8c97: + dr $8c97, $8d1f + +Function8d1f: + dr $8d1f, $8d3f + +Function8d3f: + dr $8d3f, $8d46 + +Function8d46: + dr $8d46, $8d8e + +Function8d8e: + dr $8d8e, $8d95 + +Function8d95: + dr $8d95, $8dcc + +Function8dcc: + dr $8dcc, $8dd3 + +Function8dd3: + dr $8dd3, $8e0d + +Function8e0d: + dr $8e0d, $8e14 + +Function8e14: + dr $8e14, $8e35 + +Function8e35: + dr $8e35, $8e3c + +Function8e3c: + dr $8e3c, $8e43 + +Function8e43: + dr $8e43, $8e4a + +Function8e4a: + dr $8e4a, $8e51 + +Function8e51: + dr $8e51, $8e6e + +Function8e6e: + dr $8e6e, $8e7a + +Function8e7a: + dr $8e7a, $8e81 + +Function8e81: + dr $8e81, $8e88 + +Function8e88: + dr $8e88, $8e9b + +Function8e9b: + dr $8e9b, $8eb7 + +Function8eb7: + dr $8eb7, $8f04 + +Function8f04: + dr $8f04, $8f0b + +Function8f0b: + dr $8f0b, $8f12 + +Function8f12: + dr $8f12, $8f53 + +Function8f53: + dr $8f53, $8f90 + +Function8f90: + dr $8f90, $8f97 + +Function8f97: + dr $8f97, $8fc3 + +Function8fc3: + dr $8fc3, $8fca + +Function8fca: + dr $8fca, $904a + +FinishSGBPredefFunction: + dr $904a, $9052 |
