Final Fantasy VI:ROM map/Assembly C0A

From Data Crystal
Jump to: navigation, search


C0/A03A event #$7F : change character name

C0/A03A:	20AD9D  	JSR $9DAD		
C0/A03D:	A906    	LDA #$06
C0/A03F:	8D0242  	STA $4202
C0/A042:	A5EC    	LDA $EC
C0/A044:	8D0342  	STA $4203
C0/A047:	EA      	NOP
C0/A048:	EA      	NOP
C0/A049:	EA      	NOP
C0/A04A:	AE1642  	LDX $4216
C0/A04D:	BFC078C4	LDA $C478C0,X
C0/A051:	990216  	STA $1602,Y
C0/A054:	BFC178C4	LDA $C478C1,X
C0/A058:	990316  	STA $1603,Y
C0/A05B:	BFC278C4	LDA $C478C2,X
C0/A05F:	990416  	STA $1604,Y
C0/A062:	BFC378C4	LDA $C478C3,X
C0/A066:	990516  	STA $1605,Y
C0/A069:	BFC478C4	LDA $C478C4,X
C0/A06D:	990616  	STA $1606,Y
C0/A070:	BFC578C4	LDA $C478C5,X
C0/A074:	990716  	STA $1607,Y
C0/A077:	A903    	LDA #$03
C0/A079:	4C5C9B  	JMP $9B5C

C0/A07C event #$40 : set character data

C0/A07C:	20AD9D  	JSR $9DAD		
C0/A07F:	A916    	LDA #$16
C0/A081:	8D0242  	STA $4202
C0/A084:	A5EC    	LDA $EC
C0/A086:	8D0342  	STA $4203
C0/A089:	EA      	NOP
C0/A08A:	EA      	NOP
C0/A08B:	EA      	NOP
C0/A08C:	AE1642  	LDX $4216
C0/A08F:	BFA27CED	LDA $ED7CA2,X	(command 1)
C0/A093:	991616  	STA $1616,Y
C0/A096:	BFA37CED	LDA $ED7CA3,X	(command 2)
C0/A09A:	991716  	STA $1617,Y
C0/A09D:	BFA47CED	LDA $ED7CA4,X	(command 3)
C0/A0A1:	991816  	STA $1618,Y
C0/A0A4:	BFA57CED	LDA $ED7CA5,X	(command 4)
C0/A0A8:	991916  	STA $1619,Y
C0/A0AB:	BFA67CED	LDA $ED7CA6,X	(vigor)
C0/A0AF:	991A16  	STA $161A,Y
C0/A0B2:	BFA77CED	LDA $ED7CA7,X	(speed)
C0/A0B6:	991B16  	STA $161B,Y
C0/A0B9:	BFA87CED	LDA $ED7CA8,X	(stamina)
C0/A0BD:	991C16  	STA $161C,Y
C0/A0C0:	BFA97CED	LDA $ED7CA9,X	(mag. pwr.)
C0/A0C4:	991D16  	STA $161D,Y
C0/A0C7:	A9FF    	LDA #$FF	(empty esper)
C0/A0C9:	991E16  	STA $161E,Y	
C0/A0D0:	991F16  	STA $161F,Y
C0/A0D3:	BFB07CED	LDA $ED7CB0,X	(L-hand)
C0/A0D7:	992016  	STA $1620,Y
C0/A0DA:	BFB17CED	LDA $ED7CB1,X	(Body)
C0/A0DE:	992116  	STA $1621,Y
C0/A0E1:	BFB27CED	LDA $ED7CB2,X	(Head)
C0/A0E5:	992216  	STA $1622,Y
C0/A0E8:	BFB37CED	LDA $ED7CB3,X	(Relic 1)
C0/A0EC:	992316  	STA $1623,Y
C0/A0EF:	BFB47CED	LDA $ED7CB4,X	(Relic 2)
C0/A0F3:	992416  	STA $1624,Y
C0/A0F6:	BFA07CED	LDA $ED7CA0,X	(Level 1 HP)
C0/A0FA:	990B16  	STA $160B,Y
C0/A0FD:	BFA17CED	LDA $ED7CA1,X	(Level 1 MP)
C0/A101:	990F16  	STA $160F,Y
C0/A104:	7B      	TDC 
C0/A105:	990C16  	STA $160C,Y    (max HP, high byte = 0)
C0/A108:	991016  	STA $1610,Y    (max MP, high byte = 0)
C0/A10B:	DA      	PHX
C0/A10C:	5A      	PHY
C0/A10D:	A5EC    	LDA $EC        (load parameter)
C0/A10F:	990016  	STA $1600,Y    (save character ID)
C0/A112:	20789F  	JSR $9F78      (determine starting level)
C0/A115:	7A      	PLY
C0/A116:	FA      	PLX
C0/A117:	990816  	STA $1608,Y    (Store to the level)
C0/A11A:	BFB57CED	LDA $ED7CB5,X  ("Level factor")
C0/A11E:	290C    	AND #$0C		(Isolate bits 2 and 3)
C0/A120:	4A      	LSR A			(Divide by 2)
C0/A121:	4A      	LSR A			(Divide by 2 again, now 4)
C0/A122:	AA      	TAX			(Put that into X)
C0/A123:	BF28A2C0	LDA $C0A228,X  (Load one of 4 constants)
C0/A127:	18      	CLC           (Clear the carry)
C0/A128:	790816  	ADC $1608,Y    (Add the level and this variable amount [0, 2, 5, or -3])
C0/A12B:	F002    	BEQ $A12F      (branch if level was 0)
C0/A12D:	1002    	BPL $A131      (branch if level is less than 128)
C0/A12F:	A901    	LDA #$01       (Min. Lev. 1)
C0/A131:	C963    	CMP #$63       (is the current level 99?)
C0/A133:	9002    	BCC $A137      (branch if less than 99)
C0/A135:	A963    	LDA #$63       (Trunc at 99)
C0/A137:	990816  	STA $1608,Y    (save as level)
C0/A13A:	207EA2  	JSR $A27E
C0/A13D:	B90B16  	LDA $160B,Y    (max HP, low byte)
C0/A140:	990916  	STA $1609,Y    (save as current HP, low byte)
C0/A143:	B90C16  	LDA $160C,Y    (max HP, high byte)
C0/A146:	990A16  	STA $160A,Y    (save as current HP, high byte)
C0/A149:	20BCA2  	JSR $A2BC
C0/A14C:	B90F16  	LDA $160F,Y    (max MP, low byte)
C0/A14F:	990D16  	STA $160D,Y    (save as current MP, low byte)
C0/A152:	B91016  	LDA $1610,Y    (max MP, high byte)
C0/A155:	990E16  	STA $160E,Y    (save as current MP, low byte)
C0/A158:	2035A2  	JSR $A235
C0/A15B:	BB      	TYX
C0/A15C:	20F09D  	JSR $9DF0
C0/A15F:	B97C08  	LDA $087C,Y
C0/A162:	29F0    	AND #$F0
C0/A164:	0901    	ORA #$01
C0/A166:	997C08  	STA $087C,Y
C0/A169:	B96808  	LDA $0868,Y
C0/A16C:	0901    	ORA #$01
C0/A16E:	996808  	STA $0868,Y
C0/A171:	A900    	LDA #$00
C0/A173:	996708  	STA $0867,Y
C0/A176:	9B      	TXY
C0/A177:	207FA1  	JSR $A17F		(Check Natural Abilities)
C0/A17A:	A903    	LDA #$03
C0/A17C:	4C5C9B  	JMP $9B5C

C0/A17F learn abilities by level up

C0/A17F:	B90016  	LDA $1600,Y    (character ID)
C0/A182:	C900    	CMP #$00       (is character Terra? note there's no need for this CMP here)
C0/A184:	F010    	BEQ $A196      (branch if so)
C0/A186:	C906    	CMP #$06       (is character Celes?)
C0/A188:	F02E    	BEQ $A1B8      (branch if so)
C0/A18A:	C902    	CMP #$02       (is character Cyan?)
C0/A18C:	F04C    	BEQ $A1DA      (branch if so)
C0/A18E:	C905    	CMP #$05       (is character Sabin?)
C0/A190:	D003    	BNE $A195      (branch if not)
C0/A192:	4C01A2  	JMP $A201
C0/A195:	60      	RTS

C0/A196 Terra's natural learning

C0/A196:	A600    	LDX $00
C0/A198:	BFC1E3EC	LDA $ECE3C1,X  (Natural Magic Level)
C0/A19C:	D90816  	CMP $1608,Y    (compare it to her current level)
C0/A19F:	F002    	BEQ $A1A3      (branch if they are the same)
C0/A1A1:	B0F2    	BCS $A195      (branch if her level is lower)
C0/A1A3:	5A      	PHY	
C0/A1A4:	BFC0E3EC	LDA $ECE3C0,X  (Natural Magic Spell)
C0/A1A8:	A8      	TAY
C0/A1A9:	A9FF    	LDA #$FF
C0/A1AB:	996E1A  	STA $1A6E,Y    (set spell as learned)
C0/A1AE:	7A      	PLY
C0/A1AF:	E8      	INX
C0/A1B0:	E8      	INX
C0/A1B1:	E02000  	CPX #$0020     (have we checked 16 spells yet?)
C0/A1B4:	F0DF    	BEQ $A195      (branch if so)
C0/A1B6:	80E0    	BRA $A198      (otherwise loop and keep learning)

C0/A1B8 Cele's natural learning

C0/A1B8:	A600    	LDX $00
C0/A1BA:	BFE1E3EC	LDA $ECE3E1,X  (Natural Magic Level)
C0/A1BE:	D90816  	CMP $1608,Y    (compare it to her current level)
C0/A1C1:	F002    	BEQ $A1C5      (branch if they are the same)
C0/A1C3:	B0D0    	BCS $A195      (branch if her level is lower)
C0/A1C5:	5A      	PHY
C0/A1C6:	BFE0E3EC	LDA $ECE3E0,X  (Natural Magic Spell)
C0/A1CA:	A8      	TAY
C0/A1CB:	A9FF    	LDA #$FF
C0/A1CD:	99B21B  	STA $1BB2,Y    (set spell as learned)
C0/A1D0:	7A      	PLY
C0/A1D1:	E8      	INX
C0/A1D2:	E8      	INX
C0/A1D3:	E02000  	CPX #$0020     (have we checked 16 spells yet?)
C0/A1D6:	F0BD    	BEQ $A195      (branch if so)
C0/A1D8:	80E0    	BRA $A1BA      (otherwise loop and keep learning)

C0/A1DA Cyan's sword tech learning

C0/A1DA:	641B    	STZ $1B
C0/A1DC:	A600    	LDX $00
C0/A1DE:	BF90F4E6	LDA $E6F490,X	(Natural SwdTechs)
C0/A1E2:	D90816  	CMP $1608,Y
C0/A1E5:	F002    	BEQ $A1E9
C0/A1E7:	B00A    	BCS $A1F3
C0/A1E9:	E61B    	INC $1B
C0/A1EB:	E8      	INX
C0/A1EC:	E00800  	CPX #$0008
C0/A1EF:	F002    	BEQ $A1F3
C0/A1F1:	80EB    	BRA $A1DE
C0/A1F3:	A51B    	LDA $1B
C0/A1F5:	AA      	TAX
C0/A1F6:	ADF71C  	LDA $1CF7      (known SwdTech's)
C0/A1F9:	1F2CA2C0	ORA $C0A22C,X
C0/A1FD:	8DF71C  	STA $1CF7      (new known SwdTech's)
C0/A200:	60      	RTS

C0/A201 Sabin's blitz learning

C0/A201:	641B    	STZ $1B
C0/A203:	A600    	LDX $00
C0/A205:	BF98F4E6	LDA $E6F498,X  (Natural Blitzes)
C0/A209:	D90816  	CMP $1608,Y
C0/A20C:	F002    	BEQ $A210
C0/A20E:	B00A    	BCS $A21A
C0/A210:	E61B    	INC $1B
C0/A212:	E8      	INX
C0/A213:	E00800  	CPX #$0008
C0/A216:	F002    	BEQ $A21A
C0/A218:	80EB    	BRA $A205
C0/A21A:	A51B    	LDA $1B
C0/A21C:	AA      	TAX
C0/A21D:	AD281D  	LDA $1D28      (known Blitzes)
C0/A220:	1F2CA2C0	ORA $C0A22C,X
C0/A224:	8D281D  	STA $1D28      (new known Blitzes)
C0/A227:	60      	RTS

C0/A228 level factor adjustment at character creation (data)

C0/A228:	00      	(add 0)
C0/A229:	02      	(add 2)
C0/A22A:	05      	(add 5)
C0/A22B:	FD      	(subtract 3)

C0/A22C bitfields for sword tech and blitz (data)

C0/A22C:	00      	(none)
C0/A22D:	01      	(Pummel/Dispatch)
C0/A22E:	03      	(Aura Bolt/Retort + above)
C0/A22F:	07      	(Suplex/Slash + above)
C0/A230:	0F      	(Fire Dance/Quadra Slam + above)
C0/A231:	1F      	(Mantra/Empowerer + above)
C0/A232:	3F      	(Air Blade/Stunner + above)
C0/A233:	7F      	(Spiraler/Quadra Slice + above)
C0/A234:	FF      	(Bum Rush/Cleave + above)

C0/A235 determine experience for next level up

C0/A235:	B90816  	LDA $1608,Y    (level)
C0/A238:	851B    	STA $1B        (save it for now)
C0/A23A:	A600    	LDX $00        (#$0000)
C0/A23C:	862A    	STX $2A        ($2A = #$0000)
C0/A23E:	642C    	STZ $2C        ($2C = #$00)
C0/A240:	C61B    	DEC $1B        (decrement saved level)
C0/A242:	F018    	BEQ $A25C      (branch if it hit zero)
C0/A244:	C220    	REP #$20       (16 bit accum./memory)
C0/A246:	BF2082ED	LDA $ED8220,X  (Experience Needed for level up)
C0/A24A:	18      	CLC
C0/A24B:	652A    	ADC $2A        (add it)
C0/A24D:	852A    	STA $2A        (save it)
C0/A24F:	7B      	TDC 
C0/A250:	E220    	SEP #$20      	(8 bit accum./memory)
C0/A252:	A52C    	LDA $2C
C0/A254:	6900    	ADC #$00       (increment on the previous ADC's wrap)
C0/A256:	852C    	STA $2C        (save it)
C0/A258:	E8      	INX
C0/A259:	E8      	INX
C0/A25A:	80E4    	BRA $A240      (loop for every level needed to do, up to 98 in all)
C0/A25C:	062A    	ASL $2A        (low byte * 2)
C0/A25E:	262B    	ROL $2B        (rotate middle byte left 1 one, add in carry's status)
C0/A260:	262C    	ROL $2C        (rotate high byte left 1 one, add in carry's status)
C0/A262:	062A    	ASL $2A        (low byte * 2)
C0/A264:	262B    	ROL $2B        (rotate middle byte left 1 one, add in carry's status)
C0/A266:	262C    	ROL $2C        (rotate high byte left 1 one, add in carry's status)
C0/A268:	062A    	ASL $2A        (low byte * 2)
C0/A26A:	262B    	ROL $2B        (rotate middle byte left 1 one, add in carry's status)
C0/A26C:	262C    	ROL $2C        (rotate high byte left 1 one, add in carry's status)
C0/A26E:	A52A    	LDA $2A        (load experience needed, low byte)
C0/A270:	991116  	STA $1611,Y    (save new experience needed for level up, low byte)
C0/A273:	A52B    	LDA $2B        (load experience needed, middle byte)
C0/A275:	991216  	STA $1612,Y    (save new experience needed for level up, middle byte)
C0/A278:	A52C    	LDA $2C        (load experience needed, high byte)
C0/A27A:	991316  	STA $1613,Y    (save new experience needed for level up, high byte)
C0/A27D:	60      	RTS

C0/A27E unknow

C0/A27E:	A916    	LDA #$16       (22 = width of character startup struct)
C0/A280:	8D0242  	STA $4202
C0/A283:	B90016  	LDA $1600,Y    (character ID)
C0/A286:	8D0342  	STA $4203      (save as a multiplier)
C0/A289:	B90816  	LDA $1608,Y    (character level)
C0/A28C:	851B    	STA $1B        (save it for now)
C0/A28E:	641F    	STZ $1F        (zero out upper HP byte)
C0/A290:	AE1642  	LDX $4216
C0/A293:	BFA07CED	LDA $ED7CA0,X  (Initial HP)
C0/A297:	851E    	STA $1E        (save initial HP)
C0/A299:	A600    	LDX $00        (X = #$0000)
C0/A29B:	C61B    	DEC $1B        (decrement levels to do)
C0/A29D:	F012    	BEQ $A2B1      (branch if none left)
C0/A29F:	BFA0F4E6	LDA $E6F4A0,X  (HP mod. by level)
C0/A2A3:	18      	CLC
C0/A2A4:	651E    	ADC $1E        (add it with current HP)
C0/A2A6:	851E    	STA $1E        (save it)
C0/A2A8:	A51F    	LDA $1F        (load upper HP byte)
C0/A2AA:	6900    	ADC #$00       (incremented based on previous ADC)
C0/A2AC:	851F    	STA $1F        (save it)
C0/A2AE:	E8      	INX            (increment next level's value)
C0/A2AF:	80EA    	BRA $A29B      (...and loop)
C0/A2B1:	C221    	REP #$21
C0/A2B3:	A51E    	LDA $1E        (load HP)
C0/A2B5:	990B16  	STA $160B,Y    (save as max HP)
C0/A2B8:	7B      	TDC            (A = #$0000)
C0/A2B9:	E220    	SEP #$20      	(8 bit accum./memory)
C0/A2BB:	60      	RTS

C0/A2BC unknow

C0/A2BC:	A916    	LDA #$16       (22 = width of character startup struct)
C0/A2BE:	8D0242  	STA $4202
C0/A2C1:	B90016  	LDA $1600,Y    (character ID)
C0/A2C4:	8D0342  	STA $4203      (save as a multiplier)
C0/A2C7:	B90816  	LDA $1608,Y    (character level)
C0/A2CA:	851B    	STA $1B        (save it for now)
C0/A2CC:	641F    	STZ $1F        (zero out upper MP byte)
C0/A2CE:	AE1642  	LDX $4216
C0/A2D1:	BFA17CED	LDA $ED7CA1,X  (Initial MP)
C0/A2D5:	851E    	STA $1E        (save initial HP)
C0/A2D7:	A600    	LDX $00        (X = #$0000)
C0/A2D9:	C61B    	DEC $1B
C0/A2DB:	F012    	BEQ $A2EF
C0/A2DD:	BF02F5E6	LDA $E6F502,X	(MP mod. by level)
C0/A2E1:	18      	CLC
C0/A2E2:	651E    	ADC $1E        (add it with current MP)
C0/A2E4:	851E    	STA $1E        (save it)
C0/A2E6:	A51F    	LDA $1F        (load upper MP byte)
C0/A2E8:	6900    	ADC #$00       (incremented based on previous ADC)
C0/A2EA:	851F    	STA $1F        (save it)
C0/A2EC:	E8      	INX           (increment next level's value)
C0/A2ED:	80EA    	BRA $A2D9      (...and loop)
C0/A2EF:	C221    	REP #$21
C0/A2F1:	A51E    	LDA $1E        (load MP)
C0/A2F3:	990F16  	STA $160F,Y    (save as max MP)
C0/A2F6:	7B      	TDC            (A = #$0000)
C0/A2F7:	E220    	SEP #$20      (8 bit accum./memory)
C0/A2F9:	60      	RTS

C0/A2FA event #$41 : show object

C0/A2FA:	20F09D  	JSR $9DF0	
C0/A2FD:	B96708  	LDA $0867,Y
C0/A300:	2940    	AND #$40
C0/A302:	F02D    	BEQ $A331
C0/A304:	B96708  	LDA $0867,Y
C0/A307:	3028    	BMI $A331
C0/A309:	0980    	ORA #$80
C0/A30B:	996708  	STA $0867,Y
C0/A30E:	B98008  	LDA $0880,Y
C0/A311:	29CF    	AND #$CF
C0/A313:	0920    	ORA #$20
C0/A315:	998008  	STA $0880,Y
C0/A318:	B98108  	LDA $0881,Y
C0/A31B:	29CF    	AND #$CF
C0/A31D:	0920    	ORA #$20
C0/A31F:	998108  	STA $0881,Y
C0/A322:	A5EB    	LDA $EB
C0/A324:	C910    	CMP #$10
C0/A326:	B009    	BCS $A331
C0/A328:	A8      	TAY
C0/A329:	B95018  	LDA $1850,Y
C0/A32C:	0980    	ORA #$80
C0/A32E:	995018  	STA $1850,Y
C0/A331:	A902    	LDA #$02
C0/A333:	4C5C9B  	JMP $9B5C

C0/A336 event #$42 : hide object

C0/A336:	20F09D  	JSR $9DF0
C0/A339:	B96708  	LDA $0867,Y
C0/A33C:	297F    	AND #$7F
C0/A33E:	996708  	STA $0867,Y
C0/A341:	7B      	TDC 
C0/A342:	997D08  	STA $087D,Y
C0/A345:	BE7A08  	LDX $087A,Y
C0/A348:	A9FF    	LDA #$FF
C0/A34A:	9F00207E	STA $7E2000,X
C0/A34E:	B97C08  	LDA $087C,Y
C0/A351:	29F0    	AND #$F0
C0/A353:	997C08  	STA $087C,Y
C0/A356:	A5EB    	LDA $EB
C0/A358:	C910    	CMP #$10
C0/A35A:	B009    	BCS $A365
C0/A35C:	A8      	TAY
C0/A35D:	B95018  	LDA $1850,Y
C0/A360:	297F    	AND #$7F
C0/A362:	995018  	STA $1850,Y
C0/A365:	A902    	LDA #$02
C0/A367:	4C5C9B  	JMP $9B5C

C0/A36A event #$79

C0/A36A:	A400    	LDY $00	
C0/A36C:	B96708  	LDA $0867,Y
C0/A36F:	2940    	AND #$40
C0/A371:	F013    	BEQ $A386
C0/A373:	B96708  	LDA $0867,Y
C0/A376:	2907    	AND #$07
C0/A378:	C5EB    	CMP $EB
C0/A37A:	D00A    	BNE $A386
C0/A37C:	C220    	REP #$20      (16 bit accum./memory)
C0/A37E:	A5EC    	LDA $EC
C0/A380:	998D08  	STA $088D,Y
C0/A383:	7B      	TDC 
C0/A384:	E220    	SEP #$20      (8 bit accum./memory)
C0/A386:	C221    	REP #$21
C0/A388:	98      	TYA
C0/A389:	692900  	ADC #$0029
C0/A38C:	A8      	TAY
C0/A38D:	7B      	TDC 
C0/A38E:	E220    	SEP #$20      (8 bit accum./memory)
C0/A390:	C09002  	CPY #$0290
C0/A393:	D0D7    	BNE $A36C
C0/A395:	A904    	LDA #$04
C0/A397:	4C5C9B  	JMP $9B5C

C0/A39A event #$7E : move character at map

C0/A39A:	C220    	REP #$20      (16 bit accum./memory)
C0/A39C:	A5EB    	LDA $EB
C0/A39E:	29FF00  	AND #$00FF
C0/A3A1:	0A      	ASL A
C0/A3A2:	0A      	ASL A
C0/A3A3:	0A      	ASL A
C0/A3A4:	0A      	ASL A
C0/A3A5:	8526    	STA $26
C0/A3A7:	A5EC    	LDA $EC
C0/A3A9:	29FF00  	AND #$00FF
C0/A3AC:	0A      	ASL A
C0/A3AD:	0A      	ASL A
C0/A3AE:	0A      	ASL A
C0/A3AF:	0A      	ASL A
C0/A3B0:	8528    	STA $28
C0/A3B2:	7B      	TDC 
C0/A3B3:	E220    	SEP #$20      (8 bit accum./memory)
C0/A3B5:	A400    	LDY $00
C0/A3B7:	641B    	STZ $1B
C0/A3B9:	B96708  	LDA $0867,Y
C0/A3BC:	2940    	AND #$40
C0/A3BE:	F03A    	BEQ $A3FA
C0/A3C0:	B96708  	LDA $0867,Y
C0/A3C3:	2907    	AND #$07
C0/A3C5:	CD6D1A  	CMP $1A6D		(Is this the active party?)
C0/A3C8:	D030    	BNE $A3FA
C0/A3CA:	BE7A08  	LDX $087A,Y
C0/A3CD:	BF00207E	LDA $7E2000,X
C0/A3D1:	C51B    	CMP $1B
C0/A3D3:	D006    	BNE $A3DB
C0/A3D5:	A9FF    	LDA #$FF
C0/A3D7:	9F00207E	STA $7E2000,X
C0/A3DB:	C220    	REP #$20      (16 bit accum./memory)
C0/A3DD:	A526    	LDA $26
C0/A3DF:	996A08  	STA $086A,Y
C0/A3E2:	A528    	LDA $28
C0/A3E4:	996D08  	STA $086D,Y
C0/A3E7:	7B      	TDC 
C0/A3E8:	E220    	SEP #$20      (8 bit accum./memory)
C0/A3EA:	996908  	STA $0869,Y
C0/A3ED:	996C08  	STA $086C,Y
C0/A3F0:	A5EB    	LDA $EB
C0/A3F2:	997A08  	STA $087A,Y
C0/A3F5:	A5EC    	LDA $EC
C0/A3F7:	997B08  	STA $087B,Y
C0/A3FA:	C221    	REP #$21
C0/A3FC:	98      	TYA
C0/A3FD:	692900  	ADC #$0029
C0/A400:	A8      	TAY
C0/A401:	7B      	TDC 
C0/A402:	E220    	SEP #$20      (8 bit accum./memory)
C0/A404:	E61B    	INC $1B
C0/A406:	E61B    	INC $1B
C0/A408:	C09002  	CPY #$0290
C0/A40B:	D0AC    	BNE $A3B9
C0/A40D:	A901    	LDA #$01
C0/A40F:	8558    	STA $58
C0/A411:	A5EB    	LDA $EB
C0/A413:	8DC01F  	STA $1FC0
C0/A416:	8D661F  	STA $1F66
C0/A419:	A5EC    	LDA $EC
C0/A41B:	8DC11F  	STA $1FC1
C0/A41E:	8D671F  	STA $1F67
C0/A421:	A901    	LDA #$01
C0/A423:	8584    	STA $84
C0/A425:	A903    	LDA #$03
C0/A427:	4C709B  	JMP $9B70

C0/A42A event #$7A

C0/A42A:	20F09D  	JSR $9DF0
C0/A42D:	A5EC    	LDA $EC
C0/A42F:	998908  	STA $0889,Y
C0/A432:	A5ED    	LDA $ED
C0/A434:	998A08  	STA $088A,Y
C0/A437:	A5EE    	LDA $EE
C0/A439:	998B08  	STA $088B,Y
C0/A43C:	A905    	LDA #$05
C0/A43E:	4C5C9B  	JMP $9B5C

C0/A441 unknow

C0/A441:	AD5D05  	LDA $055D
C0/A444:	CD6D1A  	CMP $1A6D		(Is this the active party?)
C0/A447:	F007    	BEQ $A450
C0/A449:	3A      	DEC A
C0/A44A:	8D6D1A  	STA $1A6D		(Store to active party)
C0/A44D:	20776D  	JSR $6D77
C0/A450:	A901    	LDA #$01
C0/A452:	4C5C9B  	JMP $9B5C

C0/A455 unknow

C0/A455:	20F09D  	JSR $9DF0
C0/A458:	B97C08  	LDA $087C,Y
C0/A45B:	0940    	ORA #$40
C0/A45D:	997C08  	STA $087C,Y
C0/A460:	A902    	LDA #$02
C0/A462:	4C5C9B  	JMP $9B5C

C0/A465 unknow

C0/A465:	20F09D  	JSR $9DF0
C0/A468:	B97C08  	LDA $087C,Y
C0/A46B:	29BF    	AND #$BF
C0/A46D:	997C08  	STA $087C,Y
C0/A470:	A902    	LDA #$02
C0/A472:	4C5C9B  	JMP $9B5C

C0/A475 event #$48 : display dialogue message

C0/A475:	C220    	REP #$20      (16 bit accum./memory)
C0/A477:	A5EB    	LDA $EB
C0/A479:	29FF1F  	AND #$1FFF
C0/A47C:	85D0    	STA $D0
C0/A47E:	7B      	TDC 
C0/A47F:	E220    	SEP #$20      (8 bit accum./memory)
C0/A481:	A5EC    	LDA $EC
C0/A483:	3004    	BMI $A489
C0/A485:	A901    	LDA #$01
C0/A487:	8002    	BRA $A48B
C0/A489:	A912    	LDA #$12
C0/A48B:	85BC    	STA $BC
C0/A48D:	A5EC    	LDA $EC
C0/A48F:	2940    	AND #$40
C0/A491:	4A      	LSR A
C0/A492:	4A      	LSR A
C0/A493:	4A      	LSR A
C0/A494:	4A      	LSR A
C0/A495:	4A      	LSR A
C0/A496:	4A      	LSR A
C0/A497:	8D6405  	STA $0564
C0/A49A:	20BF7F  	JSR $7FBF	(Dialogue message loading function)
C0/A49D:	A901    	LDA #$01
C0/A49F:	85BA    	STA $BA	(Dialogue box open = true)
C0/A4A1:	A903    	LDA #$03
C0/A4A3:	4C5C9B  	JMP $9B5C

C0/A4A6 event #$49 : wait for key press if dialogue is up

C0/A4A6:	A5BA    	LDA $BA	 
C0/A4A8:	F001    	BEQ $A4AB
C0/A4AA:	60      	RTS
C0/A4AB:	A901    	LDA #$01	(from C0/A4A8)
C0/A4AD:	4C5C9B  	JMP $9B5C

C0/A4B0 event #$4A

C0/A4B0:	A5D3    	LDA $D3
C0/A4B2:	C901    	CMP #$01
C0/A4B4:	F001    	BEQ $A4B7
C0/A4B6:	60      	RTS
C0/A4B7:	A901    	LDA #$01	(from C0/A4B4)
C0/A4B9:	4C5C9B  	JMP $9B5C

C0/A4BC event #$4B : pause and show dialogue message until key press

C0/A4BC:	C220    	REP #$20      (16 bit accum./memory)
C0/A4BE:	A5EB    	LDA $EB
C0/A4C0:	29FF1F  	AND #$1FFF
C0/A4C3:	85D0    	STA $D0
C0/A4C5:	7B      	TDC 
C0/A4C6:	E220    	SEP #$20      (8 bit accum./memory)
C0/A4C8:	A5EC    	LDA $EC
C0/A4CA:	3004    	BMI $A4D0
C0/A4CC:	A901    	LDA #$01
C0/A4CE:	8002    	BRA $A4D2
C0/A4D0:	A912    	LDA #$12
C0/A4D2:	85BC    	STA $BC
C0/A4D4:	A5EC    	LDA $EC
C0/A4D6:	2940    	AND #$40
C0/A4D8:	4A      	LSR A
C0/A4D9:	4A      	LSR A
C0/A4DA:	4A      	LSR A
C0/A4DB:	4A      	LSR A
C0/A4DC:	4A      	LSR A
C0/A4DD:	4A      	LSR A
C0/A4DE:	8D6405  	STA $0564
C0/A4E1:	20BF7F  	JSR $7FBF      (Dialogue message loading function)
C0/A4E4:	A901    	LDA #$01
C0/A4E6:	85BA    	STA $BA        (Dialogue box open = true)
C0/A4E8:	A901    	LDA #$01
C0/A4EA:	85EB    	STA $EB
C0/A4EC:	A900    	LDA #$00
C0/A4EE:	85EC    	STA $EC
C0/A4F0:	A900    	LDA #$00
C0/A4F2:	85ED    	STA $ED
C0/A4F4:	A903    	LDA #$03
C0/A4F6:	4CA3B1  	JMP $B1A3

C0/A4F9 event #$4E : invoke random battle for dungeon

C0/A4F9:	E656    	INC $56	
C0/A4FB:	9C8A07  	STZ $078A
C0/A4FE:	A901    	LDA #$01
C0/A500:	4C709B  	JMP $9B70

C0/A503 event #$AF : invoke colosseum battle

C0/A503:	AD0102  	LDA $0201      (load usage bits, tent, warp stone, etc)
C0/A506:	D00D    	BNE $A515      (branch if not 0)
C0/A508:	A23F02  	LDX #$023F     (formation 575)
C0/A50B:	ADD71E  	LDA $1ED7
C0/A50E:	29F7    	AND #$F7
C0/A510:	8DD71E  	STA $1ED7
C0/A513:	800B    	BRA $A520
C0/A515:	A23E02  	LDX #$023E     (formation 574, used for the Shadow Colosseum battle)
C0/A518:	ADD71E  	LDA $1ED7      (load event bits)
C0/A51B:	0908    	ORA #$08
C0/A51D:	8DD71E  	STA $1ED7
C0/A520:	C220    	REP #$20      (16 bit accum./memory)
C0/A522:	8A      	TXA
C0/A523:	8FE01100	STA $0011E0    (save formation)
C0/A527:	A91C00  	LDA #$001C
C0/A52A:	8FE21100	STA $0011E2    (save background)
C0/A52E:	7B      	TDC 
C0/A52F:	E220    	SEP #$20      (8 bit accum./memory)
C0/A531:	A9C0    	LDA #$C0
C0/A533:	8DFA11  	STA $11FA
C0/A536:	ADD71E  	LDA $1ED7      (load event bits)
C0/A539:	2910    	AND #$10       (filter out all bits except bit 4)
C0/A53B:	4A      	LSR A          (move it to bit 3)
C0/A53C:	8FE41100	STA $0011E4
C0/A540:	A901    	LDA #$01
C0/A542:	8556    	STA $56
C0/A544:	A9C0    	LDA #$C0
C0/A546:	8D8A07  	STA $078A
C0/A549:	A901    	LDA #$01
C0/A54B:	4C709B  	JMP $9B70

C0/A54E event #$8E : invoke battle by chest

C0/A54E:	AD8907  	LDA $0789	
C0/A551:	85EB    	STA $EB
C0/A553:	A93F    	LDA #$3F
C0/A555:	85EC    	STA $EC      (background is area default?)
C0/A557:	20A7A5  	JSR $A5A7
C0/A55A:	AE4105  	LDX $0541
C0/A55D:	8E661F  	STX $1F66
C0/A560:	AEAF00  	LDX $00AF
C0/A563:	8EC01F  	STX $1FC0
C0/A566:	A9C0    	LDA #$C0
C0/A568:	8DFA11  	STA $11FA
C0/A56B:	A901    	LDA #$01
C0/A56D:	4C709B  	JMP $9B70

C0/A570 event #$82

C0/A570:	A901    	LDA #$01	
C0/A572:	8D5D05  	STA $055D
C0/A575:	4C5C9B  	JMP $9B5C

C0/A578 event #$4D : invoke battle by enemy formation

C0/A578:	20A7A5  	JSR $A5A7	
C0/A57B:	AE4105  	LDX $0541
C0/A57E:	8E661F  	STX $1F66
C0/A581:	AEAF00  	LDX $00AF
C0/A584:	8EC01F  	STX $1FC0
C0/A587:	A9E0    	LDA #$E0
C0/A589:	8DFA11  	STA $11FA
C0/A58C:	A903    	LDA #$03
C0/A58E:	4C709B  	JMP $9B70

C0/A591 event #$4C : invoke battle and center camera

C0/A591:	20A7A5  	JSR $A5A7	
C0/A594:	AE5705  	LDX $0557
C0/A597:	8E661F  	STX $1F66
C0/A59A:	8EC01F  	STX $1FC0
C0/A59D:	A9C0    	LDA #$C0
C0/A59F:	8DFA11  	STA $11FA
C0/A5A2:	A903    	LDA #$03
C0/A5A4:	4C709B  	JMP $9B70

C0/A5A7 unknow

C0/A5A7:	A5EB    	LDA $EB
C0/A5A9:	C220    	REP #$20       (16 bit accum./memory)
C0/A5AB:	0A      	ASL A
C0/A5AC:	0A      	ASL A
C0/A5AD:	AA      	TAX
C0/A5AE:	7B      	TDC 
C0/A5AF:	E220    	SEP #$20       (8 bit accum./memory)
C0/A5B1:	2096C4  	JSR $C496
C0/A5B4:	C9C0    	CMP #$C0
C0/A5B6:	9002    	BCC $A5BA
C0/A5B8:	E8      	INX
C0/A5B9:	E8      	INX
C0/A5BA:	C220    	REP #$20       (16 bit accum./memory)
C0/A5BC:	BF0050CF	LDA $CF5000,X  (Monster formations used in event scripts)
C0/A5C0:	8FE01100	STA $0011E0    (save formation)
C0/A5C4:	7B      	TDC 
C0/A5C5:	E220    	SEP #$20       (8 bit accum./memory)
C0/A5C7:	A5EC    	LDA $EC
C0/A5C9:	29C0    	AND #$C0
C0/A5CB:	8D8A07  	STA $078A
C0/A5CE:	A5EC    	LDA $EC        (Load the background parameter)
C0/A5D0:	293F    	AND #$3F       (Zero out the upper 3 bits)
C0/A5D2:	C93F    	CMP #$3F       (Is it #$3F [the area default]?)
C0/A5D4:	D005    	BNE $A5DB      (Branch if not)
C0/A5D6:	AD2205  	LDA $0522      (Apparently this holds the area default background index)
C0/A5D9:	297F    	AND #$7F       (Zero out bit 7)
C0/A5DB:	8FE21100	STA $0011E2    (save background)
C0/A5DF:	7B      	TDC 
C0/A5E0:	8FE31100	STA $0011E3
C0/A5E4:	ADD71E  	LDA $1ED7
C0/A5E7:	2910    	AND #$10
C0/A5E9:	4A      	LSR A
C0/A5EA:	8FE41100	STA $0011E4
C0/A5EE:	A901    	LDA #$01
C0/A5F0:	8556    	STA $56
C0/A5F2:	60      	RTS

C0/A5F3 event #$4F : exit current location

C0/A5F3:	A901    	LDA #$01
C0/A5F5:	8DF111  	STA $11F1
C0/A5F8:	A901    	LDA #$01       (A already holds this!)
C0/A5FA:	4C709B  	JMP $9B70

C0/A5FD event #$50 : tint screen

C0/A5FD:	A908    	LDA #$08	
C0/A5FF:	85DF    	STA $DF
C0/A601:	A9F0    	LDA #$F0
C0/A603:	85E0    	STA $E0
C0/A605:	200BA7  	JSR $A70B
C0/A608:	3A      	DEC A
C0/A609:	D005    	BNE $A610
C0/A60B:	204711  	JSR $1147
C0/A60E:	802B    	BRA $A63B
C0/A610:	3A      	DEC A
C0/A611:	D005    	BNE $A618
C0/A613:	208912  	JSR $1289
C0/A616:	8023    	BRA $A63B
C0/A618:	3A      	DEC A
C0/A619:	D005    	BNE $A620
C0/A61B:	208B11  	JSR $118B
C0/A61E:	801B    	BRA $A63B
C0/A620:	3A      	DEC A
C0/A621:	D005    	BNE $A628
C0/A623:	20E511  	JSR $11E5
C0/A626:	8013    	BRA $A63B
C0/A628:	3A      	DEC A
C0/A629:	D005    	BNE $A630
C0/A62B:	20E512  	JSR $12E5
C0/A62E:	800B    	BRA $A63B
C0/A630:	3A      	DEC A
C0/A631:	D005    	BNE $A638
C0/A633:	202F12  	JSR $122F
C0/A636:	8003    	BRA $A63B
C0/A638:	204413  	JSR $1344
C0/A63B:	A902    	LDA #$02
C0/A63D:	4C709B  	JMP $9B70

C0/A640 event #$51 : modify background color

C0/A640:	A5EC    	LDA $EC	
C0/A642:	0A      	ASL A
C0/A643:	85DF    	STA $DF
C0/A645:	A5ED    	LDA $ED
C0/A647:	1A      	INC A
C0/A648:	0A      	ASL A
C0/A649:	85E0    	STA $E0
C0/A64B:	200BA7  	JSR $A70B
C0/A64E:	3A      	DEC A
C0/A64F:	D005    	BNE $A656
C0/A651:	204711  	JSR $1147
C0/A654:	802B    	BRA $A681
C0/A656:	3A      	DEC A
C0/A657:	D005    	BNE $A65E
C0/A659:	208912  	JSR $1289
C0/A65C:	8023    	BRA $A681
C0/A65E:	3A      	DEC A
C0/A65F:	D005    	BNE $A666
C0/A661:	208B11  	JSR $118B
C0/A664:	801B    	BRA $A681
C0/A666:	3A      	DEC A
C0/A667:	D005    	BNE $A66E
C0/A669:	20E511  	JSR $11E5
C0/A66C:	8013    	BRA $A681
C0/A66E:	3A      	DEC A
C0/A66F:	D005    	BNE $A676
C0/A671:	20E512  	JSR $12E5
C0/A674:	800B    	BRA $A681
C0/A676:	3A      	DEC A
C0/A677:	D005    	BNE $A67E
C0/A679:	202F12  	JSR $122F
C0/A67C:	8003    	BRA $A681
C0/A67E:	204413  	JSR $1344
C0/A681:	A904    	LDA #$04
C0/A683:	4C709B  	JMP $9B70

C0/A686 event #$52 : tint objects

C0/A686:	64DF    	STZ $DF	
C0/A688:	64E0    	STZ $E0
C0/A68A:	200BA7  	JSR $A70B
C0/A68D:	3A      	DEC A
C0/A68E:	D005    	BNE $A695
C0/A690:	208F13  	JSR $138F
C0/A693:	802B    	BRA $A6C0
C0/A695:	3A      	DEC A
C0/A696:	D005    	BNE $A69D
C0/A698:	20D114  	JSR $14D1
C0/A69B:	8023    	BRA $A6C0
C0/A69D:	3A      	DEC A
C0/A69E:	D005    	BNE $A6A5
C0/A6A0:	20D313  	JSR $13D3
C0/A6A3:	801B    	BRA $A6C0
C0/A6A5:	3A      	DEC A
C0/A6A6:	D005    	BNE $A6AD
C0/A6A8:	202D14  	JSR $142D
C0/A6AB:	8013    	BRA $A6C0
C0/A6AD:	3A      	DEC A
C0/A6AE:	D005    	BNE $A6B5
C0/A6B0:	202D15  	JSR $152D
C0/A6B3:	800B    	BRA $A6C0
C0/A6B5:	3A      	DEC A
C0/A6B6:	D005    	BNE $A6BD
C0/A6B8:	207714  	JSR $1477
C0/A6BB:	8003    	BRA $A6C0
C0/A6BD:	208C15  	JSR $158C
C0/A6C0:	A902    	LDA #$02
C0/A6C2:	4C709B  	JMP $9B70

C0/A6C5 event #$53 : modify object color range

C0/A6C5:	A5EC    	LDA $EC	
C0/A6C7:	0A      	ASL A
C0/A6C8:	85DF    	STA $DF
C0/A6CA:	A5ED    	LDA $ED
C0/A6CC:	1A      	INC A
C0/A6CD:	0A      	ASL A
C0/A6CE:	85E0    	STA $E0
C0/A6D0:	200BA7  	JSR $A70B
C0/A6D3:	3A      	DEC A
C0/A6D4:	D005    	BNE $A6DB
C0/A6D6:	208F13  	JSR $138F
C0/A6D9:	802B    	BRA $A706
C0/A6DB:	3A      	DEC A
C0/A6DC:	D005    	BNE $A6E3
C0/A6DE:	20D114  	JSR $14D1
C0/A6E1:	8023    	BRA $A706
C0/A6E3:	3A      	DEC A
C0/A6E4:	D005    	BNE $A6EB
C0/A6E6:	20D313  	JSR $13D3
C0/A6E9:	801B    	BRA $A706
C0/A6EB:	3A      	DEC A
C0/A6EC:	D005    	BNE $A6F3
C0/A6EE:	202D14  	JSR $142D
C0/A6F1:	8013    	BRA $A706
C0/A6F3:	3A      	DEC A
C0/A6F4:	D005    	BNE $A6FB
C0/A6F6:	202D15  	JSR $152D
C0/A6F9:	800B    	BRA $A706
C0/A6FB:	3A      	DEC A
C0/A6FC:	D005    	BNE $A703
C0/A6FE:	207714  	JSR $1477
C0/A701:	8003    	BRA $A706
C0/A703:	208C15  	JSR $158C
C0/A706:	A904    	LDA #$04
C0/A708:	4C709B  	JMP $9B70

C0/A70B unknow

C0/A70B:	641A    	STZ $1A
C0/A70D:	641B    	STZ $1B
C0/A70F:	6420    	STZ $20
C0/A711:	6421    	STZ $21
C0/A713:	A5EB    	LDA $EB
C0/A715:	2903    	AND #$03
C0/A717:	0A      	ASL A
C0/A718:	AA      	TAX
C0/A719:	A5EB    	LDA $EB
C0/A71B:	2910    	AND #$10
C0/A71D:	F006    	BEQ $A725
C0/A71F:	BF6CA7C0	LDA $C0A76C,X
C0/A723:	851A    	STA $1A
C0/A725:	A5EB    	LDA $EB
C0/A727:	2908    	AND #$08
C0/A729:	F00B    	BEQ $A736
C0/A72B:	C220    	REP #$20      (16 bit accum./memory)
C0/A72D:	BF7CA7C0	LDA $C0A77C,X
C0/A731:	8520    	STA $20
C0/A733:	7B      	TDC 
C0/A734:	E220    	SEP #$20      (8 bit accum./memory)
C0/A736:	A5EB    	LDA $EB
C0/A738:	2904    	AND #$04
C0/A73A:	F006    	BEQ $A742
C0/A73C:	BF74A7C0	LDA $C0A774,X
C0/A740:	851B    	STA $1B
C0/A742:	A5EB    	LDA $EB
C0/A744:	101E    	BPL $A764
C0/A746:	A51A    	LDA $1A
C0/A748:	4502    	EOR $02
C0/A74A:	291F    	AND #$1F
C0/A74C:	851A    	STA $1A
C0/A74E:	A51B    	LDA $1B
C0/A750:	4502    	EOR $02
C0/A752:	297C    	AND #$7C
C0/A754:	851B    	STA $1B
C0/A756:	C220    	REP #$20      (16 bit accum./memory)
C0/A758:	A520    	LDA $20
C0/A75A:	4502    	EOR $02
C0/A75C:	29E003  	AND #$03E0
C0/A75F:	8520    	STA $20
C0/A761:	7B      	TDC 
C0/A762:	E220    	SEP #$20      (8 bit accum./memory)
C0/A764:	A5EB    	LDA $EB
C0/A766:	4A      	LSR A
C0/A767:	4A      	LSR A
C0/A768:	4A      	LSR A
C0/A769:	4A      	LSR A
C0/A76A:	4A      	LSR A
C0/A76B:	60      	RTS

C0/A76C unknow

C0/A76C:	0400    	TSB $00
C0/A76E:	08      	PHP 
C0/A76F:	0010    	BRK #$10
C0/A771:	001F    	BRK #$1F
C0/A773:	0010    	BRK #$10
C0/A775:	0020    	BRK #$20
C0/A777:	0040    	BRK #$40
C0/A779:	007C    	BRK #$7C
C0/A77B:	0080    	BRK #$80
C0/A77D:	0000    	BRK #$00
C0/A77F:	0100    	ORA ($00,X)
C0/A781:	02E0    	COP #$E0
C0/A783:	03	

C0/A784 event #$54

C0/A784:	644D		STZ $4D	
C0/A786:	644B    	STZ $4B
C0/A788:	A54F    	LDA $4F
C0/A78A:	854E    	STA $4E
C0/A78C:	A553    	LDA $53
C0/A78E:	8552    	STA $52
C0/A790:	A901    	LDA #$01
C0/A792:	4C5C9B  	JMP $9B5C

C0/A795 event #$55 : flash screen

C0/A795:	A54D    	LDA $4D	
C0/A797:	D00A    	BNE $A7A3
C0/A799:	A54E    	LDA $4E
C0/A79B:	854F    	STA $4F
C0/A79D:	A552    	LDA $52
C0/A79F:	8553    	STA $53
C0/A7A1:	6452    	STZ $52
C0/A7A3:	A907    	LDA #$07
C0/A7A5:	854E    	STA $4E
C0/A7A7:	A5EB    	LDA $EB
C0/A7A9:	29E0    	AND #$E0
C0/A7AB:	8554    	STA $54
C0/A7AD:	A9F8    	LDA #$F8
C0/A7AF:	854D    	STA $4D
C0/A7B1:	A908    	LDA #$08
C0/A7B3:	854B    	STA $4B
C0/A7B5:	A902    	LDA #$02
C0/A7B7:	4C5C9B  	JMP $9B5C

C0/A7BA event #$56 : increase color component

C0/A7BA:	A54D    	LDA $4D	
C0/A7BC:	D007    	BNE $A7C5
C0/A7BE:	A5EB    	LDA $EB
C0/A7C0:	202B10  	JSR $102B
C0/A7C3:	8006    	BRA $A7CB
C0/A7C5:	A54B    	LDA $4B
C0/A7C7:	297F    	AND #$7F
C0/A7C9:	854B    	STA $4B
C0/A7CB:	A902    	LDA #$02
C0/A7CD:	4C5C9B  	JMP $9B5C

C0/A7D0 event #$57 : decrease color component

C0/A7D0:	A54D    	LDA $4D	
C0/A7D2:	D007    	BNE $A7DB
C0/A7D4:	A5EB    	LDA $EB
C0/A7D6:	203D10  	JSR $103D
C0/A7D9:	8006    	BRA $A7E1
C0/A7DB:	A54B    	LDA $4B
C0/A7DD:	297F    	AND #$7F
C0/A7DF:	854B    	STA $4B
C0/A7E1:	A902    	LDA #$02
C0/A7E3:	4C5C9B  	JMP $9B5C

C0/A7E6 event #$58 : shake screen

C0/A7E6:	A5EB    	LDA $EB	
C0/A7E8:	8D4A07  	STA $074A
C0/A7EB:	A902    	LDA #$02
C0/A7ED:	4C5C9B  	JMP $9B5C

C0/A7F0 event #$96 : refresh screen

C0/A7F0:	A910    	LDA #$10	
C0/A7F2:	854A    	STA $4A
C0/A7F4:	A910    	LDA #$10
C0/A7F6:	854C    	STA $4C
C0/A7F8:	A901    	LDA #$01
C0/A7FA:	4C5C9B  	JMP $9B5C

C0/A7FD event #$97 : instant fade screen

C0/A7FD:	A990    	LDA #$90
C0/A7FF:	854A    	STA $4A
C0/A801:	A9F0    	LDA #$F0
C0/A803:	854C    	STA $4C
C0/A805:	A901    	LDA #$01
C0/A807:	4C5C9B  	JMP $9B5C

C0/A80A event #$59 : unfade screen

C0/A80A:	A5EB    	LDA $EB	
C0/A80C:	854A    	STA $4A
C0/A80E:	A910    	LDA #$10
C0/A810:	854C    	STA $4C
C0/A812:	A902    	LDA #$02
C0/A814:	4C5C9B  	JMP $9B5C

C0/A817 event #$5A : fade screen

C0/A817:	A5EB    	LDA $EB	
C0/A819:	0980    	ORA #$80
C0/A81B:	854A    	STA $4A
C0/A81D:	A9F0    	LDA #$F0
C0/A81F:	854C    	STA $4C
C0/A821:	A902    	LDA #$02
C0/A823:	4C5C9B  	JMP $9B5C

C0/A826 event #$5B

C0/A826:	644A    	STZ $4A	
C0/A828:	A901    	LDA #$01
C0/A82A:	4C5C9B  	JMP $9B5C

C0/A82D event #$5C

C0/A82D:	A5E1    	LDA $E1	
C0/A82F:	0940    	ORA #$40
C0/A831:	85E1    	STA $E1
C0/A833:	A901    	LDA #$01
C0/A835:	4C5C9B  	JMP $9B5C

C0/A838 event #$5D : scroll BG0

C0/A838:	A5EB    	LDA $EB
C0/A83A:	300E    	BMI $A84A
C0/A83C:	C220    	REP #$20      (16 bit accum./memory)
C0/A83E:	0A      	ASL A
C0/A83F:	0A      	ASL A
C0/A840:	0A      	ASL A
C0/A841:	0A      	ASL A
C0/A842:	8D4705  	STA $0547
C0/A845:	7B      	TDC 
C0/A846:	E220    	SEP #$20      (8 bit accum./memory)
C0/A848:	8010    	BRA $A85A
C0/A84A:	4502    	EOR $02
C0/A84C:	C220    	REP #$20      (16 bit accum./memory)
C0/A84E:	0A      	ASL A
C0/A84F:	0A      	ASL A
C0/A850:	0A      	ASL A
C0/A851:	0A      	ASL A
C0/A852:	4502    	EOR $02
C0/A854:	8D4705  	STA $0547
C0/A857:	7B      	TDC 
C0/A858:	E220    	SEP #$20      (8 bit accum./memory)
C0/A85A:	A5EC    	LDA $EC
C0/A85C:	300E    	BMI $A86C
C0/A85E:	C220    	REP #$20      (16 bit accum./memory)
C0/A860:	0A      	ASL A
C0/A861:	0A      	ASL A
C0/A862:	0A      	ASL A
C0/A863:	0A      	ASL A
C0/A864:	8D4905  	STA $0549
C0/A867:	7B      	TDC 
C0/A868:	E220    	SEP #$20      (8 bit accum./memory)
C0/A86A:	8010    	BRA $A87C
C0/A86C:	4502    	EOR $02
C0/A86E:	C220    	REP #$20      (16 bit accum./memory)
C0/A870:	0A      	ASL A
C0/A871:	0A      	ASL A
C0/A872:	0A      	ASL A
C0/A873:	0A      	ASL A
C0/A874:	4502    	EOR $02
C0/A876:	8D4905  	STA $0549
C0/A879:	7B      	TDC 
C0/A87A:	E220    	SEP #$20      (8 bit accum./memory)
C0/A87C:	A903    	LDA #$03
C0/A87E:	4C5C9B  	JMP $9B5C

C0/A881 event #$70 : scroll background 0

C0/A881:	A5EB    	LDA $EB
C0/A883:	300E    	BMI $A893
C0/A885:	C220    	REP #$20      (16 bit accum./memory)
C0/A887:	0A      	ASL A
C0/A888:	0A      	ASL A
C0/A889:	0A      	ASL A
C0/A88A:	0A      	ASL A
C0/A88B:	8D4705  	STA $0547
C0/A88E:	7B      	TDC 
C0/A88F:	E220    	SEP #$20      (8 bit accum./memory)
C0/A891:	8012    	BRA $A8A5
C0/A893:	4502    	EOR $02
C0/A895:	1A      	INC A
C0/A896:	C220    	REP #$20      (16 bit accum./memory)
C0/A898:	0A      	ASL A
C0/A899:	0A      	ASL A
C0/A89A:	0A      	ASL A
C0/A89B:	0A      	ASL A
C0/A89C:	4502    	EOR $02
C0/A89E:	1A      	INC A
C0/A89F:	8D4705  	STA $0547
C0/A8A2:	7B      	TDC 
C0/A8A3:	E220    	SEP #$20      (8 bit accum./memory)
C0/A8A5:	A5EC    	LDA $EC
C0/A8A7:	300E    	BMI $A8B7
C0/A8A9:	C220    	REP #$20      (16 bit accum./memory)
C0/A8AB:	0A      	ASL A
C0/A8AC:	0A      	ASL A
C0/A8AD:	0A      	ASL A
C0/A8AE:	0A      	ASL A
C0/A8AF:	8D4905  	STA $0549
C0/A8B2:	7B      	TDC 
C0/A8B3:	E220    	SEP #$20      (8 bit accum./memory)
C0/A8B5:	8012    	BRA $A8C9
C0/A8B7:	4502    	EOR $02
C0/A8B9:	1A      	INC A
C0/A8BA:	C220    	REP #$20      (16 bit accum./memory)
C0/A8BC:	0A      	ASL A
C0/A8BD:	0A      	ASL A
C0/A8BE:	0A      	ASL A
C0/A8BF:	0A      	ASL A
C0/A8C0:	4502    	EOR $02
C0/A8C2:	1A      	INC A
C0/A8C3:	8D4905  	STA $0549
C0/A8C6:	7B      	TDC 
C0/A8C7:	E220    	SEP #$20      (8 bit accum./memory)
C0/A8C9:	A903    	LDA #$03
C0/A8CB:	4C5C9B  	JMP $9B5C

C0/A8CE event #$5E : scroll BG1

C0/A8CE:	A5EB    	LDA $EB
C0/A8D0:	300E    	BMI $A8E0
C0/A8D2:	C220    	REP #$20      (16 bit accum./memory)
C0/A8D4:	0A      	ASL A
C0/A8D5:	0A      	ASL A
C0/A8D6:	0A      	ASL A
C0/A8D7:	0A      	ASL A
C0/A8D8:	8D4B05  	STA $054B
C0/A8DB:	7B      	TDC 
C0/A8DC:	E220    	SEP #$20      (8 bit accum./memory)
C0/A8DE:	8010    	BRA $A8F0
C0/A8E0:	4502    	EOR $02
C0/A8E2:	C220    	REP #$20      (16 bit accum./memory)
C0/A8E4:	0A      	ASL A
C0/A8E5:	0A      	ASL A
C0/A8E6:	0A      	ASL A
C0/A8E7:	0A      	ASL A
C0/A8E8:	4502    	EOR $02
C0/A8EA:	8D4B05  	STA $054B
C0/A8ED:	7B      	TDC 
C0/A8EE:	E220    	SEP #$20      (8 bit accum./memory)
C0/A8F0:	A5EC    	LDA $EC
C0/A8F2:	300E    	BMI $A902
C0/A8F4:	C220    	REP #$20      (16 bit accum./memory)
C0/A8F6:	0A      	ASL A
C0/A8F7:	0A      	ASL A
C0/A8F8:	0A      	ASL A
C0/A8F9:	0A      	ASL A
C0/A8FA:	8D4D05  	STA $054D
C0/A8FD:	7B      	TDC 
C0/A8FE:	E220    	SEP #$20      (8 bit accum./memory)
C0/A900:	8010    	BRA $A912
C0/A902:	4502    	EOR $02
C0/A904:	C220    	REP #$20      (16 bit accum./memory)
C0/A906:	0A      	ASL A
C0/A907:	0A      	ASL A
C0/A908:	0A      	ASL A
C0/A909:	0A      	ASL A
C0/A90A:	4502    	EOR $02
C0/A90C:	8D4D05  	STA $054D
C0/A90F:	7B      	TDC 
C0/A910:	E220    	SEP #$20      (8 bit accum./memory)
C0/A912:	A903    	LDA #$03
C0/A914:	4C5C9B  	JMP $9B5C

C0/A917 event #$71 : scroll background 1

C0/A917:	A5EB    	LDA $EB
C0/A919:	300E    	BMI $A929
C0/A91B:	C220    	REP #$20      (16 bit accum./memory)
C0/A91D:	0A      	ASL A
C0/A91E:	0A      	ASL A
C0/A91F:	0A      	ASL A
C0/A920:	0A      	ASL A
C0/A921:	8D4B05  	STA $054B
C0/A924:	7B      	TDC 
C0/A925:	E220    	SEP #$20      (8 bit accum./memory)
C0/A927:	8012    	BRA $A93B
C0/A929:	4502    	EOR $02
C0/A92B:	1A      	INC A
C0/A92C:	C220    	REP #$20      (16 bit accum./memory)
C0/A92E:	0A      	ASL A
C0/A92F:	0A      	ASL A
C0/A930:	0A      	ASL A
C0/A931:	0A      	ASL A
C0/A932:	4502    	EOR $02
C0/A934:	1A      	INC A
C0/A935:	8D4B05  	STA $054B
C0/A938:	7B      	TDC 
C0/A939:	E220    	SEP #$20      (8 bit accum./memory)
C0/A93B:	A5EC    	LDA $EC
C0/A93D:	300E    	BMI $A94D
C0/A93F:	C220    	REP #$20      (16 bit accum./memory)
C0/A941:	0A      	ASL A
C0/A942:	0A      	ASL A
C0/A943:	0A      	ASL A
C0/A944:	0A      	ASL A
C0/A945:	8D4D05  	STA $054D
C0/A948:	7B      	TDC 
C0/A949:	E220    	SEP #$20      (8 bit accum./memory)
C0/A94B:	8012    	BRA $A95F
C0/A94D:	4502    	EOR $02
C0/A94F:	1A      	INC A
C0/A950:	C220    	REP #$20      (16 bit accum./memory)
C0/A952:	0A      	ASL A
C0/A953:	0A      	ASL A
C0/A954:	0A      	ASL A
C0/A955:	0A      	ASL A
C0/A956:	4502    	EOR $02
C0/A958:	1A      	INC A
C0/A959:	8D4D05  	STA $054D
C0/A95C:	7B      	TDC 
C0/A95D:	E220    	SEP #$20      (8 bit accum./memory)
C0/A95F:	A903    	LDA #$03
C0/A961:	4C5C9B  	JMP $9B5C

C0/A964 event #$5F : scroll BG2

C0/A964:	A5EB    	LDA $EB
C0/A966:	300E    	BMI $A976
C0/A968:	C220    	REP #$20      (16 bit accum./memory)
C0/A96A:	0A      	ASL A
C0/A96B:	0A      	ASL A
C0/A96C:	0A      	ASL A
C0/A96D:	0A      	ASL A
C0/A96E:	8D4F05  	STA $054F
C0/A971:	7B      	TDC 
C0/A972:	E220    	SEP #$20      (8 bit accum./memory)
C0/A974:	8010    	BRA $A986
C0/A976:	4502    	EOR $02
C0/A978:	C220    	REP #$20      (16 bit accum./memory)
C0/A97A:	0A      	ASL A
C0/A97B:	0A      	ASL A
C0/A97C:	0A      	ASL A
C0/A97D:	0A      	ASL A
C0/A97E:	4502    	EOR $02
C0/A980:	8D4F05  	STA $054F
C0/A983:	7B      	TDC 
C0/A984:	E220    	SEP #$20      (8 bit accum./memory)
C0/A986:	A5EC    	LDA $EC
C0/A988:	300E    	BMI $A998
C0/A98A:	C220    	REP #$20      (16 bit accum./memory)
C0/A98C:	0A      	ASL A
C0/A98D:	0A      	ASL A
C0/A98E:	0A      	ASL A
C0/A98F:	0A      	ASL A
C0/A990:	8D5105  	STA $0551
C0/A993:	7B      	TDC 
C0/A994:	E220    	SEP #$20      (8 bit accum./memory)
C0/A996:	8010    	BRA $A9A8
C0/A998:	4502    	EOR $02
C0/A99A:	C220    	REP #$20      (16 bit accum./memory)
C0/A99C:	0A      	ASL A
C0/A99D:	0A      	ASL A
C0/A99E:	0A      	ASL A
C0/A99F:	0A      	ASL A
C0/A9A0:	4502    	EOR $02
C0/A9A2:	8D5105  	STA $0551
C0/A9A5:	7B      	TDC 
C0/A9A6:	E220    	SEP #$20      (8 bit accum./memory)
C0/A9A8:	A903    	LDA #$03
C0/A9AA:	4C5C9B  	JMP $9B5C

C0/A9AD event #$72 : scroll background 2

C0/A9AD:	A5EB    	LDA $EB
C0/A9AF:	300E    	BMI $A9BF
C0/A9B1:	C220    	REP #$20      (16 bit accum./memory)
C0/A9B3:	0A      	ASL A
C0/A9B4:	0A      	ASL A
C0/A9B5:	0A      	ASL A
C0/A9B6:	0A      	ASL A
C0/A9B7:	8D4F05  	STA $054F
C0/A9BA:	7B      	TDC 
C0/A9BB:	E220    	SEP #$20      (8 bit accum./memory)
C0/A9BD:	8012    	BRA $A9D1
C0/A9BF:	4502    	EOR $02
C0/A9C1:	1A      	INC A
C0/A9C2:	C220    	REP #$20      (16 bit accum./memory)
C0/A9C4:	0A      	ASL A
C0/A9C5:	0A      	ASL A
C0/A9C6:	0A      	ASL A
C0/A9C7:	0A      	ASL A
C0/A9C8:	4502    	EOR $02
C0/A9CA:	1A      	INC A
C0/A9CB:	8D4F05  	STA $054F
C0/A9CE:	7B      	TDC 
C0/A9CF:	E220    	SEP #$20      (8 bit accum./memory)
C0/A9D1:	A5EC    	LDA $EC
C0/A9D3:	300E    	BMI $A9E3
C0/A9D5:	C220    	REP #$20      (16 bit accum./memory)
C0/A9D7:	0A      	ASL A
C0/A9D8:	0A      	ASL A
C0/A9D9:	0A      	ASL A
C0/A9DA:	0A      	ASL A
C0/A9DB:	8D5105  	STA $0551
C0/A9DE:	7B      	TDC 
C0/A9DF:	E220    	SEP #$20      (8 bit accum./memory)
C0/A9E1:	8012    	BRA $A9F5
C0/A9E3:	4502    	EOR $02
C0/A9E5:	1A      	INC A
C0/A9E6:	C220    	REP #$20      (16 bit accum./memory)
C0/A9E8:	0A      	ASL A
C0/A9E9:	0A      	ASL A
C0/A9EA:	0A      	ASL A
C0/A9EB:	0A      	ASL A
C0/A9EC:	4502    	EOR $02
C0/A9EE:	1A      	INC A
C0/A9EF:	8D5105  	STA $0551
C0/A9F2:	7B      	TDC 
C0/A9F3:	E220    	SEP #$20      (8 bit accum./memory)
C0/A9F5:	A903    	LDA #$03
C0/A9F7:	4C5C9B  	JMP $9B5C

C0/A9FA event #$60 : change background palette

C0/A9FA:	C220    	REP #$20      (16 bit accum./memory)
C0/A9FC:	A5EB    	LDA $EB
C0/A9FE:	29FF00  	AND #$00FF
C0/AA01:	0A      	ASL A
C0/AA02:	0A      	ASL A
C0/AA03:	0A      	ASL A
C0/AA04:	0A      	ASL A
C0/AA05:	0A      	ASL A
C0/AA06:	A8      	TAY
C0/AA07:	A5EC    	LDA $EC
C0/AA09:	29FF00  	AND #$00FF
C0/AA0C:	0A      	ASL A
C0/AA0D:	0A      	ASL A
C0/AA0E:	0A      	ASL A
C0/AA0F:	0A      	ASL A
C0/AA10:	0A      	ASL A
C0/AA11:	AA      	TAX
C0/AA12:	7B      	TDC 
C0/AA13:	E220    	SEP #$20      (8 bit accum./memory)
C0/AA15:	A97E    	LDA #$7E
C0/AA17:	48      	PHA
C0/AA18:	AB      	PLB
C0/AA19:	C220    	REP #$20      (16 bit accum./memory)
C0/AA1B:	A91000  	LDA #$0010
C0/AA1E:	851E    	STA $1E
C0/AA20:	BF0080E6	LDA $E68000,X	(Map character and townsperson sprite palettes)
C0/AA24:	990072  	STA $7200,Y
C0/AA27:	990074  	STA $7400,Y
C0/AA2A:	E8      	INX
C0/AA2B:	E8      	INX
C0/AA2C:	C8      	INY 
C0/AA2D:	C8      	INY 
C0/AA2E:	C61E    	DEC $1E
C0/AA30:	D0EE    	BNE $AA20
C0/AA32:	7B      	TDC 
C0/AA33:	E220    	SEP #$20      (8 bit accum./memory)
C0/AA35:	7B      	TDC 
C0/AA36:	48      	PHA
C0/AA37:	AB      	PLB
C0/AA38:	A903    	LDA #$03
C0/AA3A:	4C5C9B  	JMP $9B5C

C0/AA3D event #$61 : colorize

C0/AA3D:	A5EB    	LDA $EB
C0/AA3F:	0A      	ASL A
C0/AA40:	AA      	TAX
C0/AA41:	C220    	REP #$20      (16 bit accum./memory)
C0/AA47:	8520    	STA $20
C0/AA49:	7B      	TDC 
C0/AA4A:	E220    	SEP #$20      (8 bit accum./memory)
C0/AA4C:	A5ED    	LDA $ED
C0/AA4E:	1A      	INC A
C0/AA4F:	38      	SEC 
C0/AA50:	E5EC    	SBC $EC
C0/AA52:	A8      	TAY
C0/AA53:	A5EC    	LDA $EC
C0/AA55:	C220    	REP #$20      (16 bit accum./memory)
C0/AA57:	0A      	ASL A
C0/AA58:	AA      	TAX
C0/AA59:	7B      	TDC 
C0/AA5A:	E220    	SEP #$20      (8 bit accum./memory)
C0/AA5C:	BF00727E	LDA $7E7200,X
C0/AA60:	291F    	AND #$1F
C0/AA62:	851E    	STA $1E
C0/AA64:	BF01727E	LDA $7E7201,X
C0/AA68:	4A      	LSR A
C0/AA69:	4A      	LSR A
C0/AA6A:	291F    	AND #$1F
C0/AA6C:	18      	CLC
C0/AA6D:	651E    	ADC $1E
C0/AA6F:	851E    	STA $1E
C0/AA71:	641F    	STZ $1F
C0/AA73:	C220    	REP #$20      (16 bit accum./memory)
C0/AA75:	BF00727E	LDA $7E7200,X
C0/AA79:	0A      	ASL A
C0/AA7A:	0A      	ASL A
C0/AA7B:	0A      	ASL A
C0/AA7C:	EB      	XBA
C0/AA7D:	291F00  	AND #$001F
C0/AA80:	18      	CLC
C0/AA81:	651E    	ADC $1E
C0/AA83:	8D0442  	STA $4204
C0/AA86:	E220    	SEP #$20      (8 bit accum./memory)
C0/AA88:	A903    	LDA #$03
C0/AA8A:	8D0642  	STA $4206
C0/AA8D:	EA      	NOP
C0/AA8E:	EA      	NOP
C0/AA8F:	EA      	NOP
C0/AA90:	EA      	NOP
C0/AA91:	EA      	NOP
C0/AA92:	E8      	INX
C0/AA93:	E8      	INX
C0/AA94:	AD1442  	LDA $4214
C0/AA97:	0A      	ASL A
C0/AA98:	0A      	ASL A
C0/AA99:	EB      	XBA
C0/AA9A:	AD1442  	LDA $4214
C0/AA9D:	C220    	REP #$20      (16 bit accum./memory)
C0/AA9F:	851E    	STA $1E
C0/AAA1:	AD1442  	LDA $4214
C0/AAA4:	EB      	XBA
C0/AAA5:	4A      	LSR A
C0/AAA6:	4A      	LSR A
C0/AAA7:	4A      	LSR A
C0/AAA8:	051E    	ORA $1E
C0/AAAA:	2520    	AND $20
C0/AAB0:	7B      	TDC 
C0/AAB1:	E220    	SEP #$20      (8 bit accum./memory)
C0/AAB3:	88      	DEY 
C0/AAB4:	D0A6    	BNE $AA5C
C0/AAB6:	A904    	LDA #$04
C0/AAB8:	4C5C9B  	JMP $9B5C

C0/AABB unknow

C0/AABB:	0000    	BRK #$00
C0/AABD:	1F00E003	ORA $03E000,X
C0/AAC1:	FF03007C	SBC $7C0003,X
C0/AAC5:	1F7CE07F	ORA $7FE07C,X

C0/AACB event #$62 : mosaic screen

C0/AACD:	8DF011  	STA $11F0
C0/AAD0:	A2001E  	LDX #$1E00
C0/AAD3:	8E9607  	STX $0796
C0/AAD6:	A902    	LDA #$02
C0/AAD8:	4C5C9B  	JMP $9B5C

C0/AADB event #$63 : create spotlight effect

C0/AADD:	291F    	AND #$1F
C0/AADF:	0980    	ORA #$80
C0/AAE1:	8D7B07  	STA $077B
C0/AAE4:	A902    	LDA #$02
C0/AAE6:	4C5C9B  	JMP $9B5C

C0/AAE9 event #$64

C0/AAE9:	A5EB    	LDA $EB
C0/AAEB:	8D0242  	STA $4202
C0/AAEE:	A90D    	LDA #$0D
C0/AAF0:	8D0342  	STA $4203
C0/AAF3:	EA      	NOP
C0/AAF4:	EA      	NOP
C0/AAF5:	EA      	NOP
C0/AAF6:	AE1642  	LDX $4216
C0/AAF9:	A5EC    	LDA $EC
C0/AAFB:	2903    	AND #$03
C0/AAFD:	0A      	ASL A
C0/AAFE:	9D6910  	STA $1069,X
C0/AB01:	9E6A10  	STZ $106A,X
C0/AB04:	A903    	LDA #$03
C0/AB06:	4C5C9B  	JMP $9B5C

C0/AB09 event #$65

C0/AB09:	A5EB    	LDA $EB
C0/AB0B:	8D0242  	STA $4202
C0/AB0E:	A90D    	LDA #$0D	  (13)
C0/AB10:	8D0342  	STA $4203
C0/AB13:	EA      	NOP
C0/AB14:	EA      	NOP
C0/AB15:	EA      	NOP
C0/AB16:	AE1642  	LDX $4216
C0/AB19:	A5EC    	LDA $EC
C0/AB1B:	297F    	AND #$7F
C0/AB1D:	C220    	REP #$20      (16 bit accum./memory)
C0/AB1F:	0A      	ASL A
C0/AB20:	0A      	ASL A
C0/AB21:	0A      	ASL A
C0/AB22:	0A      	ASL A
C0/AB23:	851E    	STA $1E
C0/AB25:	7B      	TDC 
C0/AB26:	E220    	SEP #$20      (8 bit accum./memory)
C0/AB28:	A5EC    	LDA $EC
C0/AB2A:	100C    	BPL $AB38
C0/AB2C:	C220    	REP #$20      (16 bit accum./memory)
C0/AB2E:	A51E    	LDA $1E
C0/AB30:	4502    	EOR $02        (#$FF...)
C0/AB32:	1A      	INC A          (subtract 255 and add 1...)
C0/AB33:	851E    	STA $1E
C0/AB35:	7B      	TDC            (pointless?)
C0/AB36:	E220    	SEP #$20       (and pointless again?)
C0/AB38:	C220    	REP #$20      (16 bit accum./memory)
C0/AB3A:	A51E    	LDA $1E
C0/AB3C:	9D6B10  	STA $106B,X
C0/AB3F:	7B      	TDC 
C0/AB40:	E220    	SEP #$20      (8 bit accum./memory)
C0/AB42:	A903    	LDA #$03
C0/AB44:	4C5C9B  	JMP $9B5C

C0/AB47 event #$6A : loads map and set party position at vehicle

C0/AB47:	20886E  	JSR $6E88	
C0/AB4A:	20560F  	JSR $0F56	
C0/AB4D:	A5E1    	LDA $E1	
C0/AB4F:	0940    	ORA #$40
C0/AB51:	85E1    	STA $E1
C0/AB53:	8005    	BRA $AB5A

C0/AB55 event #$6B : loads map and positions party

C0/AB55:	20886E  	JSR $6E88	
C0/AB58:	644A    	STZ $4A
C0/AB5A:	A901    	LDA #$01
C0/AB5C:	8584    	STA $84
C0/AB5E:	A5EF    	LDA $EF
C0/AB60:	8DFA11  	STA $11FA
C0/AB63:	C220    	REP #$20      (16 bit accum./memory)
C0/AB65:	A5EB    	LDA $EB
C0/AB67:	290002  	AND #$0200
C0/AB6A:	F00D    	BEQ $AB79
C0/AB6C:	A5EB    	LDA $EB
C0/AB6E:	29FF01  	AND #$01FF
C0/AB71:	8D691F  	STA $1F69
C0/AB74:	A5ED    	LDA $ED
C0/AB76:	8D6B1F  	STA $1F6B
C0/AB79:	A5EB    	LDA $EB
C0/AB7B:	8D641F  	STA $1F64
C0/AB7E:	29FF01  	AND #$01FF
C0/AB81:	C9FF01  	CMP #$01FF
C0/AB84:	F047    	BEQ $ABCD
C0/AB86:	C9FE01  	CMP #$01FE
C0/AB89:	F047    	BEQ $ABD2
C0/AB8B:	AA      	TAX
C0/AB8C:	7B      	TDC 
C0/AB8D:	E220    	SEP #$20      (8 bit accum./memory)
C0/AB8F:	E00300  	CPX #$0003
C0/AB92:	B01B    	BCS $ABAF
C0/AB94:	A6ED    	LDX $ED
C0/AB96:	8E601F  	STX $1F60
C0/AB99:	C221    	REP #$21
C0/AB9B:	A5E5    	LDA $E5
C0/AB9D:	690600  	ADC #$0006
C0/ABA0:	8DFD11  	STA $11FD
C0/ABA3:	E220    	SEP #$20      (8 bit accum./memory)
C0/ABA5:	A5E7    	LDA $E7
C0/ABA7:	6900    	ADC #$00
C0/ABA9:	8DFF11  	STA $11FF
C0/ABAC:	7B      	TDC 
C0/ABAD:	8057    	BRA $AC06
C0/ABB1:	8DC01F  	STA $1FC0
C0/ABB4:	A5EE    	LDA $EE
C0/ABB6:	8DC11F  	STA $1FC1
C0/ABB9:	A5EC    	LDA $EC
C0/ABBB:	2930    	AND #$30
C0/ABBD:	4A      	LSR A
C0/ABBE:	4A      	LSR A
C0/ABBF:	4A      	LSR A
C0/ABC0:	4A      	LSR A
C0/ABC1:	8D4307  	STA $0743
C0/ABC4:	A5EC    	LDA $EC
C0/ABC6:	2908    	AND #$08
C0/ABC8:	8D4507  	STA $0745      (set location name to appear when map loads)
C0/ABCB:	8039    	BRA $AC06
Map #$01FF jumps here
C0/ABCD:	20461A  	JSR $1A46
C0/ABD0:	8009    	BRA $ABDB
Map #$01FE jumps here
C0/ABD2:	7B      	TDC 
C0/ABD3:	E220    	SEP #$20      (8 bit accum./memory)
C0/ABD5:	ADD21F  	LDA $1FD2
C0/ABD8:	8D681F  	STA $1F68
C0/ABDB:	C220    	REP #$20      (16 bit accum./memory)
C0/ABDF:	2900FE  	AND #$FE00
C0/ABE2:	0D691F  	ORA $1F69
C0/ABE5:	8D641F  	STA $1F64
C0/ABE8:	29FF01  	AND #$01FF
C0/ABEB:	C90300  	CMP #$0003
C0/ABF0:	AD6B1F  	LDA $1F6B
C0/ABF3:	8D601F  	STA $1F60
C0/ABF6:	7B      	TDC 
C0/ABF7:	E220    	SEP #$20      (8 bit accum./memory)
C0/ABF9:	809E    	BRA $AB99
C0/ABFE:	8DC01F  	STA $1FC0
C0/AC01:	7B      	TDC 
C0/AC02:	E220    	SEP #$20      (8 bit accum./memory)
C0/AC04:	80B3    	BRA $ABB9
C0/AC06:	A906    	LDA #$06
C0/AC08:	4C709B  	JMP $9B70

C0/AC0B event #$6C : set parent map and position

C0/AC0B:	A4EB    	LDY $EB
C0/AC0D:	8C691F  	STY $1F69
C0/AC10:	A4ED    	LDY $ED
C0/AC12:	8C6B1F  	STY $1F6B
C0/AC15:	A5EF    	LDA $EF
C0/AC17:	8DD21F  	STA $1FD2
C0/AC1A:	A906    	LDA #$06
C0/AC1C:	4C5C9B  	JMP $9B5C

C0/AC1F event #$75 : refresh background after map changes

C0/AC1F:	AD5A05  	LDA $055A
C0/AC22:	C905    	CMP #$05
C0/AC24:	D004    	BNE $AC2A
C0/AC26:	3A      	DEC A
C0/AC27:	8D5A05  	STA $055A
C0/AC2A:	AD5B05  	LDA $055B
C0/AC2D:	C905    	CMP #$05
C0/AC2F:	D004    	BNE $AC35
C0/AC31:	3A      	DEC A
C0/AC32:	8D5B05  	STA $055B
C0/AC35:	AD5C05  	LDA $055C
C0/AC38:	C905    	CMP #$05
C0/AC3A:	D004    	BNE $AC40
C0/AC3C:	3A      	DEC A
C0/AC3D:	8D5C05  	STA $055C
C0/AC40:	A901    	LDA #$01
C0/AC42:	4C709B  	JMP $9B70

C0/AC45 event #$73

C0/AC45:	A5EC    	LDA $EC
C0/AC47:	29C0    	AND #$C0
C0/AC49:	D007    	BNE $AC52
C0/AC4B:	A904    	LDA #$04
C0/AC4D:	8D5A05  	STA $055A
C0/AC50:	8010    	BRA $AC62
C0/AC52:	C940    	CMP #$40
C0/AC54:	D007    	BNE $AC5D
C0/AC56:	A904    	LDA #$04
C0/AC58:	8D5B05  	STA $055B
C0/AC5B:	8005    	BRA $AC62
C0/AC5D:	A904    	LDA #$04
C0/AC5F:	8D5C05  	STA $055C

C0/AC62 event #$74

C0/AC62:	A5EC    	LDA $EC
C0/AC64:	29C0    	AND #$C0
C0/AC66:	D00E    	BNE $AC76
C0/AC68:	AD5A05  	LDA $055A
C0/AC6B:	C904    	CMP #$04
C0/AC6D:	F025    	BEQ $AC94
C0/AC6F:	A905    	LDA #$05
C0/AC71:	8D5A05  	STA $055A
C0/AC74:	801E    	BRA $AC94
C0/AC76:	C940    	CMP #$40
C0/AC78:	D00E    	BNE $AC88
C0/AC7A:	AD5B05  	LDA $055B
C0/AC7D:	C904    	CMP #$04
C0/AC7F:	F013    	BEQ $AC94
C0/AC81:	A905    	LDA #$05
C0/AC83:	8D5B05  	STA $055B
C0/AC86:	800C    	BRA $AC94
C0/AC88:	AD5C05  	LDA $055C
C0/AC8B:	C904    	CMP #$04
C0/AC8D:	F005    	BEQ $AC94
C0/AC8F:	A905    	LDA #$05
C0/AC91:	8D5C05  	STA $055C
C0/AC94:	A5EB    	LDA $EB
C0/AC96:	858F    	STA $8F
C0/AC98:	A5EC    	LDA $EC
C0/AC9A:	293F    	AND #$3F
C0/AC9C:	8590    	STA $90
C0/AC9E:	C221    	REP #$21
C0/ACA0:	A5E5    	LDA $E5
C0/ACA2:	690300  	ADC #$0003
C0/ACA5:	858C    	STA $8C
C0/ACA7:	E220    	SEP #$20      (8 bit accum./memory)
C0/ACA9:	A5E7    	LDA $E7
C0/ACAB:	6900    	ADC #$00
C0/ACAD:	858E    	STA $8E
C0/ACB1:	8D0242  	STA $4202
C0/ACB4:	A5EE    	LDA $EE
C0/ACB6:	8D0342  	STA $4203
C0/ACB9:	EA      	NOP
C0/ACBA:	EA      	NOP
C0/ACBB:	C221    	REP #$21
C0/ACBD:	AD1642  	LDA $4216
C0/ACC0:	690200  	ADC #$0002
C0/ACC3:	658C    	ADC $8C
C0/ACC5:	85E5    	STA $E5
C0/ACC7:	E220    	SEP #$20      (8 bit accum./memory)
C0/ACC9:	A58E    	LDA $8E
C0/ACCB:	6900    	ADC #$00
C0/ACCD:	85E7    	STA $E7
C0/ACCF:	7B      	TDC 
C0/ACD0:	A5EC    	LDA $EC
C0/ACD2:	29C0    	AND #$C0
C0/ACD4:	D008    	BNE $ACDE
C0/ACD6:	A20000  	LDX #$0000
C0/ACD9:	862A    	STX $2A
C0/ACDB:	4CC41E  	JMP $1EC4
C0/ACDE:	3008    	BMI $ACE8
C0/ACE0:	A20040  	LDX #$4000
C0/ACE3:	862A    	STX $2A	(branching to ACD9 would save 3 bytes)
C0/ACE5:	4CC41E  	JMP $1EC4	
C0/ACE8:	A20080  	LDX #$8000
C0/ACEB:	862A    	STX $2A	(branching to ACD9 would save 3 bytes)
C0/ACED:	4CC41E  	JMP $1EC4	

C0/ACF0 event #$80 : add item to inventory

C0/ACF0:	A5EB    	LDA $EB		(Get the item's index)
C0/ACF2:	851A    	STA $1A		(Store it in $1A temporarily)
C0/ACF4:	20FCAC  	JSR $ACFC		(Go to below function)
C0/ACF7:	A902    	LDA #$02		(Advance the pointer this far)
C0/ACF9:	4C5C9B  	JMP $9B5C
C0/ACFC:	A600    	LDX $00		(Load X with $00)
C0/ACFE:	BD6918  	LDA $1869,X 	(Get item currently in inventory at X)
C0/AD01:	C51A    	CMP $1A		(Is it the same as the candidate (temporary one at $1A)?)
C0/AD03:	F01D    	BEQ $AD22	(If so, branch -> check quantity of items)
C0/AD05:	E8      	INX			(Increment X)
C0/AD06:	E00001  	CPX #$0100		(Is X over 256?)
C0/AD09:	D0F3    	BNE $ACFE		(If not, branch -> get next item)
C0/AD0B:	A600    	LDX $00		(Otherwise, load X with $00)
C0/AD0D:	BD6918  	LDA $1869,X 	(Get item currently in inventory at X)
C0/AD10:	C9FF    	CMP #$FF	(Is it currently an "empty" item?)
C0/AD12:	F003    	BEQ $AD17	(If so, branch -> get the item out of temporary location)
C0/AD14:	E8      	INX			(Otherwise, increment X)
C0/AD15:	80F6    	BRA $AD0D		(Go to the next item)
C0/AD17:	A51A    	LDA $1A		
C0/AD19:	9D6918  	STA $1869,X 	(Put it in inventory at X)
C0/AD1C:	A901    	LDA #$01		(Load 1)
C0/AD1E:	9D6919  	STA $1969,X 	(Put it in for quantity of item X)
C0/AD21:	60      	RTS			(Exit)
C0/AD22:	BD6919  	LDA $1969,X 	(check quantity of item X)
C0/AD25:	C963    	CMP #$63		(Is it 99?)
C0/AD27:	F003    	BEQ $AD2C		(If so, exit)
C0/AD29:	FE6919  	INC $1969,X 	(Otherwise increment quantity of items)
C0/AD2C:	60      	RTS			(Exit)

C0/AD2D event #$81 : remove item from inventory

C0/AD2D:	A600    	LDX $00		(Load X with $00)
C0/AD2F:	BD6918  	LDA $1869,X 	(Get item X (currently in inventory))
C0/AD32:	C5EB    	CMP $EB		(Is this the candidate (at $EB) for removal?)
C0/AD34:	F008    	BEQ $AD3E		(If so, branch -> decrement quantity)
C0/AD36:	E8      	INX			(Otherwise, increment X)
C0/AD37:	E00001  	CPX #$0100		(Is X over 256?)
C0/AD3A:	D0F3    	BNE $AD2F		(If not, branch -> get the next item)
C0/AD3C:	800D    	BRA $AD4B		(Otherwise, exit the function)
C0/AD3E:	DE6919  	DEC $1969,X 	(Decremtne the quantity of item X)
C0/AD41:	BD6919  	LDA $1969,X 	(Get the quantity of item X)
C0/AD44:	D005    	BNE $AD4B		(If over 0, exit the function)
C0/AD46:	A9FF    	LDA #$FF		(Otherwise, get an "empty" item)
C0/AD48:	9D6918  	STA $1869,X 	(Put it in inventory at X)
C0/AD4B:	A902    	LDA #$02		(How many bytes advanced this was)
C0/AD4D:	4C5C9B  	JMP $9B5C

C0/AD50 event #$84 : add GP

C0/AD50:	C221    	REP #$21		(16 bit accum./memory)
C0/AD52:	AD6018  	LDA $1860		(Load the amount of gold variable)
C0/AD55:	65EB    	ADC $EB		(Add the parameter ($EB) amount of gold)
C0/AD57:	8D6018  	STA $1860		(Store it back to the gold variable)
C0/AD5A:	7B      	TDC 			(Clear the accumulator)
C0/AD5B:	E220    	SEP #$20      	(8 bit accum./memory)
C0/AD5D:	6D6218  	ADC $1862		(Add accumulator to $1862)
C0/AD60:	8D6218  	STA $1862		(Store the result back into 1862)
C0/AD63:	C998    	CMP #$98		(Is it less than 152 (98 hex)?)
C0/AD65:	9013    	BCC $AD7A		(If so, we're ok, branch to the end)	
C0/AD67:	AE6018  	LDX $1860		(Otherwise, check the low 2 bytes with X)
C0/AD6A:	E07F96  	CPX #$967F		(Is it less than 38527 (967F hex)?)
C0/AD6D:	900B    	BCC $AD7A		(If so, we're ok, branch to the end)
C0/AD6F:	A27F96  	LDX #$967F		(Otherwise, load X with the max value for the low bytes)
C0/AD72:	8E6018  	STX $1860		(Store it into the low bytes of gold)
C0/AD75:	A998    	LDA #$98		(Load A with the max for the high byte)
C0/AD77:	8D6218  	STA $1862		(Store it into the high byte)
C0/AD7A:	A903    	LDA #$03		(Advance the script 3 places)
C0/AD7C:	4C5C9B  	JMP $9B5C

C0/AD7F event #$85 : subtract GP

C0/AD7F:	ADB71E  	LDA $1EB7	
C0/AD82:	29BF    	AND #$BF
C0/AD84:	8DB71E  	STA $1EB7
C0/AD87:	C220    	REP #$20      	(16 bit accum./memory)
C0/AD89:	AD6018  	LDA $1860
C0/AD8C:	38      	SEC 
C0/AD8D:	E5EB    	SBC $EB
C0/AD8F:	852A    	STA $2A
C0/AD91:	7B      	TDC 
C0/AD92:	E220    	SEP #$20      	(8 bit accum./memory)
C0/AD94:	AD6218  	LDA $1862
C0/AD97:	E900    	SBC #$00
C0/AD99:	852C    	STA $2C
C0/AD9B:	C9A0    	CMP #$A0
C0/AD9D:	900A    	BCC $ADA9
C0/AD9F:	ADB71E  	LDA $1EB7
C0/ADA2:	0940    	ORA #$40
C0/ADA4:	8DB71E  	STA $1EB7
C0/ADA7:	800A    	BRA $ADB3
C0/ADA9:	A62A    	LDX $2A
C0/ADAB:	8E6018  	STX $1860
C0/ADAE:	A52C    	LDA $2C
C0/ADB0:	8D6218  	STA $1862
C0/ADB3:	A903    	LDA #$03
C0/ADB5:	4C5C9B  	JMP $9B5C

C0/ADB8 event #$86 : set esper as available

C0/ADB8:	A5EB    	LDA $EB		(Load A with the index of the Esper to add)
C0/ADBA:	38      	SEC 			(Clear the carry)
C0/ADBB:	E936    	SBC #$36		(Subtract 54 from the index)
C0/ADBD:	85EB    	STA $EB		(Put (index - 54) into $EB)
C0/ADBF:	2907    	AND #$07		(Zero out upper nibble)
C0/ADC1:	AA      	TAX			(Put result into X)
C0/ADC2:	A5EB    	LDA $EB		(A = (index - 54))
C0/ADC4:	4A      	LSR A			(Divide by 2)
C0/ADC5:	4A      	LSR A			(Divide by 2)
C0/ADC6:	4A      	LSR A			(Divide by 2, now 8 total)
C0/ADC7:	A8      	TAY			(Put result into Y)
C0/ADC8:	B9691A  	LDA $1A69,Y		(Load A with $1A69 + (index - 54)/8 (locates the correct byte))
C0/ADCB:	1FFCBAC0	ORA $C0BAFC,X	(Mask to update the held Espers byte)
C0/ADCF:	99691A  	STA $1A69,Y		(Store the updated held Espers byte)
C0/ADD2:	A902    	LDA #$02		(How many bytes advanced this was (one for op and one for param))
C0/ADD4:	4C5C9B  	JMP $9B5C

C0/ADD7 event #$87 : set esper as unavailable

C0/ADD7:	A5EB    	LDA $EB        (Load A with the index from the Esper to remove)
C0/ADD9:	38      	SEC            (Set the borrow in case it's needed)
C0/ADDA:	E936    	SBC #$36       (Subtract 54 from the index)
C0/ADDC:	85EB    	STA $EB        (Put (index -54) into $EB)
C0/ADDE:	20EDBA  	JSR $BAED      (updated A = X index; clears out upper 9 bits, Y = A shifted right 3 times)
C0/ADE1:	B9691A  	LDA $1A69,Y    (espers owned)
C0/ADE4:	3F04BBC0	AND $C0BB04,X  (remove the one set in the parameter)
C0/ADE8:	99691A  	STA $1A69,Y    (new espers owned)
C0/ADEB:	A400    	LDY $00        (Y = 0)
C0/ADED:	B91E16  	LDA $161E,Y    (esper equipped)
C0/ADF0:	C5EB    	CMP $EB        (does it match the one to remove?)
C0/ADF2:	D005    	BNE $ADF9      (branch if not)
C0/ADF4:	A9FF    	LDA #$FF       (empty slot)
C0/ADF6:	991E16  	STA $161E,Y    (since it was removed, unequip it also)
C0/ADF9:	C221    	REP #$21
C0/ADFB:	98      	TYA           (Y = A)
C0/ADFC:	692500  	ADC #$0025     (add 37 to check next character)
C0/ADFF:	A8      	TAY           (transfer the +37 to Y)
C0/AE00:	7B      	TDC            (A = 0)
C0/AE01:	E220    	SEP #$20       (8 bit accum./memory)
C0/AE03:	C05002  	CPY #$0250     (did we check all characters?)
C0/AE06:	D0E5    	BNE $ADED      (branch if not)
C0/AE08:	A902    	LDA #$02       (Advance the script pointer by 2)
C0/AE0A:	4C5C9B  	JMP $9B5C

C0/AE0D learn a spell (unused?)

C0/AE0D:	A5EB    	LDA $EB        (load parameter, character)
C0/AE0F:	8D0242  	STA $4202      (save as a multiplier)
C0/AE12:	A936    	LDA #$36       (54...)
C0/AE14:	8D0342  	STA $4203      (save as the other multiplier)
C0/AE17:	A5EC    	LDA $EC        (load another parameter, the spell number)
C0/AE19:	C221    	REP #$21
C0/AE1B:	EA      	NOP
C0/AE1C:	6D1642  	ADC $4216      (add the result of the multiplication)
C0/AE1F:	AA      	TAX           (new index)
C0/AE20:	7B      	TDC 
C0/AE21:	E220    	SEP #$20       (8 bit accum./memory)
C0/AE23:	A9FF    	LDA #$FF       (empty slot in most cases, but for this...)
C0/AE25:	9D6E1A  	STA $1A6E,X    (set spell as learned)
C0/AE28:	A903    	LDA #$03       (Advance the script pointer by 3)
C0/AE2A:	4C5C9B  	JMP $9B5C

C0/AE2D event #$88 : remove status conditions?

C0/AE2D:	20AD9D  	JSR $9DAD
C0/AE30:	C05002  	CPY #$0250
C0/AE33:	B00D    	BCS $AE42
C0/AE35:	C220    	REP #$20      (16 bit accum./memory)
C0/AE37:	B91416  	LDA $1614,Y    (load status bytes 1 & 4)
C0/AE3A:	25EC    	AND $EC        (keep those only in the parameter)
C0/AE3C:	991416  	STA $1614,Y    (save new status)
C0/AE3F:	7B      	TDC 
C0/AE40:	E220    	SEP #$20      (8 bit accum./memory)
C0/AE42:	A904    	LDA #$04
C0/AE44:	4C5C9B  	JMP $9B5C

C0/AE47 event #$89 : inflict status conditions

C0/AE47:	20AD9D  	JSR $9DAD
C0/AE4A:	C05002  	CPY #$0250
C0/AE4D:	B00D    	BCS $AE5C
C0/AE4F:	C220    	REP #$20      (16 bit accum./memory)
C0/AE51:	B91416  	LDA $1614,Y    (load status bytes 1 & 4)
C0/AE54:	05EC    	ORA $EC        (set those in the parameter)
C0/AE56:	991416  	STA $1614,Y    (save new status)
C0/AE59:	7B      	TDC 
C0/AE5A:	E220    	SEP #$20      (8 bit accum./memory)
C0/AE5C:	A904    	LDA #$04
C0/AE5E:	4C5C9B  	JMP $9B5C

C0/AE61 event #$8A : toggle status conditions

C0/AE61:	20AD9D  	JSR $9DAD
C0/AE64:	C05002  	CPY #$0250
C0/AE67:	B00D    	BCS $AE76
C0/AE69:	C220    	REP #$20      (16 bit accum./memory)
C0/AE6B:	B91416  	LDA $1614,Y    (load status bytes 1 & 4)
C0/AE6E:	45EC    	EOR $EC        (toggle those in the parameter)
C0/AE70:	991416  	STA $1614,Y    (save new status)
C0/AE73:	7B      	TDC 
C0/AE74:	E220    	SEP #$20      (8 bit accum./memory)
C0/AE76:	A904    	LDA #$04
C0/AE78:	4C5C9B  	JMP $9B5C

C0/AE7B event #$8B : add/subtract HP from characters

C0/AE7B:	20AD9D  	JSR $9DAD	(Point Y at character XX's data struct)
C0/AE7E:	C05002  	CPY #$0250	(Is Y > (37 * 16)? )
C0/AE81:	9003    	BCC $AE86	(Continue if it's less)
C0/AE83:	4CD3AE  	JMP $AED3	(If it's outside the range, exit)
C0/AE86:	20E8AE  	JSR $AEE8	(various, but it store Max HP to $1E)
C0/AE89:	A5EC    	LDA $EC	(Load the operation parameter)
C0/AE8B:	297F    	AND #$7F	(Zero out bit 7)
C0/AE8D:	C97F    	CMP #$7F	(Is it now #7F?)
C0/AE8F:	F038    	BEQ $AEC9	(If so, branch to maximize HP)
C0/AE91:	0A      	ASL A		(Otherwise, it'll be a # 0-7 (or it'll break), so double it for a pointer)
C0/AE92:	AA      	TAX		(Store it to X)
C0/AE93:	A5EC    	LDA $EC	(Again, load the operation parameter)
C0/AE95:	3017    	BMI $AEAE	(If bit 7 set, branch to subtraction code)
C0/AE97:	C221    	REP #$21	(Otherwise, we'll add; set carry bit and 16 bit A/mem.)
C0/AE99:	B90916  	LDA $1609,Y	(Load current HP)
C0/AE9C:	7FD8AEC0	ADC $C0AED8,X	(Add 2^X as loaded from the data table (X was calculated above))
C0/AEA0:	C51E    	CMP $1E	(Compare to Max HP)
C0/AEA2:	9002    	BCC $AEA6	(If it's less, branch)
C0/AEA4:	A51E    	LDA $1E	(If it's more, load Max HP (note that a BRA here could save 8 bytes))
C0/AEA6:	990916  	STA $1609,Y	(And store it to the current HP)
C0/AEA9:	7B      	TDC 		(Clear A)
C0/AEAA:	E220    	SEP #$20    (8 bit A/mem)
C0/AEAC:	8025    	BRA $AED3	(Branch to exit)
C0/AEAE:	C220    	REP #$20    (16 bit A/mem; subtraction code starts here)
C0/AEB0:	B90916  	LDA $1609,Y (Load A with the current HP)
C0/AEB3:	F00C    	BEQ $AEC1	(Branch if it's 0 (this destination could be moved as well))
C0/AEB5:	38      	SEC 		(Set carry in anticipation of subtraction)
C0/AEB6:	FFD8AEC0	SBC $C0AED8,X	(Subtract 2^x as loaded from the data table)
C0/AEBA:	F002    	BEQ $AEBE	(If it's now 0, branch to "set it to 1")
C0/AEBC:	1003    	BPL $AEC1	(If it's postive, we're done)
C0/AEBE:	A90100  	LDA #$0001	(Load A with 1 if subtraction did or would've set it to 0)
C0/AEC1:	990916  	STA $1609,Y	(Store A to current HP)
C0/AEC4:	7B      	TDC 		(Store 0 to A)
C0/AEC5:	E220    	SEP #$20    (8 bit A/mem)
C0/AEC7:	800A    	BRA $AED3	(Branch to exit)
C0/AEC9:	C220    	REP #$20    (16 bit A/mem; maximization code starts here)
C0/AECB:	A51E    	LDA $1E	(Load Max HP)
C0/AECD:	990916  	STA $1609,Y	(Store it to Current HP)
C0/AED0:	7B      	TDC 		(Clear A)
C0/AED1:	E220    	SEP #$20    (8 bit A/mem)
C0/AED3:	A903    	LDA #$03	(//this is to advance the script pointer 3 bytes)
C0/AED5:	4C5C9B  	JMP $9B5C	

C0/AED8 unknow

C0/AED8:	0100
C0/AEDA:	0200
C0/AEDC:	0400
C0/AEDE:	0800	
C0/AEE0:	1000
C0/AEE2:	2000
C0/AEE4:	4000
C0/AEE6:	8000

C0/AEE8 unknow

C0/AEE9:	C220    	REP #$20      (16 bit accum./memory)
C0/AEEB:	B90B16  	LDA $160B,Y
C0/AEEE:	29FF3F  	AND #$3FFF
C0/AEF1:	851E    	STA $1E
C0/AEF3:	4A      	LSR A
C0/AEF4:	8520    	STA $20
C0/AEF6:	4A      	LSR A
C0/AEF7:	8522    	STA $22
C0/AEF9:	4A      	LSR A
C0/AEFA:	8524    	STA $24
C0/AEFC:	7B      	TDC 
C0/AEFD:	E220    	SEP #$20      (8 bit accum./memory)
C0/AEFF:	B90C16  	LDA $160C,Y
C0/AF02:	29C0    	AND #$C0
C0/AF04:	F02D    	BEQ $AF33
C0/AF06:	C940    	CMP #$40
C0/AF08:	F01E    	BEQ $AF28
C0/AF0A:	C980    	CMP #$80
C0/AF0C:	F00D    	BEQ $AF1B
C0/AF0E:	C221    	REP #$21
C0/AF10:	A51E    	LDA $1E
C0/AF12:	6524    	ADC $24
C0/AF14:	851E    	STA $1E
C0/AF16:	7B      	TDC 
C0/AF17:	E220    	SEP #$20      (8 bit accum./memory)
C0/AF19:	8018    	BRA $AF33
C0/AF1B:	C221    	REP #$21
C0/AF1D:	A51E    	LDA $1E
C0/AF1F:	6520    	ADC $20
C0/AF21:	851E    	STA $1E
C0/AF23:	7B      	TDC 
C0/AF24:	E220    	SEP #$20      (8 bit accum./memory)
C0/AF26:	800B    	BRA $AF33
C0/AF28:	C221    	REP #$21
C0/AF2A:	A51E    	LDA $1E
C0/AF2C:	6522    	ADC $22
C0/AF2E:	851E    	STA $1E
C0/AF30:	7B      	TDC 
C0/AF31:	E220    	SEP #$20      (8 bit accum./memory)
C0/AF33:	A20F27  	LDX #$270F	  (Cap at 9999)
C0/AF36:	E41E    	CPX $1E
C0/AF38:	B002    	BCS $AF3C
C0/AF3A:	861E    	STX $1E
C0/AF3C:	FA      	PLX
C0/AF3D:	60      	RTS

C0/AF3E event #$8C : add/subtract MP from characters

C0/AF3E:	20AD9D  	JSR $9DAD	(Point Y at character XX's data struct)
C0/AF41:	C05002  	CPY #$0250	(Is Y > (37 * 16)? )
C0/AF44:	9003    	BCC $AF49	(Continue if it is)
C0/AF46:	4C90AF  	JMP $AF90	(Otherwise, jump to the exit)
C0/AF49:	20A3AF  	JSR $AFA3	(various, but it stores Max MP to $1E)
C0/AF4C:	A5EC    	LDA $EC	(Load the operation parameter)
C0/AF4E:	297F    	AND #$7F	(Zero out bit 7)
C0/AF50:	C97F    	CMP #$7F	(Compare it to #7F)
C0/AF52:	F032    	BEQ $AF86	(If it's equal, branch to maximize code)
C0/AF54:	0A      	ASL A		(Double it for a 2 byte data pointer value)
C0/AF55:	AA      	TAX		(Store the data pointer to X)
C0/AF56:	A5EC    	LDA $EC	(Load the operation parameter)
C0/AF58:	3017    	BMI $AF71	(If bit 7 set, branch to the subtraction code)
C0/AF5A:	C221    	REP #$21	(16 bit A/mem and clear carry for addition)
C0/AF5C:	B90D16  	LDA $160D,Y	(Load current MP)
C0/AF5F:	7F95AFC0	ADC $C0AF95,X	(Add data from table (unfortunately all 0's))
C0/AF63:	C51E    	CMP $1E	(Compare to Max MP)
C0/AF65:	9002    	BCC $AF69	(If it's less than Max, just store it as-is)
C0/AF67:	A51E    	LDA $1E	(Otherwise, load Max MP)
C0/AF69:	990D16  	STA $160D,Y	(And store to current MP)
C0/AF6C:	7B      	TDC 		(Clear A)
C0/AF6D:	E220    	SEP #$20    (8 bit A/mem)
C0/AF6F:	801F    	BRA $AF90	(Branch to exit)
C0/AF71:	C220    	REP #$20    (16 bit A/mem)
C0/AF73:	B90D16  	LDA $160D,Y	(Load current MP)
C0/AF76:	38      	SEC 		(Set carry for subtraction)
C0/AF77:	FF95AFC0	SBC $C0AF95,X	(Subtract data from table (unfortunately all 0's))
C0/AF7B:	1001    	BPL $AF7E	(If positive, keep it as-is)
C0/AF7D:	7B      	TDC 		(Otherwise, clear A to 0)
C0/AF7E:	990D16  	STA $160D,Y	(Store to current MP)
C0/AF81:	7B      	TDC 		(Clear A)
C0/AF82:	E220    	SEP #$20    (8 bit A/mem)
C0/AF84:	800A    	BRA $AF90	(Branch to the exit)
C0/AF86:	C220    	REP #$20    (16 bit A/mem)
C0/AF88:	A51E    	LDA $1E	(Load Max MP)
C0/AF8A:	990D16  	STA $160D,Y	(Store to current MP)
C0/AF8D:	7B      	TDC 		(Clear A)
C0/AF8E:	E220    	SEP #$20    (8 bit A/mem)
C0/AF90:	A903    	LDA #$03	(//advance the script pointer by 3 bytes...)
C0/AF92:	4C5C9B  	JMP $9B5C

C0/AF95 unknow

C0/AF95:	0000    
C0/AF97:	0000    
C0/AF99:	0000    
C0/AF9B:	0000    
C0/AF9D:	0000    
C0/AF9F:	0000    
C0/AFA1:	0000    

C0/AFA3 unknow

C0/AFA3:	DA      	PHX
C0/AFA4:	C220    	REP #$20      (16 bit accum./memory)
C0/AFA6:	B90F16  	LDA $160F,Y
C0/AFA9:	29FF3F  	AND #$3FFF
C0/AFAC:	851E    	STA $1E
C0/AFAE:	4A      	LSR A
C0/AFAF:	8520    	STA $20
C0/AFB1:	4A      	LSR A
C0/AFB2:	8522    	STA $22
C0/AFB4:	4A      	LSR A
C0/AFB5:	8524    	STA $24
C0/AFB7:	7B      	TDC 
C0/AFB8:	E220    	SEP #$20      (8 bit accum./memory)
C0/AFBA:	B91016  	LDA $1610,Y
C0/AFBD:	29C0    	AND #$C0
C0/AFC1:	C940    	CMP #$40
C0/AFC3:	F01D    	BEQ $AFE2
C0/AFC5:	C980    	CMP #$80
C0/AFC7:	F00C    	BEQ $AFD5
C0/AFC9:	C221    	REP #$21
C0/AFCB:	A51E    	LDA $1E
C0/AFCD:	6524    	ADC $24
C0/AFCF:	851E    	STA $1E
C0/AFD1:	E220    	SEP #$20      (8 bit accum./memory)
C0/AFD3:	8018    	BRA $AFED
C0/AFD5:	C221    	REP #$21
C0/AFD7:	A51E    	LDA $1E
C0/AFD9:	6520    	ADC $20
C0/AFDB:	851E    	STA $1E
C0/AFDD:	7B      	TDC 
C0/AFDE:	E220    	SEP #$20      (8 bit accum./memory)
C0/AFE0:	800B    	BRA $AFED
C0/AFE2:	C221    	REP #$21
C0/AFE4:	A51E    	LDA $1E
C0/AFE6:	6522    	ADC $22
C0/AFE8:	851E    	STA $1E
C0/AFEA:	7B      	TDC 
C0/AFEB:	E220    	SEP #$20    (8 bit accum./memory)
C0/AFED:	A2E703  	LDX #$03E7	(Cap at 999)	 
C0/AFF0:	E41E    	CPX $1E
C0/AFF2:	B002    	BCS $AFF6
C0/AFF4:	861E    	STX $1E
C0/AFF6:	FA      	PLX
C0/AFF7:	60      	RTS

C0/AFF8 event #$8F : unlock all sword techs

C0/AFF8:	A9FF    	LDA #$FF	
C0/AFFA:	8DF71C  	STA $1CF7
C0/AFFD:	A901    	LDA #$01
C0/AFFF:	4C5C9B  	JMP $9B5C