Merge remote branch 'remotes/yenatch/master'

fixes #49
This commit is contained in:
Bryan Bishop 2012-12-23 02:56:46 -06:00
commit 3b20ea2916
3 changed files with 644 additions and 282 deletions

View File

@ -593,7 +593,7 @@ def asm_label(address):
# why using a random value when you can use the address?
return ".ASM_" + hex(address)[2:]
def output_bank_opcodes(original_offset, max_byte_count=0x4000):
def output_bank_opcodes(original_offset, max_byte_count=0x4000, debug = False):
#fs = current_address
#b = bank_byte
#in = input_data -- rom
@ -601,11 +601,14 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000):
#i = offset
#ad = end_address
#a, oa = current_byte_number
load_labels()
load_rom()
bank_id = 0
if original_offset > 0x8000:
bank_id = original_offset / 0x4000
print "bank id is: " + str(bank_id)
if debug: print "bank id is: " + str(bank_id)
last_hl_address = None #for when we're scanning the main map script
last_a_address = None
@ -843,7 +846,7 @@ def all_outstanding_labels_are_reverse(byte_labels, offset):
if not label_id < offset: return False
return True
if __name__ == "__main__":
load_labels()
load_rom()
print output_bank_opcodes(int(sys.argv[1], 16))[0]

View File

@ -11414,7 +11414,7 @@ INCBIN "baserom.gbc",$3ddc8,$3e8eb - $3ddc8
Function3e8eb: ; 3e8eb
;part of battle init
xor a
ld hl, EnemyMonSpecies2
ld hl, EnemyMonSpecies
ld bc, $0027
call ByteFill
ld a, [InLinkBattle]
@ -11423,8 +11423,8 @@ Function3e8eb: ; 3e8eb
ld a, [$cfc0]
bit 0, a
jp nz, $5abd
ld a, [EnemyMonSpecies]
ld [EnemyMonSpecies2], a
ld a, [TempEnemyMonSpecies]
ld [EnemyMonSpecies], a
ld [$cf60], a
ld [$d108], a
call $3856
@ -11515,7 +11515,7 @@ Function3e8eb: ; 3e8eb
ld a, [$d22d]
dec a
jr nz, .asm_3ea1a
ld a, [EnemyMonSpecies]
ld a, [TempEnemyMonSpecies]
cp a, UNOWN
jr nz, .notunown
ld hl, EnemyMonDVs
@ -11524,7 +11524,7 @@ Function3e8eb: ; 3e8eb
call CheckUnownLetter
jr c, .asm_3e9a0
.notunown
ld a, [EnemyMonSpecies]
ld a, [TempEnemyMonSpecies]
cp a, MAGIKARP
jr nz, .asm_3ea1a
ld de, EnemyMonDVs
@ -11679,7 +11679,7 @@ Function3e8eb: ; 3e8eb
inc de
ld a, [$d240]
ld [de], a
ld a, [EnemyMonSpecies]
ld a, [TempEnemyMonSpecies]
ld [$d265], a
call $343b
ld a, [$d22d]
@ -11689,7 +11689,7 @@ Function3e8eb: ; 3e8eb
ld de, $c616
ld bc, $000b
call CopyBytes
ld a, [EnemyMonSpecies]
ld a, [TempEnemyMonSpecies]
dec a
ld c, a
ld b, $01
@ -11715,7 +11715,7 @@ CheckSleepingTreeMon: ; 3eb38
jr z, .check
ld hl, SleepingTreeMonNiteTable
.check
ld a, [EnemyMonSpecies]
ld a, [TempEnemyMonSpecies]
ld de, $0001
call IsInArray
ret c

897
wram.asm

File diff suppressed because it is too large Load Diff