From 99b86cdd8f2951cd540bf3563b7559e036e2c715 Mon Sep 17 00:00:00 2001 From: padz Date: Tue, 9 Oct 2012 02:16:36 -0400 Subject: [PATCH] flesh out bittable2 --- main.asm | 296 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 152 insertions(+), 144 deletions(-) diff --git a/main.asm b/main.asm index 1e4bcb772..33131fac9 100644 --- a/main.asm +++ b/main.asm @@ -211,7 +211,10 @@ GetJoypadState; 984 ld [$ff00+$a7], a ld [$ff00+$a8], a jr .quit - ld [$c2ca], a +; 9ee + +Function9ee: ; 9ee + ld [$c2ca], a ; bank? ld a, l ld [$c2c8], a ld a, h @@ -225,7 +228,7 @@ GetJoypadState; 984 ld a, $ff ld [$c2c7], a ret -;a0a +; a0a Functiona0a: ; a0a ; clears $c2c7-$c2cb @@ -236,7 +239,7 @@ Functiona0a: ; a0a ld [$c2cb], a ld [$c2c7], a ret -;a1b +; a1b INCBIN "baserom.gbc",$a1b,$e8d - $a1b @@ -1629,12 +1632,13 @@ PrintNumber_AdvancePointer: ; c64a INCBIN "baserom.gbc",$c658,$c721 - $c658 -CheckFlag: ; c721 +CheckFlag2: ; c721 +; uses bittable2 ; checks flag id in de ; returns carry if flag is not set ld b, $02 ; check flag - ld a, BANK(GetFlag) - ld hl, GetFlag + ld a, BANK(GetFlag2) + ld hl, GetFlag2 rst $08 ld a, c and a @@ -51338,8 +51342,8 @@ SECTION "bank20",DATA,BANK[$20] INCBIN "baserom.gbc",$80000,$80430-$80000 -GetFlag: ; 80430 -; engine flags, not script related +GetFlag2: ; 80430 +; uses bittable2 ; takes flag id in de, mode in b ; can either check, set or reset a flag ; check: stores flag in c @@ -51397,168 +51401,171 @@ GetFlag: ; 80430 ; 80462 Flags: ; 80462 +; bittable2 ; location, bit - dwb $d957, %00000010 - dwb $d957, %00000001 - dwb $d957, %00000100 - dwb $d957, %00001000 - dwb $d957, %10000000 + + ; pokegear + dwb $d957, %00000010 ; radio card + dwb $d957, %00000001 ; map card + dwb $d957, %00000100 ; phone card + dwb $d957, %00001000 ; expn card + dwb $d957, %10000000 ; on/off - dwb $def5, %01000000 - dwb $def5, %00000001 + ; $def5 %10000000 ; daycare 1 on + dwb $def5, %01000000 ; monster 1 and 2 are compatible + ; $def5 %???????? ; egg is ready + dwb $def5, %00000001 ; monster 1 in daycare - dwb $df2c, %00000001 + ; $df2c %10000000 = daycare 2 on + dwb $df2c, %00000001 ; monster 2 in daycare - dwb $d854, %00000001 - dwb $d854, %10000000 + dwb $d854, %00000001 ; mom saving money + dwb $d854, %10000000 ; dst dwb $dc39, %00000001 - dwb $d84c, %00000001 - dwb $d84c, %00000010 - dwb $d84c, %00001000 - dwb $d84c, %00010000 - dwb $d84c, %01000000 - dwb $d84c, %10000000 - - dwb $d84d, %00000100 ; bug catching contest timeup - dwb $d84d, %00000010 - dwb $d84d, %00000001 + dwb $d84c, %00000001 ; pokedex + dwb $d84c, %00000010 ; unown dex + dwb $d84c, %00001000 ; pokerus + dwb $d84c, %00010000 ; rocket signal on ch20 + dwb $d84c, %01000000 ; credits skip + dwb $d84c, %10000000 ; bug contest on + dwb $d84d, %00000100 ; bug contest timer + dwb $d84d, %00000010 ; rockets in radio tower + dwb $d84d, %00000001 ; bike shop call enabled (1024 bike steps reqd) dwb $d84d, %00010000 - dwb $d84d, %00100000 + dwb $d84d, %00100000 ; give pokerus; berry -> berry juice when trading? dwb $d84d, %01000000 - dwb $d84d, %10000000 + dwb $d84d, %10000000 ; rockets in mahogany - dwb $dbf5, %00000001 - dwb $dbf5, %00000010 + dwb $dbf5, %00000001 ; strength active + dwb $dbf5, %00000010 ; always on bike (cant surf) dwb $dbf5, %00000100 ; downhill (cycling road) - ; johto badges - dwb $d857, %00000001 ; $1b - dwb $d857, %00000010 ; $1c - dwb $d857, %00000100 ; $1d - dwb $d857, %00001000 ; $1e - dwb $d857, %00010000 ; $1f - dwb $d857, %00100000 ; $20 - dwb $d857, %01000000 ; $21 - dwb $d857, %10000000 ; $22 + dwb JohtoBadges, %00000001 ; zephyrbadge + dwb JohtoBadges, %00000010 ; hivebadge + dwb JohtoBadges, %00000100 ; plainbadge + dwb JohtoBadges, %00001000 ; fogbadge + dwb JohtoBadges, %00010000 ; mineralbadge + dwb JohtoBadges, %00100000 ; stormbadge + dwb JohtoBadges, %01000000 ; glacierbadge + dwb JohtoBadges, %10000000 ; risingbadge - ; kanto badges - dwb $d858, %00000001 ; $23 - dwb $d858, %00000010 ; $24 - dwb $d858, %00000100 ; $25 - dwb $d858, %00001000 ; $26 - dwb $d858, %00010000 ; $27 - dwb $d858, %00100000 ; $28 - dwb $d858, %01000000 ; $29 - dwb $d858, %10000000 ; $2a + dwb KantoBadges, %00000001 ; boulderbadge + dwb KantoBadges, %00000010 ; cascadebadge + dwb KantoBadges, %00000100 ; thunderbadge + dwb KantoBadges, %00001000 ; rainbowbadge + dwb KantoBadges, %00010000 ; soulbadge + dwb KantoBadges, %00100000 ; marshbadge + dwb KantoBadges, %01000000 ; volcanobadge + dwb KantoBadges, %10000000 ; earthbadge - dwb $def3, %00000001 - dwb $def3, %00000010 - dwb $def3, %00000100 - dwb $def3, %00001000 - dwb $def3, %00010000 - dwb $def3, %00100000 - dwb $def3, %01000000 - dwb $def3, %10000000 + ; unown sets + dwb $def3, %00000001 ; 1 + dwb $def3, %00000010 ; 2 + dwb $def3, %00000100 ; 3 + dwb $def3, %00001000 ; 4 + dwb $def3, %00010000 ; 5 + dwb $def3, %00100000 ; 6 + dwb $def3, %01000000 ; 7 + dwb $def3, %10000000 ; 8 - dwb $dca5, %00000001 - dwb $dca5, %00000010 - dwb $dca5, %00000100 - dwb $dca5, %00001000 - dwb $dca5, %00010000 - dwb $dca5, %00100000 - dwb $dca5, %01000000 - dwb $dca5, %10000000 + ; fly + dwb $dca5, %00000001 ; your house + dwb $dca5, %00000010 ; viridian pokecenter + dwb $dca5, %00000100 ; pallet + dwb $dca5, %00001000 ; viridian + dwb $dca5, %00010000 ; pewter + dwb $dca5, %00100000 ; cerulean + dwb $dca5, %01000000 ; rock tunnel + dwb $dca5, %10000000 ; vermilion + dwb $dca6, %00000001 ; lavender + dwb $dca6, %00000010 ; saffron + dwb $dca6, %00000100 ; celadon + dwb $dca6, %00001000 ; fuchsia + dwb $dca6, %00010000 ; cinnabar + dwb $dca6, %00100000 ; indigo plateau + dwb $dca6, %01000000 ; new bark + dwb $dca6, %10000000 ; cherrygrove + dwb $dca7, %00000001 ; violet + dwb $dca7, %00000100 ; azalea + dwb $dca7, %00001000 ; cianwood + dwb $dca7, %00010000 ; goldenrod + dwb $dca7, %00100000 ; olivine + dwb $dca7, %01000000 ; ecruteak + dwb $dca7, %10000000 ; mahogany + dwb $dca8, %00000001 ; lake of rage + dwb $dca8, %00000010 ; blackthorn + dwb $dca8, %00000100 ; silver cave + dwb $dca8, %00010000 ; unused - dwb $dca6, %00000001 - dwb $dca6, %00000010 - dwb $dca6, %00000100 - dwb $dca6, %00001000 - dwb $dca6, %00010000 - dwb $dca6, %00100000 - dwb $dca6, %01000000 - dwb $dca6, %10000000 - - dwb $dca7, %00000001 - dwb $dca7, %00000100 - dwb $dca7, %00001000 - dwb $dca7, %00010000 - dwb $dca7, %00100000 - dwb $dca7, %01000000 - dwb $dca7, %10000000 - - dwb $dca8, %00000001 - dwb $dca8, %00000010 - dwb $dca8, %00000100 - dwb $dca8, %00010000 - - dwb $dc9d, %00000001 + dwb $dc9d, %00000001 ; lucky number show dwb $d84d, %00001000 - dwb $dc1e, %00000001 + dwb $dc1e, %00000001 ; kurt making balls dwb $dc1e, %00000010 - dwb $dc1e, %00000100 - dwb $dc1e, %00001000 - dwb $dc1e, %00010000 - dwb $dc1e, %00100000 - dwb $dc1e, %01000000 - dwb $dc1e, %10000000 + dwb $dc1e, %00000100 ; special wilddata? + dwb $dc1e, %00001000 ; time capsule (24h wait) + dwb $dc1e, %00010000 ; all fruit trees + dwb $dc1e, %00100000 ; shuckle given + dwb $dc1e, %01000000 ; goldenrod underground merchant closed + dwb $dc1e, %10000000 ; fought in trainer hall today - dwb $dc1f, %00000001 - dwb $dc1f, %00000010 - dwb $dc1f, %00000100 - dwb $dc1f, %00001000 - dwb $dc1f, %00010000 - dwb $dc1f, %00100000 + dwb $dc1f, %00000001 ; mt moon square clefairy + dwb $dc1f, %00000010 ; union cave lapras + dwb $dc1f, %00000100 ; goldenrod underground haircut used + dwb $dc1f, %00001000 ; goldenrod mall happiness event floor05 person07 + dwb $dc1f, %00010000 ; tea in blues house + dwb $dc1f, %00100000 ; indigo plateau rival fight dwb $dc1f, %01000000 dwb $dc1f, %10000000 - dwb $dc20, %00000001 - dwb $dc20, %00000010 + dwb $dc20, %00000001 ; $60 + dwb $dc20, %00000010 ; goldenrod dept store sale is on - dwb $cfbc, %10000000 - dwb $d472, %00000001 ; 0 if boy, 1 if girl - dwb $dbf3, %00000100 + dwb $cfbc, %10000000 ; $62 - dwb $dc4c, %00000001 - dwb $dc4c, %00000010 - dwb $dc4c, %00000100 - dwb $dc4c, %00001000 - dwb $dc4c, %00010000 - dwb $dc4c, %00100000 - dwb $dc4c, %01000000 - dwb $dc4c, %10000000 + dwb $d472, %00000001 ; player is female - dwb $dc4d, %00000001 - dwb $dc4d, %00000010 - dwb $dc4d, %00000100 - dwb $dc4d, %00001000 - dwb $dc4d, %00010000 - dwb $dc4d, %00100000 - dwb $dc4d, %01000000 - dwb $dc4d, %10000000 + dwb $dbf3, %00000100 ; have gs ball after kurt examined it - dwb $dc4e, %00000001 - dwb $dc4e, %00000010 - dwb $dc4e, %00000100 - dwb $dc4e, %00001000 - dwb $dc4e, %00010000 - dwb $dc4e, %00100000 - dwb $dc4e, %01000000 - dwb $dc4e, %10000000 + ; rematches + dwb $dc4c, %00000001 ; jack + dwb $dc4c, %00000010 ; huey + dwb $dc4c, %00000100 ; gaven + dwb $dc4c, %00001000 ; beth + dwb $dc4c, %00010000 ; jose + dwb $dc4c, %00100000 ; reena + dwb $dc4c, %01000000 ; joey + dwb $dc4c, %10000000 ; wade + dwb $dc4d, %00000001 ; ralph + dwb $dc4d, %00000010 ; liz + dwb $dc4d, %00000100 ; anthony + dwb $dc4d, %00001000 ; todd + dwb $dc4d, %00010000 ; gina + dwb $dc4d, %00100000 ; arnie + dwb $dc4d, %01000000 ; alan + dwb $dc4d, %10000000 ; dana + dwb $dc4e, %00000001 ; chad + dwb $dc4e, %00000010 ; tully + dwb $dc4e, %00000100 ; brent + dwb $dc4e, %00001000 ; tiffany + dwb $dc4e, %00010000 ; vance + dwb $dc4e, %00100000 ; wilton + dwb $dc4e, %01000000 ; parry + dwb $dc4e, %10000000 ; erin - dwb $dc50, %00000001 - dwb $dc50, %00000010 - dwb $dc50, %00000100 - dwb $dc50, %00001000 - dwb $dc50, %00010000 - dwb $dc50, %00100000 - dwb $dc50, %01000000 - dwb $dc50, %10000000 + dwb $dc50, %00000001 ; beverly has nugget + dwb $dc50, %00000010 ; jose has star piece + dwb $dc50, %00000100 ; wade has item (see bittable1 $032b-e) + dwb $dc50, %00001000 ; gina has leaf stone + dwb $dc50, %00010000 ; alan has fire stone + dwb $dc50, %00100000 ; liz has thunderstone + dwb $dc50, %01000000 ; derek has nugget + dwb $dc50, %10000000 ; tully has water stone - dwb $dc51, %00000001 - dwb $dc51, %00000010 + dwb $dc51, %00000001 ; tiffany has pink bow + dwb $dc51, %00000010 ; wilton has item (see bittable1 $032f-31) dwb $dc54, %00000001 dwb $dc54, %00000010 @@ -51587,9 +51594,10 @@ Flags: ; 80462 dwb $dc56, %01000000 dwb $dc56, %10000000 - dwb $d45b, %00000100 - dwb $dc20, %00000100 - dwb $dc20, %00001000 ; $a1 + dwb $d45b, %00000100 ; female player has been transformed into male + + dwb $dc20, %00000100 ; dunsparce swarm + dwb $dc20, %00001000 ; yanma swarm ; 80648 INCBIN "baserom.gbc",$80648,$80730-$80648