;
		INCLUDE	zel_ram.asm
;
;--------------------------------------------------------------------
;
;		PAL_ZELDA-3 (FRANCE)		1990.05.16(WED)
;
;--------------------------------------------------------------------
;
		ORG	0D8000H
;
;=============================================== (zel_plsb) =========
		GLB	PYOMST
		GLB	OMS000,KNMV,DIFN,LNPYIN,PYINDX,ENMYDT,ENMXDT
		GLB	LVKNYPD,LVKNXPD,NWKN,LVKNCRD
;=============================================== (zel_play) =========
		EXT	DASIMD
		EXT	SWMD,JPMV,KNSP,SDSP,BBSP,JNSP,OPNG,BOGN,KNS1
;=============================================== (zel_init) =========
		EXT	p1_kstp,p1_sls0,p1_sls1
;=============================================== (zel_main) =========
		EXT	JSRSUB,JSRSUBL,GDCHCK
		EXT	MD_gover
;=============================================== (zel_enmy) =========
		EXT	OAMENT,OAMENT2,OAMENT3
;=============================================== (zel_char) =========
;=============================================== (zel_exst) =========
;=============================================== (zel_isub) =========
		EXT	INHDMA2
;=============================================== (zel_bgwt) =========
		EXT	LAMPPL
;=============================================== (zel_bg3) ==========
;=============================================== (zel_main) ==========
		EXT	MD_djply
;====================================================================
;
		EXTEND
;
		MEM8
		IDX8
;
;
;************************************************************************
;*		common player oam data					*
;************************************************************************
;************	player data
LINKDT		EQU	$		; link chara filp data
;			  y   x  01 		; 0- head 1-dou
;					; run	
		HEX	000,000,000		; 0  (00004H,00042H)
		HEX	001,000,000		; 1  (00004H.00040H)
		HEX	002,000,000		; 2  (00004H,0002CH)
		HEX	001,000,004		; 3  (00004H,00040H)
		HEX	002,000,004		; 4  (00004H,0002CH)
		HEX	000,000,000		; 5  (00002H,00026H)
		HEX	001,000,000		; 6  (00002H,00028H)
		HEX	002,000,000		; 7  (00002H,0002AH)
		HEX	001,000,004		; 8  (00002H,00028H)
		HEX	002,000,004		; 9  (00002H.0002AH)
		HEX	000,001,044		; A  (00000H,00020H)
		HEX	001,001,044		; B  (00000H,00022H)
		HEX	002,002,044		; C  (00000H,00024H)
		HEX	000,0FF,000		; D  (00000H,00020H)
		HEX	001,0FF,000		; E  (00000H,00022H)
		HEX	002,0FE,000		; F  (00000H,00024H)
;					; ken 							
		HEX     000,000,000		; 10 (000A2H,000B2H)
		HEX	000,000,000		; 11 (00004H,00062H)
		HEX	0FF,000,000		; 12 (00004H,00064H)
		HEX	000,000,000		; 13 (00004H,00168H)
		HEX	000,000,000		; 14 (000A0H,000B0H)
		HEX	001,000,000		; 15 (00002H,0004CH)
		HEX	001,000,000		; 16 (00006H,00060H)
		HEX	001,000,000		; 17 (00006H,00166H)
		HEX	001,001,044		; 18 (00000H,00044H)
		HEX	001,001,044		; 19 (00000H,00046H)
		HEX	001,000,044		; 1A (00000H,00048H)
		HEX	001,001,044		; 1B (00000H,0004AH)
		HEX	001,0FF,000		; 1C (00000H,00044H)
		HEX	001,0FF,000		; 1D (00000H,00046H)
		HEX	001,000,000		; 1E (00000H,00048H)
		HEX	001,0FF,000		; 1F (00000H,0004AH)
;					;  ken kamae
		HEX	000,000,000		; 20 (00004H,00186H)
		HEX	001,000,000		; 21 (00004H,00188H)
		HEX	002,000,000		; 22 (00004H,0018AH)
		HEX	001,000,004		; 23 (00004H,00188H)
		HEX	002,000,004		; 24 (00004H,0018AH)
		HEX	000,000,000		; 25 (00002H,00180H)
		HEX	001,000,000		; 26 (00002H,00182H)
		HEX	002,000,000		; 27 (00002H,00184H)
		HEX	001,000,000		; 28 (00002H,00364H)
		HEX	002,000,000		; 29 (00002H,00366H)
		HEX	000,001,044		; 2A (00000H,0018CH)
		HEX	001,001,044		; 2B (00146H,002A2H)
		HEX	002,001,044		; 2C (00148H,0018EH)
		HEX	000,0FF,000		; 2D (00000H,0018CH)
		HEX	001,0FF,000		; 2E (00146H,002A2H)
		HEX	002,0FF,000		; 2F (00148H,0018EH)
;					; difence
		HEX	0FF,000,000		; 30 (00088H,00064H)
		HEX	000,000,000		; 31 (00004H,00168H)
		HEX	000,000,000		; 32 (00004H,000AEH)
		HEX	002,000,000		; 33 (00086H,000CEH)
		HEX	001,000,000		; 34 (00002H,001A2H)
		HEX	002,0FF,044		; 35 (00000H,000ACH)
		HEX	001,001,044		; 36 (00000H,001A4H)
		HEX	001,001,044		; 37 (00000H,001A6H)
		HEX	002,001,000		; 38 (00000H,000ACH)
		HEX	001,0FF,000		; 39 (00000H,001A4H)
		HEX	001,0FF,000		; 3A (00000H,001A6H)
;					; hole
		HEX	000,0F8,000		; 3B (000D0H,000E1H)
		HEX	004,000,00F		; 3C (0008AH,0FFFFH)
		HEX	004,000,00F		; 3D (0008CH,0FFFFH)
		HEX	000,000,0FF		; 3E (0FFFFH,0FFFFH)
;					; link jump
		HEX	000,000,000		; 3F (000A8H,000B8H)
		HEX	000,000,000		; 40 (000A4H,000B4H)
		HEX	000,000,044		; 41 (000A6H,000B6H)
		HEX	000,000,000		; 42 (000A6H,000B6H)
;					; lot,hanmer move
		HEX	000,000,000		; 43 (000D7H,000E7H)
		HEX	0FF,000,000		; 44 (00004H,00064H)
		HEX	0FF,000,000		; 45 (00004H,001AAH)
		HEX	000,000,000		; 46 (000D3H,000E3H)
		HEX	001,000,000		; 47 (00006H,001ACH)
		HEX	002,000,000		; 48 (00006H,00060H)
		HEX	000,000,044		; 49 (000D5H,000E5H)
		HEX	001,000,044		; 4A (00000H,00048H)
		HEX	001,000,044		; 4B (00000H,001A8H)
		HEX	000,000,000		; 4C (000D5H,000E5H)
		HEX	001,000,000		; 4D (00000H,00048H)
		HEX	001,000,000		; 4E (00000H,001A8H)
;					; new ken move
		HEX	0FF,000,000		; 4F (00004H,00062H)
		HEX	0FB,000,000		; 50 (00004H,00362H)
		HEX	002,000,000		; 51 (00008H,00060H)
		HEX	005,000,000		; 52 (00008H,00360H)
;					; horu
		HEX	0FF,000,044		; 53 (0002EH,0006EH)
		HEX	000,000,044		; 54 (00000H,000AAH)
		HEX	000,001,044		; 55 (00000H,0004EH)
		HEX	0FF,000,000		; 56 (0002EH,0006EH)
		HEX	000,000,000		; 57 (00000H,000AAH)
		HEX	000,0FF,000		; 58 (00000H,0004EH)
;					; motsu 0
		HEX	000,000,000		; 59 (0016EH,001CAH)
		HEX	001,000,000		; 5A (0016EH,001CCH)
		HEX	002,000,000		; 5B (0016EH,001CEH)
		HEX	001,000,004		; 5C (0016EH,001CCH)
		HEX	002,000,004		; 5D (0016EH,001CEH)
		HEX	000,000,000		; 5E (0016AH,001AEH)
		HEX	001,000,000		; 5F (0016AH,001C0H)
		HEX	002,000,000		; 60 (0016AH,001C2H)
		HEX	001,000,004		; 61 (0016AH,001C0H)
		HEX	002,000,004		; 62 (0016AH,001C2H)
		HEX	000,001,044		; 63 (0016CH,001C4H)
		HEX	001,001,044		; 64 (0016CH,001C6H)
		HEX	002,001,044		; 65 (0016CH,001C8H)
		HEX	000,0FF,000		; 66 (0016CH,001C4H)
		HEX	001,0FF,000		; 67 (0016CH,001C6H)
		HEX	002,0FF,000		; 68 (0016CH,001C8H)
;					; special ken furi
		HEX	001,000,004		; 69 (00002H,0004CH)
		HEX	000,000,044		; 6A (000A0H,000B0H)
		HEX	000,000,000		; 6B (00002H,001E6H)
		HEX	000,001,044		; 6C (00000H,00020H)
		HEX	000,000,000		; 6D (00004H,001E4H)
		HEX	000,000,004		; 6E (00004H,00062H)
		HEX	000,000,044		; 6F (000A2H,000B2H)
		HEX	000,001,040		; 70 (00000H,00102H)
		HEX	000,002,040		; 71 (00000H,00104H)
		HEX	000,0FF,000		; 72 (00000H,00100H)
		HEX	000,0FE,000		; 73 (00000H,001E2H)
;					; ya move
		HEX	000,000,000		; 74 (00004H,001EAH)
		HEX	001,000,000		; 75 (00002H,00028H)
		HEX	000,000,000		; 76 (00002H,001E8H)
		HEX	000,001,044		; 77 (00000H,001ECH)
		HEX	000,0FF,000		; 78 (00000H,001ECH)
;					; new ken move
		HEX	001,001,000		; 79 (00000H,00046H)
		HEX	002,001,000		; 7A (00000H,00048H)
		HEX	002,004,000		; 7B (00000H,0034EH)
		HEX	002,001,000		; 7C (00000H,00048H)
;					; inoru
		HEX	000,000,000		; 7D (00222H,00232H)
		HEX	001,000,000		; 7E (0000AH,00202H)
		HEX	001,000,000		; 7F (0000AH,00200H)
		HEX	000,000,000		; 80 (00252H,00262H)
;					; new ken move
		HEX	001,000,000		; 81 (00000H,0004AH)
		HEX	001,0FF,044		; 82 (00000H,00046H)
		HEX	002,0FF,044		; 83 (00000H,00048H)
		HEX	002,0FC,044		; 84 (00000H,0034EH)
		HEX	002,0FF,044		; 85 (00000H,00048H)
		HEX	001,000,044		; 86 (00000H,0004AH)
;
		HEX	000,000,000		; 87 (00002H,0006AH)
		HEX	000,000,040		; 88 (0002EH,0006CH)
		HEX	000,000,004		; 89 (00002H,0006AH)
		HEX	000,000,004		; 8A (0002EH,0006CH)
		HEX	000,000,000		; 8B (00008H,001E8H)
		HEX	000,000,000		; 8C (00006H,00180H)
		HEX	000,000,000		; 8D (0008EH,00180H)
;					;swim stop
		HEX	001,000,000		; 8E (00004H,00124H)
		HEX	002,000,004		; 8F (00004H,00124H)
		HEX	001,000,000		; 90 (00002H,00124H)
		HEX	002,000,004		; 91 (00002H,00124H)
		HEX	005,001,040		; 92 (00000H,00160H)
		HEX	006,001,044		; 93 (00000H,00160H)
		HEX	005,0FF,004		; 94 (00000H,00160H)
		HEX	006,0FF,000		; 95 (00000H,00160H)
;					; swim
		HEX	000,000,000		; 96 (00004H,0010AH)
		HEX	000,000,004		; 97 (00004H,0010CH)
		HEX	000,000,000		; 98 (00088H,0010CH)
		HEX	000,000,000		; 99 (00106H,00126H)
		HEX	000,000,044		; 9A (00108H,00126H)
		HEX	000,000,000		; 9B (00108H,00128H)
		HEX	00D,003,044		; 9C (0010EH,000EAH)
		HEX	00C,005,044		; 9D (00120H,000ECH)
		HEX	00C,005,044		; 9E (00122H,000EEH)
		HEX	00D,0FD,000		; 9F (0010EH,000EAH)
		HEX	00C,0FB,000		; A0 (00120H,000ECH)
		HEX	00C,0FB,000		; A1 (00122H,000EEH)
;					; walk
		HEX	001,000,000		; A2 (00004H,00068H)
;					; bumeran
		HEX	000,000,000		; A3 (00224H,00234H)
		HEX	000,000,000		; A4 (00004H,0020CH)
		HEX	001,000,000		; A5 (00002H,0020AH)
		HEX	002,000,000		; A6 (00002H,00060H)
		HEX	000,000,044		; A7 (00254H,00264H)
		HEX	000,000,000		; A8 (00254H,00264H)
;					; piri piri
		HEX	000,000,000		; A9 (00250H,00260H)
		HEX	000,000,000		; AA (00220H,00230H)
		HEX	000,000,044		; AB (00250H,00260H)
		HEX	000,000,044		; AC (00220H,00230H)
;					; sunder
		HEX	0FF,000,004		; AD (0000EH,001E8H)
;					; run walk
		HEX	000,000,000		; AE (00004H,0002CH)
		HEX	0FF,000,000		; AF (00004H,00040H)
		HEX	0FE,000,000		; B0 (00004H,0024EH)
		HEX	000,000,000		; B1 (00004H,00266H)
		HEX	000,000,000		; B2 (00004H,0026EH)
		HEX	0FF,000,000		; B3 (00004H,00268H)
		HEX	0FE,000,000		; B4 (00004H,0026AH)
		HEX	000,000,000		; B5 (00004H,0026CH)
		HEX	000,000,004		; B6 (00002H,00028H)
		HEX	0FF,000,000		; B7 (00002H,0002AH)
		HEX	0FE,000,000		; B8 (00002H,0024AH)
		HEX	000,000,000		; B9 (00002H,0024CH)
		HEX	0FF,000,004		; BA (00002H,0002AH)
		HEX	0FE,000,004		; BB (00002H,0024AH)
		HEX	000,000,004		; BC (00002H,0024CH)
		HEX	0FF,001,044		; BD (00000H,00022H)
		HEX	0FF,000,044		; BE (00146H,00024H)
		HEX	000,001,044		; BF (00148H,0020EH)
		HEX	000,001,044		; C0 (00000H,00248H)
		HEX	0FF,001,044		; C1 (00000H,0022CH)
		HEX	0FF,000,044		; C2 (00146H,0022EH)
		HEX	000,000,044		; C3 (00148H,00246H)
		HEX	0FF,0FF,000		; C4 (00000H,00022H)
		HEX	0FF,000,000		; C5 (00146H,00024H)
		HEX	000,0FF,000		; C6 (00148H,0020EH)
		HEX	000,0FF,000		; C7 (00000H,00248H)
		HEX	0FF,0FF,000		; C8 (00000H,0022CH)
		HEX	0FF,000,000		; C9 (00146H,0022EH)
		HEX	000,000,000		; CA (00148H,00246H)
;					; bomber
		HEX	000,000,004		; CB (00002H,001E8H)
		HEX	001,000,000		; CC (00002H,00166H)
;					; jishin
		HEX	002,000,000		; CD (00002H,00202H)
;					; walk
		HEX	001,000,000		; CE (00004H,002AAH)
		HEX	002,000,000		; CF (00004H,002ACH)
		HEX	001,000,000		; D0 (00002H,002A6H)
		HEX	002,000,000		; D1 (00002H,002A8H)
		HEX	001,000,004		; D2 (00002H,002A6H)
		HEX	002,000,004		; D3 (00002H,002A8H)
		HEX	001,001,044		; D4 (00000H,002A2H)
		HEX	002,001,044		; D5 (00000H,002A4H)
		HEX	001,0FF,000		; D6 (00000H,002A2H)
		HEX	002,0FF,000		; D7 (00000H,002A4H)
;					; motsu 1
		HEX	002,000,000		; D8 (00284H,0028EH)
		HEX	002,000,000		; D9 (00004H,002A0H)
		HEX	003,000,000		; DA (00086H,00288H)
		HEX	003,000,000		; DB (00280H,00288H)
		HEX	002,0FE,044		; DC (00084H,0028AH)
		HEX	002,001,044		; DD (00282H,0028CH)
		HEX	002,002,000		; DE (00084H,0028AH)
		HEX	002,0FF,000		; DF (00282H,0028CH)
;					; osu
		HEX	000,000,000		; E0 (00284H,00186H)
		HEX	001,000,000		; E1 (00284H,00188H)
		HEX	002,000,000		; E2 (00284H,0018AH)
		HEX	001,000,004		; E3 (00284H,00188H)
		HEX	002,000,004		; E4 (00284H,0018AH)
		HEX	002,000,000		; E5 (00280H,002EAH)
		HEX	003,000,000		; E6 (00280H,002ECH)
		HEX	004,000,000		; E7 (00280H,002EEH)
		HEX	003,000,004		; E8 (00280H,002ECH)
		HEX	004,000,004		; E9 (00280H,002EEH)
		HEX	000,000,044		; EA (00282H,002E4H)
		HEX	001,000,044		; EB (00282H,002E6H)
		HEX	002,000,044		; EC (00282H,002E8H)
		HEX	000,000,000		; ED (00282H,002E4H)
		HEX	001,000,000		; EE (00282H,002E6H)
		HEX	002,000,000		; EF (00282H,002E8H)
;					; hiku 1
		HEX	003,000,000		; F0 (00002H,00288H)
		HEX	002,000,000		; F1 (00280H,00288H)
;					; naname walk
		HEX	0FF,000,000		; F2 (0002EH,00300H)
		HEX	000,000,000		; F3 (0002EH,00302H)
		HEX	001,000,000		; F4 (0002EH,00304H)
		HEX	0FF,000,000		; F5 (002E2H,00306H)
		HEX	000,000,000		; F6 (002E2H,00308H)
		HEX	001,000,000		; F7 (002E2H,0030AH)
		HEX	0FF,000,044		; F8 (0002EH,00300H)
		HEX	000,000,044		; F9 (0002EH,00302H)
		HEX	001,000,044		; FA (0002EH,00304H)
		HEX	0FF,000,044		; FB (002E2H,00306H)
		HEX	000,000,044		; FC (002E2H,00308H)
		HEX	001,000,044		; FD (002E2H,0030AH)
;					; chijoo map player
		HEX	000,000,000		; FE (0030EH,0FFFFH)
;					; hiku 1
		HEX	001,000,000		; FF (00280H,00286H)
;
		HEX	002,000,000		; 100 (0FFFFH,0FFFFH)
;					; no hiku 1
		HEX	001,000,000		; 101 (00320H,001CAH)
		HEX	002,000,000		; 102 (00320H,001CCH)
		HEX	000,000,000		; 103 (00322H,001CAH)
		HEX	003,000,000		; 104 (00086H,002EAH)
		HEX	004,000,000		; 105 (00086H,002ECH)
		HEX	002,000,000		; 106 (00280H,002EAH)
		HEX	000,0FF,044		; 107 (00000H,002E4H)
		HEX	001,001,044		; 108 (00000H,002E6H)
		HEX	000,001,044		; 109 (00282H,00206H)
		HEX	000,001,000		; 10A (00000H,002E4H)
		HEX	001,001,000		; 10B (00000H,002E6H)
		HEX	000,0FF,000		; 10C (00282H,00206H)
;					; hiku 0
		HEX	003,000,000		; 10D (00320H,001CEH)
		HEX	002,000,004		; 10E (00320H,001CCH)
		HEX	003,000,004		; 10F (00320H,001CEH)
;					; game over
		HEX	000,002,000		; 110 (00084H,0012BH)
		HEX	008,008,000		; 111 (0012EH,0012DH)
;					; aitem motsu porze
		HEX	000,000,000		; 112 (00162H,00164H)
		HEX	000,000,000		; 113 (00324H,00368H)
;					; oopning neru 
		HEX	0FF,000,00F		; 114 (0000CH,0FFFFH)
		HEX	001,000,000		; 115 (00086H,00066H)
;					; title player pouzu
		HEX	000,000,004		; 116 (00006H,001E8H)
;					; no hiku 2
		HEX	000,000,000		; 117 (0030CH,0031CH)
		HEX	002,000,000		; 118 (00280H,001EEH)
		HEX	001,004,044		; 119 (00326H,00328H)
		HEX	001,0FC,000		; 11A (00326H,00328H)
;					; usagi
		HEX	000,000,000		; 11B (00342H,00344H)
		HEX	001,000,000		; 11C (00342H,00346H)
		HEX	001,000,004		; 11D (00342H,00346H)
		HEX	000,000,000		; 11E (0032AH,00340H)
		HEX	001,000,000		; 11F (0032AH,0032EH)
		HEX	001,000,004		; 120 (0032AH,0032EH)
		HEX	000,001,044		; 121 (00348H,0034AH)
		HEX	001,001,044		; 122 (00348H,0034CH)
		HEX	000,0FF,000		; 123 (00348H,0034AH)
		HEX	001,0FF,000		; 124 (00348H,0034CH)
;					; soromon (baria)
		HEX	000,000,044		; 125 (00004H,001EAH)
		HEX	0FE,000,000		; 126 (00004H,00064H)
		HEX	000,0FE,004		; 127 (00000H,00104H)
;					; danjon map player
		HEX	000,000,000		; 128 (0014EH,0FFFFH)
;					; book read porzu
		HEX	000,001,000		; 129 (00004H,0014CH)
;					; ending porzu
		HEX	000,000,004		; 12A (0000AH,001E8H)
;					; item hiku porzu
		HEX	00C,000,008		; 12B (0008EH,001EEH)
		HEX	00E,000,080		; 12C (00002H,001A0H)
		HEX	00C,000,000		; 12D (00140H,00144H)
		HEX	00B,000,000		; 12E (00142H,0036EH)
;
;************	ude data
LNUDCR		EQU	$		; link ude character data
		HEX	000		; 0  (020D2H)  1 (020F0H)
		HEX	000		; 2  (020E9H)  3 (020F9H)
		HEX	000		; 4  (020D9H)  5 (021E1H)
		HEX	040		; 6  (061E1H)  7 (021F1H)
		HEX	040		; 8  (061F1H)  9 (021F0H)
		HEX	048		; A  (061F0H)  B (0A1F0H)
		HEX	0C0		; C  (0E1F0H)  D (0212AH)
		HEX	048		; E  (0612AH)  F (0A12AH)
		HEX	0C0		; 10 (0E12AH)  11(021E0H)
		HEX	048		; 12 (061E0H)  13(0A1E0H)
		HEX	0C0		; 14 (0E1E0H)  15(0213AH)
		HEX	048		; 16 (0613AH)  17(0A13AH)
		HEX	0C0		; 18 (0E13AH)  19(0233CH)
		HEX	040		; 1A (0633CH)  1B(00000H)
;
;************	ken data
KNCRDT		EQU	$		; ken chara data
KNC000		WORD	02A05H,02A06H,0FFFFH; 0
KNC001		WORD	06A06H,06A05H,0FFFFH; 1
KNC002		WORD	0AA05H,0AA06H,0FFFFH; 2
KNC003		WORD	02A05H,02A06H,0FFFFH; 3
KNC004		WORD	0EA06H,0EA05H,0FFFFH; 4
KNC005		WORD	06A06H,06A05H,0FFFFH; 5
KNC006		WORD	02A05H,0FFFFH,02A15H; 6
KNC007		WORD	0AA15H,0FFFFH,0AA05H; 7
KNC008		WORD	02A05H,0FFFFH,02A15H; 8
KNC009		WORD	0AA15H,0FFFFH,0AA05H; 9
KNC00A		WORD	06A05H,0FFFFH,06A15H; A
KNC00B		WORD	0EA15H,0FFFFH,0EA05H; B
KNC00C		WORD	02A05H,0FFFFH,0FFFFH; C
KNC00D		WORD	0AA05H,0FFFFH,0FFFFH; D
KNC00E		WORD	06A05H,0FFFFH,0FFFFH; E
KNC00F		WORD	0EA05H,0FFFFH,0FFFFH; F
KNC010		WORD	02A05H,0FFFFH,0FFFFH; 10
KNC011		WORD	0AA05H,0FFFFH,0FFFFH; 11
KNC012		WORD	06A05H,0FFFFH,0FFFFH; 12
KNC013		WORD	0EA05H,0FFFFH,0FFFFH; 13
KNC014		WORD	02A05H,0FFFFH,0FFFFH; 14
KNC015		WORD	0AA05H,0FFFFH,0FFFFH; 15
KNC016		WORD	06A05H,0FFFFH,0FFFFH; 16
KNC017		WORD	0EA05H,0FFFFH,0FFFFH; 17
KNC018		WORD	02A05H,0FFFFH,0FFFFH; 18
KNC019		WORD	0AA05H,0FFFFH,0FFFFH; 19
KNC01A		WORD	06A05H,0FFFFH,0FFFFH; 1A
KNC01B		WORD	0EA05H,0FFFFH,0FFFFH; 1B
KNC01C		WORD	0AA15H,0FFFFH,0FFFFH; 1C
;						lot,hanmer data
DTC000          WORD    02209H,0FFFFH,02219H; 1D
DTC001          WORD    02209H,0FFFFH,02219H; 1E
DTC002          WORD    0221AH,0FFFFH,02219H; 1F
DTC003          WORD    0A219H,0FFFFH,0A209H; 20
DTC004          WORD    02209H,0FFFFH,02219H; 21
DTC005          WORD    02209H,0FFFFH,0FFFFH; 22
DTC006          WORD    02209H,0FFFFH,0FFFFH; 23
DTC007          WORD    02219H,02209H,0FFFFH; 24
DTC008          WORD    06209H,0FFFFH,0FFFFH; 25
DTC009          WORD    06209H,06219H,0FFFFH; 26
;							yumi
YMC000		WORD	0A209H,0E209H,0FFFFH; 27
YMC001		WORD	02209H,06209H,0FFFFH; 28
YMC002		WORD	06209H,0FFFFH,0E209H; 29
YMC003		WORD	02209H,0FFFFH,0A209H; 2A
YMC004		WORD	0A209H,0FFFFH,0FFFFH; 2B
YMC005		WORD	06209H,0FFFFH,0FFFFH; 2C
YMC006		WORD	02209H,0FFFFH,0FFFFH; 2D
YMC007		WORD	0E209H,0FFFFH,0FFFFH; 2E
;							scop
SCC000		WORD	02209H,0FFFFH,0FFFFH; 2F
SCC001		WORD	02209H,0FFFFH,0FFFFH; 30
SCC002		WORD	06209H,0FFFFH,0FFFFH; 31
SCC003		WORD	06209H,0FFFFH,0FFFFH; 32
;
BOR000		WORD	0221AH,0FFFFH,0FFFFH; 33	fotsot
BOR001		WORD	0221AH,0FFFFH,0FFFFH; 34
BOR002		WORD	0221AH,0FFFFH,0FFFFH; 35
BOR003		WORD	0221AH,0FFFFH,0FFFFH; 36
;
AMI000		WORD	02209H,0FFFFH,0FFFFH; 37	ami
AMI001		WORD	02209H,0FFFFH,0FFFFH; 38
AMI002		WORD	02209H,0FFFFH,0FFFFH; 39
AMI003		WORD	0E209H,0FFFFH,0FFFFH; 3A
AMI004		WORD	02209H,0FFFFH,0FFFFH; 3B
AMI005		WORD	02209H,0FFFFH,0FFFFH; 3C
AMI006		WORD	02209H,0FFFFH,0FFFFH; 3D
AMI007		WORD	02209H,0FFFFH,0FFFFH; 3E
AMI008		WORD	02209H,0FFFFH,0FFFFH; 3F
AMI009		WORD	02209H,0FFFFH,0FFFFH; 40
AMI00A		WORD	02209H,0FFFFH,0FFFFH; 41
;
SOR000          WORD    02209H,0FFFFH,02219H; 42	soromon 
SOR001          WORD    02209H,0FFFFH,02219H; 43
SOR002          WORD    02209H,0FFFFH,02219H; 44
SOR003          WORD    06209H,0FFFFH,06219H; 45
SOR004          WORD    02209H,0FFFFH,02219H; 46
SOR005          WORD    02209H,0FFFFH,0FFFFH; 47
SOR006          WORD    0A219H,0A209H,0FFFFH; 48
SOR007          WORD    06209H,0FFFFH,0FFFFH; 49
SOR008          WORD    0E209H,0E219H,0FFFFH; 4A
;
BOK000		WORD	02809H,0FFFFH,0FFFFH; 4B
;
KC00		EQU	(KNC000-KNCRDT)/6	;0
KC01		EQU	(KNC001-KNCRDT)/6	;1
KC02		EQU	(KNC002-KNCRDT)/6	;2
KC03		EQU	(KNC003-KNCRDT)/6	;3
KC04		EQU	(KNC004-KNCRDT)/6	;4
KC05		EQU	(KNC005-KNCRDT)/6	;5
KC06		EQU	(KNC006-KNCRDT)/6	;6
KC07		EQU	(KNC007-KNCRDT)/6	;7
KC08		EQU	(KNC008-KNCRDT)/6	;8
KC09		EQU	(KNC009-KNCRDT)/6	;9
KC0A		EQU	(KNC00A-KNCRDT)/6	;A
KC0B		EQU	(KNC00B-KNCRDT)/6	;B
KC0C		EQU	(KNC00C-KNCRDT)/6	;C
KC0D		EQU	(KNC00D-KNCRDT)/6	;D
KC0E		EQU	(KNC00E-KNCRDT)/6	;E
KC0F		EQU	(KNC00F-KNCRDT)/6	;F
KC10		EQU	(KNC010-KNCRDT)/6	;10
KC11		EQU	(KNC011-KNCRDT)/6	;11
KC12		EQU	(KNC012-KNCRDT)/6	;12
KC13		EQU	(KNC013-KNCRDT)/6	;13
KC14		EQU	(KNC014-KNCRDT)/6	;14
KC15		EQU	(KNC015-KNCRDT)/6	;15
KC16		EQU	(KNC016-KNCRDT)/6	;16
KC17		EQU	(KNC017-KNCRDT)/6	;17
KC18		EQU	(KNC018-KNCRDT)/6	;18
KC19		EQU	(KNC019-KNCRDT)/6	;19
KC1A		EQU	(KNC01A-KNCRDT)/6	;1A
KC1B		EQU	(KNC01B-KNCRDT)/6	;1B
KC1C		EQU	(KNC01C-KNCRDT)/6	;1C	; tokushu
;
DT00		EQU	(DTC000-KNCRDT)/6	;1D
DT01		EQU	(DTC001-KNCRDT)/6	;1E
DT02		EQU	(DTC002-KNCRDT)/6	;1F
DT03		EQU	(DTC003-KNCRDT)/6	;20
DT04		EQU	(DTC004-KNCRDT)/6	;21
DT05		EQU	(DTC005-KNCRDT)/6	;22
DT06		EQU	(DTC006-KNCRDT)/6	;23
DT07		EQU	(DTC007-KNCRDT)/6	;24
DT08		EQU	(DTC008-KNCRDT)/6	;25
DT09		EQU	(DTC009-KNCRDT)/6	;26
;
YC00		EQU	(YMC000-KNCRDT)/6	;27
YC01		EQU	(YMC001-KNCRDT)/6	;28
YC02		EQU	(YMC002-KNCRDT)/6	;29
YC03		EQU	(YMC003-KNCRDT)/6	;2A
YC04		EQU	(YMC004-KNCRDT)/6	;2B
YC05		EQU	(YMC005-KNCRDT)/6	;2C
YC06		EQU	(YMC006-KNCRDT)/6	;2D
YC07		EQU	(YMC007-KNCRDT)/6	;2E
;
SC00		EQU	(SCC000-KNCRDT)/6	;2F
SC01		EQU	(SCC001-KNCRDT)/6	;30
SC02		EQU	(SCC002-KNCRDT)/6	;31
SC03		EQU	(SCC003-KNCRDT)/6	;32
;
BR00		EQU	(BOR000-KNCRDT)/6	;33
BR01		EQU	(BOR001-KNCRDT)/6	;34
BR02		EQU	(BOR002-KNCRDT)/6	;35
BR03		EQU	(BOR003-KNCRDT)/6	;36
;
AM00		EQU	(AMI000-KNCRDT)/6	;37
AM01		EQU	(AMI001-KNCRDT)/6	;38
AM02		EQU	(AMI002-KNCRDT)/6	;39
AM03		EQU	(AMI003-KNCRDT)/6	;3A
AM04		EQU	(AMI004-KNCRDT)/6	;3B
AM05		EQU	(AMI005-KNCRDT)/6	;3C
AM06		EQU	(AMI006-KNCRDT)/6	;3D
AM07		EQU	(AMI007-KNCRDT)/6	;3E
AM08		EQU	(AMI008-KNCRDT)/6	;3F
AM09		EQU	(AMI009-KNCRDT)/6	;40
AM0A		EQU	(AMI00A-KNCRDT)/6	;41
;
SR00		EQU	(SOR000-KNCRDT)/6	;42
SR01		EQU	(SOR001-KNCRDT)/6	;43
SR02		EQU	(SOR002-KNCRDT)/6	;44
SR03		EQU	(SOR003-KNCRDT)/6	;45
SR04		EQU	(SOR004-KNCRDT)/6	;46
SR05		EQU	(SOR005-KNCRDT)/6	;47
SR06		EQU	(SOR006-KNCRDT)/6	;48
SR07		EQU	(SOR007-KNCRDT)/6	;49
SR08		EQU	(SOR008-KNCRDT)/6	;4A
;
BK00		EQU	(BOK000-KNCRDT)/6	;4B
;
EGCD		EQU	0FFH			;FF
;************	tate data
TTCRDT		EQU	$		; tate chara data
		WORD	02A07H,0FFFFH,0FFFFH	;0
		WORD	02A07H,0FFFFH,0FFFFH	;1
		WORD	02A07H,0FFFFH,0FFFFH	;2
		WORD	06A07H,0FFFFH,0FFFFH	;3
		WORD	02A07H,0FFFFH,0FFFFH	;4
		WORD	06A07H,0FFFFH,0FFFFH	;5
		WORD	02A07H,0FFFFH,0FFFFH	;6
		WORD	06A07H,0FFFFH,0FFFFH	;7
;						lot,hanmer data
                WORD    02809H,0FFFFH,02819H;8
                WORD    02809H,0FFFFH,02819H;9
                WORD    0281AH,0FFFFH,02819H;A
                WORD    0A819H,0FFFFH,0A809H;B
                WORD    02809H,0FFFFH,02819H;C
                WORD    02809H,0FFFFH,0FFFFH;D
                WORD    02809H,0FFFFH,0FFFFH;E
                WORD    02819H,02809H,0FFFFH;F
                WORD    06809H,0FFFFH,0FFFFH;10
                WORD    06809H,06819H,0FFFFH;11
; ***********	kage data
KGCRDT		EQU	$		; kage chara data
		WORD	0286CH,0686CH	;0 kage big
		WORD	02828H,06828H	;1 kage midol
		WORD	02838H,0FFFFH	;2 kage smoll
		WORD	0286EH,0686EH	;3 swim
		WORD	0287EH,0687EH	;4 swim
		WORD	024D8H,064D8H	;5 asase walk (0)
		WORD	024D9H,064D9H	;6 asase walk (1)
		WORD	024DAH,064DAH	;7 asase walk (2)
		WORD	022C8H,062C8H	;8 kusa (0)
		WORD	022C9H,062C9H	;9 kusa (1)
		WORD	022CAH,062CAH	;A kusa (2)
;************	mode data
PLMODE		EQU	$		; player mode data
;					run
		WORD	00000H,000AEH,000AFH,000B0H,000B1H,000B2H,000B3H,000B4H,000B5H; up
		WORD	00005H,000B6H,000B7H,000B8H,000B9H,000B6H,000BAH,000BBH,000BCH; down
		WORD	0000AH,0000AH,000BDH,000BEH,000BFH,000C0H,000C1H,000C2H,000C3H; left
		WORD	0000DH,0000DH,000C4H,000C5H,000C6H,000C7H,000C8H,000C9H,000CAH; rigt
;					ken move
		WORD	00010H,00010H,00011H,00011H,00012H,00012H,00013H,00013H,00013H; up
		WORD	00014H,00014H,00015H,00015H,00016H,00016H,00017H,00017H,00017H; down
		WORD	00018H,00018H,00019H,00019H,0001AH,0001AH,0001BH,0001BH,0001BH; left
		WORD	0001CH,0001CH,0001DH,0001DH,0001EH,0001EH,0001FH,0001FH,0001FH; right
;					kamae
		WORD	00020H,00021H,00022H,00020H,00023H,00024H; up
		WORD	00025H,00026H,00027H,00025H,00028H,00029H; down
		WORD	0002AH,0002BH,0002CH,0002AH,0002BH,0002CH; left
		WORD	0002DH,0002EH,0002FH,0002DH,0002EH,0002FH; right
;					difence
		WORD	00031H,00030H,00032H; up
		WORD	00034H,00033H,00034H; down
		WORD	00036H,00035H,00037H; left
		WORD	00039H,00038H,0003AH; right
;					hole
		WORD	0003BH,0003CH,0003DH,0003EH,0003EH,0003EH ; all houkou 
		WORD	00000H,0000DH,00005H,0000AH
;					link jump
		WORD	0003FH		; up
		WORD	00040H		; down
		WORD	00041H		; left
		WORD	00042H		; right
;					lot,hanmer move
		WORD	00043H,00044H,00045H; up
		WORD	00046H,00047H,00048H; down
		WORD	00049H,0004AH,0004BH; left
		WORD	0004CH,0004DH,0004EH; right
;;;;;;;;;					lot kamae
;;;;;;;;		WORD	00020H,00021H,00022H,00020H,00023H,00024H; up
;;;;;;;;		WORD	00025H,00026H,00027H,00025H,00028H,00029H; down
;;;;;;;;		WORD	0002AH,0002BH,0002CH,0002AH,0002BH,0002CH; left
;;;;;;;;		WORD	0002DH,0002EH,0002FH,0002DH,0002EH,0002FH; right
;					yumi
		WORD	00000H,00021H,00074H; up
		WORD	00005H,00075H,00076H; down
		WORD	0002AH,0001AH,00077H; left
		WORD	0002DH,0001EH,00078H; right
;;;;;;;;;					hane jump
;;;;;;;;		WORD	0004FH,0004FH; up
;;;;;;;;		WORD	00050H,00050H; down
;;;;;;;;		WORD	00051H,00051H; left
;;;;;;;;		WORD	00052H,00052H; right
;					bumeran
		WORD	000A3H,000A4H	; up
		WORD	000A5H,000A6H	; down
		WORD	000A7H,0001AH	; left
		WORD	000A8H,0001EH	; right
;					walk
		WORD	00000H,000CEH,000CFH,00000H,000A2H,00024H	; up
		WORD	00005H,000D0H,000D1H,00005H,000D2H,000D3H	; down
		WORD	0000AH,000D4H,000D5H,0000AH,000D4H,000D5H	; left
		WORD	0000DH,000D6H,000D7H,0000DH,000D6H,000D7H	; right
;;;;;;;;;					aisatsu
;;;;;;;;		WORD	00000H,00079H	; up
;;;;;;;;		WORD	00005H,0007AH	; down
;;;;;;;;		WORD	0000AH,0007BH	; left
;;;;;;;;		WORD	0000DH,0007CH	; right
;					inoru
		WORD	0007DH,0007EH,0007FH,00080H	; all houkou
;;;;;;;;;					neru
;;;;;;;;		WORD	00081H,00082H	; all houkou
;					horu
		WORD	00053H,00054H,00055H	; left
		WORD	00056H,00057H,00058H	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		WORD	00083H,00084H,00085H,00086H	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		WORD	00088H,00087H,0008AH,00089H	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		WORD	00025H,0008BH,0008CH,0008DH	; all houkou
;					tsukamu
		WORD	00059H,0005AH,0005BH,00059H,0005CH,0005DH; up
		WORD	0005EH,0005FH,00060H,0005EH,00061H,00062H; down
		WORD	00063H,00064H,00065H,00063H,00064H,00065H; left
		WORD	00066H,00067H,00068H,00066H,00067H,00068H; right
;					motsu 0
		WORD	00020H,00021H,00022H,00020H,00023H,00024H; up
		WORD	00025H,00026H,00027H,00025H,00028H,00029H; down
		WORD	0002AH,0002BH,0002CH,0002AH,0002BH,0002CH; left
		WORD	0002DH,0002EH,0002FH,0002DH,0002EH,0002FH; right
;					special ken furi
		WORD	00069H,0006AH,0006BH,0006BH,0006CH,0006CH,0006DH,0006DH	; all houkou
		WORD	0000DH,0000DH,0006EH,0006FH,00070H,00071H,00072H,00073H
;					motsu 1
		WORD	000D8H,000D9H,000D9H	; up
		WORD	000DAH,000DBH,000DBH	; down
		WORD	000DCH,000DDH,000DDH	; left
		WORD	000DEH,000DFH,000DFH	; right
;					swim stop
		WORD	0008EH,0008FH		; up
		WORD	00090H,00091H		; down
		WORD	00092H,00093H		; left
		WORD	00094H,00095H		; right
;					swim move
		WORD	00098H,00096H,00097H,00096H	; up
		WORD	0009BH,00099H,0009AH,00099H	; down
		WORD	0009EH,0009CH,0009DH,0009CH	; left
		WORD	000A1H,0009FH,000A0H,0009FH	; right
;					swim dasei move
		WORD	00096H,00097H,00098H	; up
		WORD	00099H,0009AH,0009BH	; down
		WORD	0009CH,0009DH,0009EH	; left
		WORD	0009FH,000A0H,000A1H	; right
;					piri piri
		WORD	000ABH,000ABH,000ACH,000ACH	; up
		WORD	000A9H,000A9H,000AAH,000AAH	; down
		WORD	000ABH,000ABH,000ACH,000ACH	; left
		WORD	000A9H,000A9H,000AAH,000AAH	; right
;					item spcial
		WORD	00025H,0002AH,00020H,0002DH,0006BH,000ADH,000ADH,000ADH	; all houkou
		WORD	0006BH,000CBH,000CBH,000CBH,000CBH,000CCH,000CCH,000CCH
		WORD	000A6H,000A6H,0006BH,000CBH,0005EH,000CDH,000CDH
;					osu
		WORD	000E0H,000E1H,000E2H,000E0H,000E3H,000E4H	; up
		WORD	000E5H,000E6H,000E7H,000E5H,000E8H,000E9H	; down
		WORD	000EAH,000EBH,000ECH,000EAH,000EBH,000ECH	; left
		WORD	000EDH,000EEH,000EFH,000EDH,000EEH,000EFH	; right
;					hiku
;;;;;;;;		WORD	00020H,000D8H,000D9H,000F0H,000F1H	; all houkou
		WORD	00101H,00117H,00117H,00117H,00117H	; all houkou
		WORD	000F0H,000F1H,000FFH,0005EH
		WORD	000DBH,000FFH
;					no hiku
		WORD	00101H,00117H,00117H,00117H	; up
		WORD	00104H,00118H,00118H,00118H	; down
		WORD	00107H,00119H,00119H,00119H	; left
		WORD	0010AH,0011AH,0011AH,0011AH	; right
;;;;;;;;		WORD	00101H,00102H,00103H,00103H,00103H	; up
;;;;;;;;		WORD	00104H,00105H,00106H,00106H,00106H	; down
;;;;;;;;		WORD	00107H,00108H,00109H,00109H,00109H	; left
;;;;;;;;		WORD	0010AH,0010BH,0010CH,0010CH,0010CH	; right
;					naname walk 0 (dasen kaidan)
		WORD	000F5H,000F6H,000F7H	; up
		WORD	000F2H,000F3H,000F4H	; down
;					naname walk 1 (dasen kaidan)
		WORD	000FBH,000FCH,000FDH	; up
		WORD	000F8H,000F9H,000FAH	; down
;					game over
		WORD	00005H,0000AH,00000H,0000DH,00110H,00111H
;					foot shot
		WORD	00000H,00021H,00074H; up
		WORD	00005H,00075H,00076H; down
		WORD	0002AH,0001AH,00077H; left
		WORD	0002DH,0001EH,00078H; right
;					aitem motsu porze (0)
		WORD	00112H
;					aitem motsu porze (1)
		WORD	00113H
;					oopning neru
		WORD	00114H,00115H
;					boogsn 
		WORD	00012H		; up
		WORD	00016H		; dwon
		WORD	0001AH		; left
		WORD	0001EH		; right
;					usagi
		WORD	0011BH,0011CH,0011BH,0011DH	;up
		WORD	0011EH,0011FH,0011EH,00120H	;down
		WORD	00121H,00122H,00121H,00122H	;left
		WORD	00123H,00124H,00123H,00124H	;right
;					soromon (baria)
		WORD	0006FH,00125H,00126H; up
		WORD	0006AH,000CBH,00048H; down
		WORD	00071H,00063H,0001AH; left
		WORD	00127H,00066H,0001EH; right
;					 ami
		WORD	00069H,000CBH,0006BH,0000AH,0000AH,0006DH
		WORD	0006DH,0000DH,0000DH,00070H,00072H,0006EH
;					clear demo
		WORD	000CBH
;					book read demo
		WORD	00129H
;					item hiku demo
		WORD	0012BH,0012CH,0012DH,0012EH,0003FH
;					new ken move
		WORD	00010H,00010H,0004FH,0004FH,00126H,00050H ; up
		WORD	00126H,00013H,00013H
		WORD	00014H,00014H,00015H,00015H,00051H,00052H ; down
		WORD	00051H,00017H,00017H
		WORD	00018H,00018H,00019H,00082H,00083H,00084H ; left
		WORD	00085H,00086H,00086H
		WORD	0001CH,0001CH,0001DH,00079H,0007AH,0007BH ; rightp
		WORD	0007CH,00081H,00081H
UDMODE0		EQU	$		; tate mochi ude mode 0
;					hole
		HEX	000,0FF,0FF,002,003,004; hole
		HEX	0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,015,017	; up
		HEX	0FF,015,017	; down
		HEX	0FF,016,018	; left
		HEX	0FF,015,017	; right
;					swim move
		HEX	013,00B,00F,0FF	; up
		HEX	011,009,00D,0FF	; down
		HEX	009,012,00D,0FF	; left
		HEX	00A,011,00F,0FF	; right
;					item spcial
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,004,003,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					hiku
		HEX	0FF,017,017,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,017,017,0FF	; up
		HEX	0FF,015,015,0FF	; down
		HEX	0FF,018,018,0FF	; left
		HEX	0FF,017,017,0FF	; right
;					new ken move
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF ; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF ; down
		HEX	0FF,0FF,0FF,0FF,01A,01A,01A,0FF,0FF ; left
		HEX	0FF,0FF,0FF,0FF,019,019,019,0FF,0FF ; right
;
UDMODE1		EQU	$		; tate mochi ude mode data 1
;					hole
PUD000		HEX	001,0FF,0FF,0FF,0FF,0FF; hole
		HEX	0FF,0FF,0FF,0FF
;					motsu 1
PUD001		HEX	0FF,016,018	; up
PUD002		HEX	0FF,016,018	; down
PUD003		HEX	0FF,0FF,0FF	; left
PUD004		HEX	0FF,0FF,0FF	; right
;					swim move
PUD005		HEX	014,00C,010,0FF	; up
PUD006		HEX	012,00A,00E,0FF	; down
PUD007		HEX	0FF,0FF,0FF,0FF	; left
PUD008		HEX	0FF,0FF,0FF,0FF	; right
;					item spcial
PUD009		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					hiku
PUD00A		HEX	0FF,018,018,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
PUD00B		HEX	0FF,018,018,0FF	; up
PUD00C		HEX	0FF,016,016,0FF	; down
PUD00D		HEX	0FF,0FF,0FF,0FF	; left
PUD00E		HEX	0FF,0FF,0FF,0FF	; right
;					new ken move
PUD00F		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF ; up
PUD010		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF ; down
PUD011		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF ; left
PUD012		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF ; right
;
KNMODE		EQU	$		; ken mode data
;					run
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; up
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; down
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; left
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; right
;					ken move
		BYTE	KC01,KC05,KC0E,KC1A,KC06,KC08,KC10,KC14,KC00; up
		BYTE	KC00,KC02,KC0D,KC19,KC07,KC0B,KC13,KC17,KC01; down
		BYTE	KC06,KC08,KC10,KC14,KC00,KC02,KC0D,KC19,KC07; left
		BYTE	KC06,KC0A,KC12,KC16,KC01,KC04,KC0F,KC1B,KC07; right
;;;;;;;;;					kamae
;;;;;;;;		BYTE	KC0A,KC0A,KC0A,KC0A,KC0A,KC0A; up
;;;;;;;;		BYTE	KC09,KC09,KC09,KC09,KC09,KC09; down
;;;;;;;;		BYTE	KC02,KC02,KC02,KC02,KC02,KC02; left
;;;;;;;;		BYTE	KC04,KC04,KC04,KC04,KC04,KC04; right
;					kamae
		BYTE	KC0A,KC0A,KC0A,KC0A,KC0A,KC0A; up
		BYTE	KC09,KC09,KC09,KC09,KC09,KC09; down
		BYTE	KC00,KC00,KC00,KC00,KC00,KC00; left
		BYTE	KC01,KC01,KC01,KC01,KC01,KC01; right
;					difence
		BYTE	KC06,KC0A,KC06; up
		BYTE	KC07,KC09,KC07; down
		BYTE	KC00,KC00,KC00; left
		BYTE	KC01,KC01,KC01; right
;					hole
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; hole
		BYTE	EGCD,EGCD,EGCD,EGCD
;					link jump
		BYTE	KC08		; up
		BYTE	KC0A		; down
		BYTE	KC0A		; left
		BYTE	KC08		; right
;                               lot,hanmer move
                BYTE    DT03,DT00,DT04; up
                BYTE    DT00,DT05,DT01; down
                BYTE    DT02,DT08,DT09; left
                BYTE    DT02,DT06,DT07; right
;;;;;;;;;					lot kamae
;;;;;;;;		BYTE	DT03,DT03,DT03,DT03,DT03,DT03; up
;;;;;;;;		BYTE	DT01,DT01,DT01,DT01,DT01,DT01; down
;;;;;;;;		BYTE	DT09,DT09,DT09,DT09,DT09,DT09; left
;;;;;;;;		BYTE	DT07,DT07,DT07,DT07,DT07,DT07; right
;					yumi
		BYTE	YC03,YC00,YC00; up
		BYTE	YC02,YC01,YC01; down
		BYTE	YC05,YC03,YC03; left
		BYTE	YC06,YC02,YC02; right
;;;;;;;;;					hane jump
;;;;;;;;		BYTE	EGCD,EGCD; up
;;;;;;;;		BYTE	EGCD,EGCD; down
;;;;;;;;		BYTE	EGCD,EGCD; left
;;;;;;;;		BYTE	EGCD,EGCD; right
;					bumeran
		BYTE	EGCD,EGCD	; up
		BYTE	EGCD,EGCD	; down
		BYTE	EGCD,EGCD	; left
		BYTE	EGCD,EGCD	; right
;					walk
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; down
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; left
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; right
;;;;;;;;;					aisatsu
;;;;;;;;		BYTE	EGCD,EGCD	; up
;;;;;;;;		BYTE	EGCD,EGCD	; down
;;;;;;;;		BYTE	EGCD,EGCD	; left
;;;;;;;;		BYTE	EGCD,EGCD	; right
;					inoru
		BYTE	EGCD,EGCD,EGCD,EGCD; all houkou
;;;;;;;;;					neru
;;;;;;;;		BYTE	EGCD,EGCD	; all houkou
;					horu
		BYTE	SC02,SC02,SC03	; left
		BYTE	SC00,SC00,SC01	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD; all houkou
;;;;;;;;;					odoru
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD; all houkou
;;;;;;;;;					taberu
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD; all houkou
;					tsukamu
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; up
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; down
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; left
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; right
;					motsu 0
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; up
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; down
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; left
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD; right
;					special ken furi
		BYTE	KC0A,KC08,KC05,KC04,KC0B,KC09,KC02,KC03
		BYTE	KC08,KC0A,KC09,KC0B,KC04,KC05,KC03,KC02
;					motsu 1
		BYTE	EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD	; down
		BYTE	EGCD,EGCD,EGCD	; left
		BYTE	EGCD,EGCD,EGCD	; right
;					swim stop
		BYTE	EGCD,EGCD		; up
		BYTE	EGCD,EGCD		; down
		BYTE	EGCD,EGCD		; left
		BYTE	EGCD,EGCD		; right
;					swim move
		BYTE	EGCD,EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD,EGCD	; down
		BYTE	EGCD,EGCD,EGCD,EGCD	; left
		BYTE	EGCD,EGCD,EGCD,EGCD	; right
;					swim dasei move
		BYTE	EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD	; down
		BYTE	EGCD,EGCD,EGCD	; left
		BYTE	EGCD,EGCD,EGCD	; right
;					piri piri
		BYTE	EGCD,KC00,KC03,KC03	; up
		BYTE	EGCD,KC01,KC05,KC05	; down
		BYTE	EGCD,KC00,KC03,KC03	; left
		BYTE	EGCD,KC01,KC05,KC05	; right
;					item spcial
		BYTE	KC09,KC02,KC06,KC04,KC04,KC0A,KC06,KC06	; all houkou
		BYTE	KC0A,KC06,KC08,KC08,KC08,KC01,KC04,KC0F
		BYTE	KC0B,KC07,KC04,KC0A,KC06,KC07,KC1C
;					osu
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; down
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; left
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD	; right
;					hiku
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD	; all houkou
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD	; all houkou
		BYTE	EGCD,EGCD,EGCD,EGCD
		BYTE	EGCD,EGCD
;					no hiku
		BYTE	EGCD,EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD,EGCD	; down
		BYTE	EGCD,EGCD,EGCD,EGCD	; left
		BYTE	EGCD,EGCD,EGCD,EGCD	; right
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD	; up
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD	; down
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD	; left
;;;;;;;;		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD	; right
;					naname walk 0 (dasen kaidan)
		BYTE	EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD	; down
;					naname walk 1 (dasen kaidan)
		BYTE	EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD	; down
;					game over
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD,EGCD
;					foot shot
		BYTE	EGCD,EGCD,EGCD; up
		BYTE	EGCD,EGCD,EGCD; down
		BYTE	EGCD,EGCD,EGCD; left
		BYTE	EGCD,EGCD,EGCD; right
;					aitem motsu porze (0)
		BYTE	EGCD
;					aitem motsu porze (1)
		BYTE	EGCD
;					oopning neru
		BYTE	EGCD,EGCD
;					bomber 
		BYTE	BR00		; up
		BYTE	BR01		; dwon
		BYTE	BR02		; left
		BYTE	BR03		; right
;					usagi
		BYTE	EGCD,EGCD,EGCD,EGCD	; up
		BYTE	EGCD,EGCD,EGCD,EGCD	; down
		BYTE	EGCD,EGCD,EGCD,EGCD	; left
		BYTE	EGCD,EGCD,EGCD,EGCD	; right
;					soromon (baria)
		BYTE	SR02,SR02,SR04; up
		BYTE	SR02,SR02,SR01; down
		BYTE	SR05,SR02,SR08; left
		BYTE	SR07,SR03,SR06; right
;					 ami
		BYTE	AM00,AM00,AM01,AM02,AM03,AM04
		BYTE	AM05,AM06,AM07,AM08,AM09,AM0A
;					clear demo
		BYTE	KC06
;					book read demo
		BYTE	BK00
;					item hiku demo
		BYTE	EGCD,EGCD,EGCD,EGCD,EGCD
;					new ken move
		BYTE	KC01,KC05,KC0E,KC1A,KC0A,KC06,KC08,KC10,KC14; up
		BYTE	KC00,KC02,KC0D,KC19,KC09,KC07,KC0B,KC13,KC17; down
		BYTE	KC06,KC08,KC10,KC14,KC03,KC00,KC02,KC0D,KC19; left
		BYTE	KC06,KC0A,KC12,KC16,KC05,KC01,KC04,KC0F,KC1B; right
TTMODE		EQU	$		; tate mode data
;					run
		HEX	001,001,001,001,001,001,001,001,001; up
		HEX	000,000,000,000,000,000,000,000,000; down
		HEX	003,003,003,003,003,003,003,003,003; left
		HEX	002,002,002,002,002,002,002,002,002; right
;					ken move
		HEX	000,000,000,000,002,002,002,002,002; up
		HEX	001,001,001,001,003,003,003,003,003; down
		HEX	001,001,001,001,001,001,001,001,001; left
		HEX	001,001,001,001,001,001,001,001,001; right
;					kamae
		HEX	002,002,002,002,002,002; up
		HEX	003,003,003,003,003,003; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					difence
		HEX	002,002,002; up
		HEX	003,003,003; down
		HEX	001,001,001; left
		HEX	001,001,001; right
;					hole
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; hole 
		HEX	0FF,0FF,0FF,0FF
;					link jump
		HEX	001		; up
		HEX	000		; down
		HEX	001		; left
		HEX	001		; right
;				lot,hanmer move
		HEX	002,002,002; up
		HEX	003,003,003; down
		HEX	001,001,001; left
		HEX	001,001,001; right
;;;;;;;;;					lot kamae
;;;;;;;;		HEX	001,001,001,001,001,001; up
;;;;;;;;		HEX	000,000,000,000,000,000; down
;;;;;;;;		HEX	003,003,003,003,003,003; left
;;;;;;;;		HEX	002,002,002,002,002,002; right
;					yumi
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;;;;;;;;;					hane jump
;;;;;;;;		HEX	0FF,0FF; up
;;;;;;;;		HEX	0FF,0FF; down
;;;;;;;;		HEX	0FF,0FF; left
;;;;;;;;		HEX	0FF,0FF; right
;					bumeran
		HEX	001,002	; up
		HEX	000,003	; down
		HEX	003,001	; left
		HEX	002,001	; right
;					walk
		HEX	001,001,001,001,001,001	; up
		HEX	000,000,000,000,000,000	; down
		HEX	003,003,003,003,003,003	; left
		HEX	002,002,002,002,002,002	; right
;;;;;;;;;					aisatsu
;;;;;;;;		HEX	0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF	; right
;					inoru
		HEX	0FF,0FF,0FF,0FF; all houkou
;;;;;;;;;					neru
;;;;;;;;		HEX	0FF,0FF	; all houkou
;					horu
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;					tsukamu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					motsu 0
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					special ken furi
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					swim stop
		HEX	0FF,0FF		; up
		HEX	0FF,0FF		; down
		HEX	0FF,0FF		; left
		HEX	0FF,0FF		; right
;					swim move
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					swim dasei move
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					piri piri
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					item special
		HEX	000,003,001,002,000,000,000,000	; all houkou
		HEX	000,000,000,000,000,003,003,003
		HEX	003,003,000,000,003,000,000
;					osu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; right
;					hiku
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; right
;					naname walk 0 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					naname walk 1 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					game over
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					foot shot
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					aitem motsu porze (0)
		HEX	003
;					aitem motsu porze (1)
		HEX	0FF
;					oopning neru
		HEX	0FF,0FF
;					bomber 
		HEX	002		; up
		HEX	003		; dwon
		HEX	0FF		; left
		HEX	0FF		; right
;					usagi
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					soromon (baria)
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					 ami
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					clear demo
		HEX	0FF
;					book read demo
		HEX	0FF
;					item hiku demo
		HEX	0FF,0FF,0FF,0FF,0FF
;					new ken move
		HEX	002,002,002,002,002,002,002,002,002; up
		HEX	003,003,003,003,003,003,003,003,003; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; right
;************	ken x,y-pos data
KNYPSD		EQU	$		; ken y-pos data
;					run
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; right
;					ken move
		HEX	009,005,0FE,0FA,0F8,0FB,0FD,0FF,009; up
		HEX	00B,00F,00D,011,013,011,00F,00D,00B; down
		HEX	0FE,002,003,004,00C,00F,00E,013,013; left
		HEX	0FE,002,003,004,00C,00F,00E,013,013; right
;;;;;;;;;					kamae
;;;;;;;;		HEX	0FB,0FC,0FD,0FB,0FC,0FD; up
;;;;;;;;		HEX	010,011,012,010,011,012; down
;;;;;;;;		HEX	010,011,012,010,011,012; left
;;;;;;;;		HEX	010,011,012,010,011,012; right
;					kamae
		HEX	0FB,0FC,0FD,0FB,0FC,0FD; up
		HEX	010,011,012,010,011,012; down
		HEX	00D,00E,00F,00D,00E,00F; left
		HEX	00D,00E,00F,00D,00E,00F; right
;					difence
		HEX	0FD,0F9,002; up
		HEX	00C,012,010; down
		HEX	00F,00D,00A; left
		HEX	00F,00D,00A; right
;					hole
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; hole
		HEX	0FF,0FF,0FF,0FF
;					link jump
		HEX	002		; up
		HEX	003		; down
		HEX	006		; left
		HEX	006		; right
;                               lot,hanmer move
                HEX     0F8,0FD,0FD; up
                HEX     0FD,00A,012; down
                HEX     0FE,002,00E; left
                HEX     0FE,002,00E; right
;;;;;;;;;					lot kamae
;;;;;;;;		HEX	0FD,0FE,0FF,0FD,0FE,0FF; up
;;;;;;;;		HEX	00E,00F,010,00E,00F,010; down
;;;;;;;;		HEX	00E,00F,010,00E,00F,010; left
;;;;;;;;		HEX	00E,00F,010,00E,00F,010; right
;					yumi
		HEX	005,009,009; up
		HEX	009,00D,00D; down
		HEX	00A,007,007; left
		HEX	00A,007,007; right
;;;;;;;;;					hane jump
;;;;;;;;		HEX	0FF,0FF; up
;;;;;;;;		HEX	0FF,0FF; down
;;;;;;;;		HEX	0FF,0FF; left
;;;;;;;;		HEX	0FF,0FF; right
;					bumeran
		HEX	0FF,0FF	; up
		HEX	0FF,0FF	; down
		HEX	0FF,0FF	; left
		HEX	0FF,0FF	; right
;					walk
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; right
;;;;;;;;;					aisatsu
;;;;;;;;		HEX	0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF	; right
;					inoru
		HEX	0FF,0FF,0FF,0FF; all houkou
;;;;;;;;;					neru
;;;;;;;;		HEX	0FF,0FF	; all houkou
;					horu
		HEX	00A,00B,0FC	; left
		HEX	00A,00B,0FC	; up,down,rihgt
;;;;;;;;;					utau
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;					tsukamu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					motsu 0
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					special ken furi
		HEX	0FC,0F8,006,00F,012,012,00E,006
		HEX	0F9,0F9,00E,011,010,008,005,00C
;					motsu 1
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					swim stop
		HEX	0FF,0FF		; up
		HEX	0FF,0FF		; down
		HEX	0FF,0FF		; left
		HEX	0FF,0FF		; right
;					swim move
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					swim dasei move
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					piri piri
		HEX	0FF,008,006,00A	; up
		HEX	0FF,008,006,00A	; down
		HEX	0FF,008,006,00A	; left
		HEX	0FF,008,006,00A	; right
;					item special
		HEX	010,010,0FB,010,00D,0FC,0FB,0FB	; all houkou
		HEX	0FF,0FB,0FB,0FB,0FB,00B,00F,00D
		HEX	011,013,00D,0FD,0F9,012,012
;					osu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; right
;					hiku
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; right
;					naname walk 0 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					naname walk 1 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					game over
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					foot shot
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					aitem motsu porze (0)
		HEX	0FF
;					aitem motsu porze (1)
		HEX	0FF
;					oopning neru
		HEX	0FF,0FF
;					bomber 
		HEX	002		; up
		HEX	011		; dwon
		HEX	00C		; left
		HEX	00C		; right
;					usagi
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					soromon (baria)
		HEX	005,0FE,0F7; up
		HEX	0F9,0FE,010; down
		HEX	002,0FE,00C; left
		HEX	002,0FE,00C; right
;					 ami
		HEX	0FC,0FB,004,00E,014,00F
		HEX	008,0FD,0F8,00E,0FD,00F
;					clear demo
		HEX	0FB
;					book read demo
		HEX	000
;					item hiku demo
		HEX	0FF,0FF,0FF,0FF,0FF
;					new ken move
		HEX	009,005,0FD,0F7,0F5,0F1,0F7,0FC,000; up
		HEX	00B,00E,00C,011,013,017,011,00F,00D; down
		HEX	0FE,0FF,000,000,009,00C,010,010,013; left
		HEX	0FE,0FF,000,000,009,00C,010,010,013; right
KNXPSD		EQU	$		; ken x-pos data
;					run
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; right
;					ken move
		HEX	00B,00A,006,002,000,0FC,0F6,0F3,0F1; up
		HEX	0F8,0FA,0FB,0FD,008,00C,00A,00E,00F; down
		HEX	003,0FE,0F9,0F5,0F2,0F5,0F7,0F9,003; left
		HEX	005,00A,007,00B,00E,00B,009,007,005; right
;;;;;;;;					kamae
;;;;;;;;		HEX	000,000,000,000,000,000; up
;;;;;;;;		HEX	007,007,007,007,007,007; down
;;;;;;;;		HEX	0F7,0F7,0F7,0F7,0F7,0F7; left
;;;;;;;;		HEX	009,009,009,009,009,009; right
;					kamae
		HEX	000,000,000,000,000,000; up
		HEX	007,007,007,007,007,007; down
		HEX	0F6,0F6,0F6,0F6,0F6,0F6; left
		HEX	00A,00A,00A,00A,00A,00A; right
;					difence
		HEX	0FD,002,0FD; up
		HEX	00A,007,00A; down
		HEX	0F4,0F0,0F8; left
		HEX	00C,010,008; right
;					hole
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; hole
		HEX	0FF,0FF,0FF,0FF
;					link jump
		HEX	0FC		; up
		HEX	00C		; down
		HEX	008		; left
		HEX	000		; right
;                               lot,hanmer move
                HEX     0FE,0FE,0FE; up
                HEX     00A,00A,009; down
                HEX     001,0F6,0F5; left
                HEX     007,00A,00B; right
;;;;;;;;;					lot kamae
;;;;;;;;		HEX	0FD,0FD,0FD,0FD,0FD,0FD; up
;;;;;;;;		HEX	009,009,009,009,009,009; down
;;;;;;;;		HEX	0F7,0F7,0F7,0F7,0F7,0F7; left
;;;;;;;;		HEX	009,009,009,009,009,009; right
;					yumi
		HEX	0FE,0FB,0FB; up
		HEX	009,002,002; down
		HEX	0FE,0FD,0FD; left
		HEX	002,00B,00B; right
;;;;;;;;;					hane jump
;;;;;;;;		HEX	0FF,0FF; up
;;;;;;;;		HEX	0FF,0FF; down
;;;;;;;;		HEX	0FF,0FF; left
;;;;;;;;		HEX	0FF,0FF; right
;					bumeran
		HEX	0FF,0FF	; up
		HEX	0FF,0FF	; down
		HEX	0FF,0FF	; left
		HEX	0FF,0FF	; right
;					walk
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; right
;;;;;;;;;					aisatsu
;;;;;;;;		HEX	0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF	; right
;					inoru
		HEX	0FF,0FF,0FF,0FF; all houkou
;;;;;;;;;					neru
;;;;;;;;		HEX	0FF,0FF	; all houkou
;					horu
		HEX	0FD,0F9,008	; left
		HEX	003,007,000	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;					tsukamu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					motsu 0
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					special ken furi
		HEX	00D,006,00E,00E,008,0FF,0F2,0F2
		HEX	0FF,009,0FB,003,00A,00D,0F5,0F4
;					motsu 1
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					swim stop
		HEX	0FF,0FF		; up
		HEX	0FF,0FF		; down
		HEX	0FF,0FF		; left
		HEX	0FF,0FF		; right
;					swim move
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					swim dasei move
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					piri piri
		HEX	0FF,0F2,0F3,0F4	; up
		HEX	0FF,00E,00D,00C	; down
		HEX	0FF,0F2,0F3,0F4	; left
		HEX	0FF,00E,00D,00C	; right
;					item spcial
		HEX	007,0F7,000,009,00E,00E,00A,00A	; all houkou
		HEX	00E,00B,008,008,008,00F,00E,00C
		HEX	00C,008,00F,00E,00A,004,004
;					osu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; right
;					hiku
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; right
;					naname walk 0 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					naname walk 1 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					game over
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					foot shot
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					aitem motsu porze (0)
		HEX	0FF
;					aitem motsu porze (1)
		HEX	0FF
;					oopning neru
		HEX	0FF,0FF
;					bomber 
		HEX	004		; up
		HEX	004		; down
		HEX	0F9		; left
		HEX	00F		; right
;					usagi
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					soromon (baria)
		HEX	0FF,0FD,0FD; up
		HEX	009,00C,008; down
		HEX	00A,003,0F3; left
		HEX	0F6,005,00D; right
;					 ami
		HEX	00D,00D,010,00B,002,0F5
		HEX	0F0,0F7,000,008,0F7,0F5
;					clear demo
		HEX	00C
;					book read demo
		HEX	0F9
;					item hiku demo
		HEX	0FF,0FF,0FF,0FF,0FF
;					new ken move
		HEX	00B,009,007,006,003,0FF,0FB,0F5,0F2; up
		HEX	0F8,0F9,0FA,0FB,005,008,00C,00A,00E; down
		HEX	003,0FE,0F8,0F3,0F0,0EC,0F1,0F4,0F9; left
		HEX	005,00A,008,00D,010,014,00F,00C,007; right
;
;************	ude x,y-pos data
UDYPSD0		EQU	$		; tate mochi ude y-pos data
;					hole
		HEX	000,0FF,0FF,008,008,008; hole
		HEX	0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,007,00A	; up
		HEX	0FF,005,008	; down
		HEX	0FF,008,00C	; left
		HEX	0FF,008,00C	; right
;					swim move
		HEX	002,007,00D,0FF	; up
		HEX	014,00E,007,0FF	; down
		HEX	014,015,014,0FF	; left
		HEX	014,015,014,0FF	; right
;					item special
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0F8,0F8,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					hiku
		HEX	0FF,005,00B,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,005,00B,0FF	; up
		HEX	0FF,006,001,0FF	; down
		HEX	0FF,00D,00F,0FF	; left
		HEX	0FF,00D,00F,0FF	; right
;					new ken move
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,00C,00C,00C,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,00C,00C,00C,0FF,0FF; right
UDXPSD0		EQU	$		; tate mochi ude x-pos data
;					hole
		HEX	008,0FF,0FF,004,004,004; hole
		HEX	0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,0F9,0F7	; up
		HEX	0FF,0F8,0F6	; down
		HEX	0FF,00D,010	; left
		HEX	0FF,0FB,0F8	; right
;					swim move
		HEX	0FE,0FA,0FB,0FF	; up
		HEX	0FF,0FB,0FA,0FF	; down
		HEX	0FD,004,009,0FF	; left
		HEX	00B,004,0FF,0FF	; right
;					item special
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,004,004,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					hiku
		HEX	0FF,0FB,0F8,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,0FB,0F8,0FF	; up
		HEX	0FF,0FB,0F8,0FF	; down
		HEX	0FF,00F,011,0FF	; left
		HEX	0FF,0F9,0F7,0FF	; right
;					new ken move
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FD,0F9,0FD,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,00B,00F,00B,0FF,0FF; right
;
UDYPSD1		EQU	$		; tate mochi ude y-pos data
;					hole
		HEX	010,0FF,0FF,0FF,0FF,0FF; hole
		HEX	0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,007,00A	; up
		HEX	0FF,005,008	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					swim move
		HEX	002,007,00D,0FF	; up
		HEX	014,00E,007,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					item spcial
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					hiku
		HEX	0FF,005,00B,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,005,00B,0FF	; up
		HEX	0FF,006,001,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					new ken move
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; right
;
UDXPSD1		EQU	$		; tate mochi ude x-pos data
;					hole
		HEX	0F8,0FF,0FF,0FF,0FF,0FF; hole
		HEX	0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,00F,011	; up
		HEX	0FF,010,012	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					swim move
		HEX	00A,00E,00D,0FF	; up
		HEX	009,00E,00E,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					sunder
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					hiku
		HEX	0FF,00D,010,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,00D,010,0FF	; up
		HEX	0FF,00D,010,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					new ken move
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF; right
;
;************** tate y,x data
TTYPSD 		EQU	$		; tate y-pos data
;					run
		HEX	005,005,004,003,005,005,004,003,005; up
		HEX	009,00A,009,007,008,00A,009,007,008; down
		HEX	005,005,004,003,004,005,004,003,004; left
		HEX	005,005,004,003,004,005,004,003,004; right
;					ken move
		HEX	00C,00C,008,008,006,006,006,006,006; up
		HEX	001,001,003,003,007,007,007,007,007; down
		HEX	005,005,005,005,005,005,005,005,005; left
		HEX	005,005,005,005,005,005,005,005,005; right
;					kamae
		HEX	005,006,007,005,006,007; up
		HEX	006,007,008,006,007,008; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					difence
		HEX	007,005,007; up
		HEX	007,008,007; down
		HEX	005,005,005; left
		HEX	005,005,005; right
;					hole
		HEX	010,0FF,0FF,0FF,0FF,0FF; hole
		HEX	0FF,0FF,0FF,0FF
;					link jump
		HEX	005		; up
		HEX	008		; down
		HEX	007		; left
		HEX	007		; right
;				lot,hanmer move
		HEX	006,005,005; up
		HEX	007,007,007; down
		HEX	005,005,005; left
		HEX	005,005,005; right
;;;;;;;;;					lot kamae
;;;;;;;;		HEX	004,005,006,004,005,006; up
;;;;;;;;		HEX	00A,00B,00C,00A,00B,00C; down
;;;;;;;;		HEX	005,006,007,005,006,007; left
;;;;;;;;		HEX	005,006,007,005,006,007; right
;					yumi
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;;;;;;;;;					hane jump
;;;;;;;;		HEX	0FF,0FF; up
;;;;;;;;		HEX	0FF,0FF; down
;;;;;;;;		HEX	0FF,0FF; left
;;;;;;;;		HEX	0FF,0FF; right
;					bumeran
		HEX	006,006	; up
		HEX	00B,007	; down
		HEX	004,008	; left
		HEX	004,008	; right
;					walk
		HEX	004,005,006,004,005,006	; up
		HEX	00A,00B,00C,00A,00B,00C	; down
		HEX	005,006,007,005,006,007	; left
		HEX	005,006,007,005,006,007	; right
;;;;;;;;;					aisatsu
;;;;;;;;		HEX	0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF	; right
;					inoru
		HEX	0FF,0FF,0FF,0FF; all houkou
;;;;;;;;;					neru
;;;;;;;;		HEX	0FF,0FF	; all houkou
;					horu
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;					tsukamu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					motsu 0
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					special ken furi
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					swim stop
		HEX	0FF,0FF		; up
		HEX	0FF,0FF		; down
		HEX	0FF,0FF		; left
		HEX	0FF,0FF		; right
;					swim move
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					swim dasei move
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					piri piri
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					item special
		HEX	00A,005,004,005,00A,00A,00A,00A	; all houkou
		HEX	00A,00A,00A,00A,00A,007,007,007
		HEX	007,007,00A,00A,001,00A,00A
;					osu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; right
;					hiku
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; right
;					naname walk 0 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					naname walk 1 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					game over
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					foot shot
		HEX	005,005,005; up
		HEX	007,007,007; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					aitem motsu porze (0)
		HEX	009
;					aitem motsu porze (1)
		HEX	0FF
;					oopning neru
		HEX	0FF,0FF
;					bomber 
		HEX	005		; up
		HEX	007		; dwon
		HEX	0FF		; left
		HEX	0FF		; right
;					usagi
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					soromon (baria)
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					 ami
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					clear demo
		HEX	0FF
;					book read demo
		HEX	0FF
;					item hiku demo
		HEX	0FF,0FF,0FF,0FF,0FF
;					new ken move
		HEX	008,008,006,006,004,002,005,006,006; up
		HEX	001,001,004,004,006,008,006,006,006; down
		HEX	004,004,004,004,004,004,004,004,004; left
		HEX	004,004,004,004,004,004,004,004,004; right
TTXPSD 		EQU	$		; tate x-pos data
;					run
		HEX	005,005,005,005,005,005,005,005,005; up
		HEX	0FC,0FC,0FC,0FC,0FC,0FC,0FC,0FC,0FC; down
		HEX	0F8,0F8,0F8,0F8,0F8,0F8,0F8,0F8,0F8; left
		HEX	008,008,008,008,008,008,008,008,008; right
;					ken move
		HEX	006,006,008,008,00A,00A,00A,00A,00A; up
		HEX	0FB,0FB,0F9,0F9,0F6,0F6,0F6,0F6,0F6; down
		HEX	001,001,001,001,000,000,000,000,000; left
		HEX	0FF,0FF,0FF,0FF,000,000,000,000,000; right
;					kamae
		HEX	009,009,009,009,009,009; up
		HEX	0F7,0F7,0F7,0F7,0F7,0F7; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					difence
		HEX	00A,00A,00A; up
		HEX	0F6,0F6,0F6; down
		HEX	000,0FF,000; left
		HEX	000,001,000; right
;
		HEX	0FC,0FF,0FF,0FF,0FF,0FF; hole
		HEX	0FF,0FF,0FF,0FF
;					link jump
		HEX	008		; up
		HEX	0FC		; down
		HEX	002		; left
		HEX	0FD		; right
;				lot,hanmer move
		HEX	009,009,009; up
		HEX	0F6,0F6,0F6; down
		HEX	000,000,000; left
		HEX	000,000,000; right
;;;;;;;;;					lot kamae
;;;;;;;;		HEX	005,005,005,005,005,005; up
;;;;;;;;		HEX	0FC,0FC,0FC,0FC,0FC,0FC; down
;;;;;;;;		HEX	0F8,0F8,0F8,0F8,0F8,0F8; left
;;;;;;;;		HEX	008,008,008,008,008,008; right
;					yumi
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;;;;;;;;;					hane jump
;;;;;;;;		HEX	0FF,0FF; up
;;;;;;;;		HEX	0FF,0FF; down
;;;;;;;;		HEX	0FF,0FF; left
;;;;;;;;		HEX	0FF,0FF; right
;					bumeran
		HEX	005,009	; up
		HEX	0FC,0F6	; down
		HEX	000,000	; left
		HEX	008,000	; right
;					walk
		HEX	005,005,005,005,005,005	; up
		HEX	0FC,0FC,0FC,0FC,0FC,0FC	; down
		HEX	0F8,0F8,0F8,0F8,0F8,0F8	; left
		HEX	008,008,008,008,008,008	; right
;;;;;;;;;					aisatsu
;;;;;;;;		HEX	0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF	; right
;					inoru
		HEX	0FF,0FF,0FF,0FF; all houkou
;;;;;;;;;					neru
;;;;;;;;		HEX	0FF,0FF	; all houkou
;					horu
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		HEX	0FF,0FF,0FF,0FF	; all houkou
;					tsukamu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					motsu 0
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF; right
;					special ken furi
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF,0FF,0FF
;					motsu 1
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					swim stop
		HEX	0FF,0FF		; up
		HEX	0FF,0FF		; down
		HEX	0FF,0FF		; left
		HEX	0FF,0FF		; right
;					swim move
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					swim dasei move
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF	; right
;					piri piri
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					item special
		HEX	0FC,0F8,005,008,0FC,0FC,0FC,0FC	; all houkou
		HEX	0FB,0FB,0FB,0FB,0FB,0F6,0F6,0F6
		HEX	0F6,0F6,0FB,0FB,0F9,0FC,0FC
;					osu
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF,0FF,0FF	; right
;					hiku
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF,0FF	; all houkou
		HEX	0FF,0FF,0FF,0FF
		HEX	0FF,0FF
;					no hiku
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; up
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; down
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; left
;;;;;;;;		HEX	0FF,0FF,0FF,0FF,0FF	; right
;					naname walk 0 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					naname walk 1 (dasen kaidan)
		HEX	0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF	; down
;					game over
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					bomber
		HEX	009,009,009; up
		HEX	0F6,0F6,0F6; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					aitem motsu porze (0)
		HEX	0FA
;					aitem motsu porze (1)
		HEX	0FF
;					oopning neru
		HEX	0FF,0FF
;					fotshot 
		HEX	00A		; up
		HEX	0F6		; dwon
		HEX	0FF		; left
		HEX	0FF		; right
;					usagi
		HEX	0FF,0FF,0FF,0FF	; up
		HEX	0FF,0FF,0FF,0FF	; down
		HEX	0FF,0FF,0FF,0FF	; left
		HEX	0FF,0FF,0FF,0FF	; right
;					soromon (baria)
		HEX	0FF,0FF,0FF; up
		HEX	0FF,0FF,0FF; down
		HEX	0FF,0FF,0FF; left
		HEX	0FF,0FF,0FF; right
;					 ami
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
		HEX	0FF,0FF,0FF,0FF,0FF,0FF
;					clear demo
		HEX	0FF
;					book read demo
		HEX	0FF
;					item hiku demo
		HEX	0FF,0FF,0FF,0FF,0FF
;					new ken move
		HEX	00A,00A,00A,00A,00A,00A,00A,00A,00A; up
		HEX	0F7,0F7,0F7,0F7,0F6,0F6,0F6,0F6,0F6; down
		HEX	001,001,001,002,002,002,001,002,002; left
		HEX	0FF,0FF,0FF,0FE,0FE,0FE,0FF,0FE,0FE; right
;************** kage y,x data
KGYPSD 		EQU	$		; kage y-pos data
;		          U   D   L   R 
		HEX	010,010,011,011		; walk
		HEX	010,010,010,010		; smoll tate asase
		HEX	012,012,012,012		; big tate asase
KGXPSD 		EQU	$		; kage x-pos data
;			  U   D   L   R
		HEX	000,000,0FF,001
		HEX	000,000,000,000
		HEX	000,000,000,000
;************	enmy hani data
ENMYDT		EQU	$		; enmy hani y-pos data
;					run
		HEX	080,080,080,080,080,080,080,080,080; up
		HEX	080,080,080,080,080,080,080,080,080; down
		HEX	080,080,080,080,080,080,080,080,080; left
		HEX	080,080,080,080,080,080,080,080,080; right
;					ken move
		HEX	009,005,0FE,0FA,0F8,0FB,0FD,007,009; up
		HEX	00B,00F,015,019,01B,019,017,00D,00B; down
		HEX	0FE,002,003,00C,00C,00F,016,01B,01B; left
		HEX	0FE,002,003,00C,00C,00F,016,01B,01B; right
;;;;;;;;					kamae
;;;;;;;;		HEX	0FB,0FC,0FD,0FB,0FC,0FD; up
;;;;;;;;		HEX	018,019,01A,018,019,01A; down
;;;;;;;;		HEX	010,011,012,010,011,012; left
;;;;;;;;		HEX	010,011,012,010,011,012; right
;					kamae
		HEX	0FB,0FC,0FD,0FB,0FC,0FD; up
		HEX	018,019,01A,018,019,01A; down
		HEX	00D,00E,00F,00D,00E,00F; left
		HEX	00D,00E,00F,00D,00E,00F; right
;					difence
		HEX	0FD,0F9,002; up
		HEX	014,01A,018; down
		HEX	00A,00D,00F; left
		HEX	00A,00D,00F; right
;					hole
		HEX	080,080,080,080,080,080; hole
		HEX	080,080,080,080
;					link jump
		HEX	080		; up
		HEX	080		; down
		HEX	080		; left
		HEX	080		; right
;				lot,hanmer move
		HEX	0F9,0FF,0FE; up
		HEX	0FD,00A,01A; down
		HEX	0FE,003,00E; left
		HEX	0FE,003,00E; right
;;;;;;;;;					lot kamae
;;;;;;;;		HEX	080,080,080,080,080,080; up
;;;;;;;;		HEX	080,080,080,080,080,080; down
;;;;;;;;		HEX	080,080,080,080,080,080; left
;;;;;;;;		HEX	080,080,080,080,080,080; right
;					yumi
		HEX	080,080,080; up
		HEX	080,080,080; down
		HEX	080,080,080; left
		HEX	080,080,080; right
;;;;;;;;;					hane jump
;;;;;;;;		HEX	080,080; up
;;;;;;;;		HEX	080,080; down
;;;;;;;;		HEX	080,080; left
;;;;;;;;		HEX	080,080; right
;					bumeran
		HEX	080,080	; up
		HEX	080,080	; down
		HEX	080,080	; left
		HEX	080,080	; right
;					walk
		HEX	080,080,080,080,080,080	; up
		HEX	080,080,080,080,080,080	; down
		HEX	080,080,080,080,080,080	; left
		HEX	080,080,080,080,080,080	; right
;;;;;;;;;					aisatsu
;;;;;;;;		HEX	080,080	; up
;;;;;;;;		HEX	080,080	; down
;;;;;;;;		HEX	080,080	; left
;;;;;;;;		HEX	080,080	; right
;					inoru
		HEX	080,080,080,080; all houkou
;;;;;;;;;					neru
;;;;;;;;		HEX	080,080	; all houkou
;					horu
		HEX	080,080,080	; left
		HEX	080,080,080	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		HEX	080,080,080,080	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		HEX	080,080,080,080	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		HEX	080,080,080,080	; all houkou
;					tsukamu
		HEX	080,080,080,080,080,080; up
		HEX	080,080,080,080,080,080; down
		HEX	080,080,080,080,080,080; left
		HEX	080,080,080,080,080,080; right
;					motsu 0
		HEX	080,080,080,080,080,080; up
		HEX	080,080,080,080,080,080; down
		HEX	080,080,080,080,080,080; left
		HEX	080,080,080,080,080,080; right
;					special ken furi
		HEX	0FC,0F8,006,00F,01A,01A,00E,006
		HEX	0F9,0F9,016,01A,010,008,005,00C
;					motsu 1
		HEX	080,080,080	; up
		HEX	080,080,080	; down
		HEX	080,080,080	; left
		HEX	080,080,080	; right
;					swim stop
		HEX	080,080		; up
		HEX	080,080		; down
		HEX	080,080		; left
		HEX	080,080		; right
;					swim move
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;					swim dasei move
		HEX	080,080,080	; up
		HEX	080,080,080	; down
		HEX	080,080,080	; left
		HEX	080,080,080	; right
;					piri piri
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;					item special
		HEX	018,010,0FB,010,00D,0FC,0FB,0FB	; all houkou
		HEX	0FF,0FB,0FB,0FB,0FB,00B,00F,015
		HEX	019,01B,00D,0FD,0F9,01A,012
;					osu
		HEX	080,080,080,080,080,080	; up
		HEX	080,080,080,080,080,080	; down
		HEX	080,080,080,080,080,080	; left
		HEX	080,080,080,080,080,080	; right
;					hiku
		HEX	080,080,080,080,080	; all houkou
		HEX	080,080,080,080
		HEX	080,080
;					no hiku
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;;;;;;;;		HEX	080,080,080,080,080,080	; up
;;;;;;;;		HEX	080,080,080,080,080,080	; down
;;;;;;;;		HEX	080,080,080,080,080,080	; left
;;;;;;;;		HEX	080,080,080,080,080,080	; right
;					naname walk 0 (dasen kaidan)
		HEX	080,080,080	; up
		HEX	080,080,080	; down
;					naname walk 1 (dasen kaidan)
		HEX	080,080,080	; up
		HEX	080,080,080	; down
;					game over
		HEX	080,080,080,080,080,080
;					foot shot
		HEX	080,080,080; up
		HEX	080,080,080; down
		HEX	080,080,080; left
		HEX	080,080,080; right
;					aitem motsu porze (0)
		HEX	080
;					aitem motsu porze (1)
		HEX	080
;					oopning neru
		HEX	080,080
;					bomber 
		HEX	080		; up
		HEX	080		; dwon
		HEX	080		; left
		HEX	080		; right
;					usagi
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;					soromon (baria)
		HEX	080,080,080; up
		HEX	080,080,080; down
		HEX	080,080,080; left
		HEX	080,080,080; right
;					 ami
		HEX	0FC,0FB,004,00E,014,00F
		HEX	008,0FD,0F8,00E,0FD,00F
;					clear demo
		HEX	080
;					book read demo
		HEX	080
;					item hiku demo
		HEX	080,080,080,080,080
;					new ken move
		HEX	009,005,0FD,0F7,0F5,0F1,0F7,0FC,008; up
		HEX	00B,00E,014,019,01B,01F,019,017,00D; down
		HEX	0FE,0FF,000,008,009,00C,010,018,01E; left
		HEX	0FE,0FF,000,008,009,00C,010,018,01E; right
ENMXDT		EQU	$		; enmy hani x-pos data
;					run
		HEX	080,080,080,080,080,080,080,080,080; up
		HEX	080,080,080,080,080,080,080,080,080; down
		HEX	080,080,080,080,080,080,080,080,080; left
		HEX	080,080,080,080,080,080,080,080,080; right
;					ken move
		HEX	013,012,00E,00A,000,0FC,0F6,0F3,0F1; up
		HEX	0F8,0FA,0FB,005,008,00C,012,016,017; down
		HEX	003,0FE,0F9,0F5,0F2,0F5,0F7,001,003; left
		HEX	005,00A,00F,013,016,013,011,007,005; right
;;;;;;;;;					kamae
;;;;;;;;		HEX	000,000,000,000,000,000; up
;;;;;;;;		HEX	007,007,007,007,007,007; down
;;;;;;;;		HEX	0EF,0EF,0EF,0EF,0EF,0EF; left
;;;;;;;;		HEX	011,011,011,011,011,011; right
;					kamae
		HEX	000,000,000,000,000,000; up
		HEX	007,007,007,007,007,007; down
		HEX	0F6,0F6,0F6,0F6,0F6,0F6; left
		HEX	012,012,012,012,012,012; right
;					difence
		HEX	0FD,002,0FD; up
		HEX	00A,007,00A; down
		HEX	0F0,0E8,0EC; left
		HEX	010,018,014; right
;					hole
		HEX	080,080,080,080,080,080; hole
		HEX	080,080,080,080
;					link jump
		HEX	080		; up
		HEX	080		; down
		HEX	080		; left
		HEX	080		; right
;				lot,hanmer move
		HEX	0FE,0FE,0FE; up
		HEX	00A,00A,00A; down
		HEX	001,0F6,0F5; left
		HEX	007,012,013; right
;;;;;;;;;					lot kamae
;;;;;;;;		HEX	080,080,080,080,080,080; up
;;;;;;;;		HEX	080,080,080,080,080,080; down
;;;;;;;;		HEX	080,080,080,080,080,080; left
;;;;;;;;		HEX	080,080,080,080,080,080; right
;					yumi
		HEX	080,080,080; up
		HEX	080,080,080; down
		HEX	080,080,080; left
		HEX	080,080,080; right
;;;;;;;;;					hane jump
;;;;;;;;		HEX	080,080; up
;;;;;;;;		HEX	080,080; down
;;;;;;;;		HEX	080,080; left
;;;;;;;;		HEX	080,080; right
;					bumeran
		HEX	080,080	; up
		HEX	080,080	; down
		HEX	080,080	; left
		HEX	080,080	; right
;					walk
		HEX	080,080,080,080,080,080	; up
		HEX	080,080,080,080,080,080	; down
		HEX	080,080,080,080,080,080	; left
		HEX	080,080,080,080,080,080	; right
;;;;;;;;;					aisatsu
;;;;;;;;		HEX	080,080	; up
;;;;;;;;		HEX	080,080	; down
;;;;;;;;		HEX	080,080	; left
;;;;;;;;		HEX	080,080	; right
;					inoru
		HEX	080,080,080,080; all houkou
;;;;;;;;;					neru
;;;;;;;;		HEX	080,080	; all houkou
;					horu
		HEX	080,080,080	; left
		HEX	080,080,080	; up,down,right
;;;;;;;;;					utau
;;;;;;;;		HEX	080,080,080,080	; all houkou
;;;;;;;;;					odoru
;;;;;;;;		HEX	080,080,080,080	; all houkou
;;;;;;;;;					taberu
;;;;;;;;		HEX	080,080,080,080	; all houkou
;					tsukamu
		HEX	080,080,080,080,080,080; up
		HEX	080,080,080,080,080,080; down
		HEX	080,080,080,080,080,080; left
		HEX	080,080,080,080,080,080; right
;					motsu 0
		HEX	080,080,080,080,080,080; up
		HEX	080,080,080,080,080,080; down
		HEX	080,080,080,080,080,080; left
		HEX	080,080,080,080,080,080; right
;					special ken furi
		HEX	00D,006,016,016,008,0FF,0F2,0F2
		HEX	0FF,009,0FB,003,012,015,0F5,0F4
;					motsu 1
		HEX	080,080,080	; up
		HEX	080,080,080	; down
		HEX	080,080,080	; left
		HEX	080,080,080	; right
;					swim stop
		HEX	080,080		; up
		HEX	080,080		; down
		HEX	080,080		; left
		HEX	080,080		; right
;					swim move
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;					swim dasei move
		HEX	080,080,080	; up
		HEX	080,080,080	; down
		HEX	080,080,080	; left
		HEX	080,080,080	; right
;					piri piri
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;					item special
		HEX	007,0F7,000,011,016,00E,00A,00A	; all houkou
		HEX	00E,00B,008,008,008,017,016,014
		HEX	00C,008,017,00E,00A,00C,00C
;					osu
		HEX	080,080,080,080,080,080	; up
		HEX	080,080,080,080,080,080	; down
		HEX	080,080,080,080,080,080	; left
		HEX	080,080,080,080,080,080	; right
;					hiku
		HEX	080,080,080,080,080	; all houkou
		HEX	080,080,080,080
		HEX	080,080
;					no hiku
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;;;;;;;;		HEX	080,080,080,080,080,080	; up
;;;;;;;;		HEX	080,080,080,080,080,080	; down
;;;;;;;;		HEX	080,080,080,080,080,080	; left
;;;;;;;;		HEX	080,080,080,080,080,080	; right
;					naname walk 0 (dasen kaidan)
		HEX	080,080,080	; up
		HEX	080,080,080	; down
;					naname walk 1 (dasen kaidan)
		HEX	080,080,080	; up
		HEX	080,080,080	; down
;					game over
		HEX	080,080,080,080,080,080
;					foot shot
		HEX	080,080,080; up
		HEX	080,080,080; down
		HEX	080,080,080; left
		HEX	080,080,080; right
;					aitem motsu porze (0)
		HEX	080
;					aitem motsu porze (1)
		HEX	080
;					oopning neru
		HEX	080,080
;					bomber 
		HEX	080		; up
		HEX	080		; dwon
		HEX	080		; left
		HEX	080		; right
;					usagi
		HEX	080,080,080,080	; up
		HEX	080,080,080,080	; down
		HEX	080,080,080,080	; left
		HEX	080,080,080,080	; right
;					soromon (baria)
		HEX	080,080,080; up
		HEX	080,080,080; down
		HEX	080,080,080; left
		HEX	080,080,080; right
;					 ami
		HEX	00D,00D,010,00B,002,0F5
		HEX	0F0,0F7,000,00B,0F7,0F5
;					clear demo
		HEX	080
;					book read demo
		HEX	080
;					item hiku demo
		HEX	080,080,080,080,080
;					new ken move
		HEX	013,011,00F,00E,003,0FF,0FB,0F5,0F2; up
		HEX	0F8,0F9,0FA,003,005,008,00C,012,016; down
		HEX	003,0FE,0F8,0F3,0F0,0EC,0F1,0F4,001; left
		HEX	005,00A,010,015,018,01C,017,014,007; right
;************	cryority data
PLCRYD		EQU	$
;					run
PCL000		HEX	002,002,002,002,002,002,002,002,002; up
PCL001		HEX	00A,00A,00A,00A,00A,00A,00A,00A,00A; down
PCL002		HEX	002,002,002,002,002,002,002,002,002; left
PCL003		HEX	002,002,002,002,002,002,002,002,002; right
;					ken move
PCL004		HEX	003,003,003,003,003,003,003,003,001; up
PCL005		HEX	000,000,000,000,00B,00B,00B,00B,00B; down
PCL006		HEX	002,002,002,002,002,002,000,000,000; left
PCL007		HEX	002,002,002,002,002,002,000,000,000; right
;					kamae
PCL008		HEX	002,002,002,002,002,002; up
PCL009		HEX	001,001,001,001,001,001; down
PCL00A		HEX	000,000,000,000,000,000; left
PCL00B		HEX	000,000,000,000,000,000; right
;					difence
PCL00C		HEX	003,003,003; up
PCL00D		HEX	006,006,006; down
PCL00E		HEX	005,005,005; left
PCL00F		HEX	005,005,005; right
;					hole
PCL010		HEX	001,001,001,001,001,001; hole
		HEX	001,001,001,001
;					link jump
PCL011		HEX	002		; up
PCL012		HEX	003		; down
PCL013		HEX	000		; left
PCL014		HEX	000		; right
;					lot,hanmer move
PCL019		HEX	000,003,003; up
PCL01A		HEX	006,006,006; down
PCL01B		HEX	000,000,000; left
PCL01C		HEX	000,000,000; right
;					lot kamae
;;;;;;;;PCL021		HEX	002,002,002,002,002,002; up
;;;;;;;;PCL022		HEX	001,001,001,001,001,001; down
;;;;;;;;PCL023		HEX	000,000,000,000,000,000; left
;;;;;;;;PCL024		HEX	000,000,000,000,000,000; right
;					yumi
PCL025		HEX	002,002,002; up
PCL026		HEX	000,000,000; down
PCL027		HEX	000,000,000; left
PCL028		HEX	000,000,000; right
;					hane jump
;;;;;;;;PCL029		HEX	000,000; up
;;;;;;;;PCL02A		HEX	004,004; down
;;;;;;;;PCL02B		HEX	000,000; left
;;;;;;;;PCL02C		HEX	000,000; right
;					bumeran
PCL02D		HEX	000,003	; up
PCL02E		HEX	003,003	; down
PCL02F		HEX	002,000	; left
PCL030		HEX	002,000	; right
;					walk
PCL031		HEX	002,002,002,002,002,002	; up
PCL032		HEX	00A,00A,00A,00A,00A,00A	; down
PCL033		HEX	002,002,002,002,002,002	; left
PCL034		HEX	002,002,002,002,002,002	; right
;;;;;;;;;					aisatsu
;;;;;;;;PCL060		HEX	002,002	; up
;;;;;;;;PCL061		HEX	003,003	; down
;;;;;;;;PCL062		HEX	003,003	; left
;;;;;;;;PCL063		HEX	003,003	; right
;					inoru
PCL064		HEX	003,003,003,003; all houkou
;;;;;;;;;					neru
;;;;;;;;PCL065		HEX	004,004	; all houkou
;					horu
PCL066		HEX	001,001,002	; left
PCL067		HEX	001,001,002	; up,down,right
;;;;;;;;;					utau
;;;;;;;;PCL097		HEX	004,004,004,004	; all houkou
;;;;;;;;;					odoru
;;;;;;;;PCL098		HEX	003,003,003,003	; all houkou
;;;;;;;;;					taberu
;;;;;;;;PCL099		HEX	003,003,003,003	; all houkou
;					tsukamu
PCL09A		HEX	004,004,004,004,004,004; up
PCL09B		HEX	003,003,003,003,003,003; down
PCL09C		HEX	002,002,002,002,002,002; left
PCL09D		HEX	002,002,002,002,002,002; right
;					motsu 0
PCL09E		HEX	004,004,004,004,004,004; up
PCL09F		HEX	003,003,003,003,003,003; down
PCL0A0		HEX	002,002,002,002,002,002; left
PCL0A1		HEX	002,002,002,002,002,002; right
;					special ken furi
PCL0A2		HEX	002,002,005,005,005,005,005,005
		HEX	002,002,005,005,005,005,002,005
;					motsu 1
PCL0A3		HEX	000,000,000	; up
PCL0A4		HEX	000,000,000	; down
PCL0A5		HEX	000,000,000	; left
PCL0A6		HEX	000,000,000	; right
;					swim stop
PCL100		HEX	000,000		; up
PCL101		HEX	000,000		; down
PCL102		HEX	000,000		; left
PCL103		HEX	000,000		; right
;					swim move
PCL104		HEX	007,007,007,007	; up
PCL105		HEX	008,008,008,008	; down
PCL106		HEX	009,009,009,009	; left
PCL107		HEX	009,009,009,009	; right
;					swim dasei move
PCL108		HEX	000,000,000	; up
PCL109		HEX	007,007,007	; down
PCL10A		HEX	007,007,007	; left
PCL10B		HEX	007,007,007	; right
;					piri piri
PCL140		HEX	000,000,000,000	; up
PCL141		HEX	000,000,000,000	; down
PCL142		HEX	000,000,000,000	; left
PCL143		HEX	000,000,000,000	; right
;					sunder
PCL148		HEX	001,001,002,001,001,001,001,001	; all houkou
		HEX	001,003,003,00A,00A,001,001,001
		HEX	001,001,001,001,001,001,001
;					osu
PCL180		HEX	000,000,000,000,000,000	; up
PCL181		HEX	000,000,000,000,000,000	; down
PCL182		HEX	000,000,000,000,000,000	; left
PCL183		HEX	000,000,000,000,000,000	; right
;					hiku
PCL200		HEX	002,002,002,002,002	; all houkou
		HEX	002,002,002,002
		HEX	002,002
;					no hiku
PCL240		HEX	002,002,002,002	; up
PCL241		HEX	002,002,002,002	; down
PCL242		HEX	002,002,002,002	; left
PCL243		HEX	002,002,002,002	; right
;;;;;;;;PCL240		HEX	002,002,002,002,002	; up
;;;;;;;;PCL241		HEX	002,002,002,002,002	; down
;;;;;;;;PCL242		HEX	002,002,002,002,002	; left
;;;;;;;;PCL243		HEX	002,002,002,002,002	; right
;					naname walk 0 (dasen kaidan)
PCL300		HEX	002,002,002	; up
PCL301		HEX	002,002,002	; down
;					naname walk 1 (dasen kaidan)
PCL302		HEX	002,002,002	; up
PCL303		HEX	002,002,002	; down
;					game over
PCL340		HEX	002,002,002,002,002,002
;					foot shot
PCL400		HEX	002,002,002; up
PCL401		HEX	002,002,002; down
PCL402		HEX	002,002,002; left
PCL403		HEX	002,002,002; right
;					aitem motsu porze (0)
PCL404		HEX	001
;					aitem motsu porze (1)
PCL405		HEX	001
;					oopning neru
PCL406		HEX	002,002
;					bomber 
PCL410		HEX	003		; up
PCL411		HEX	006		; dwon
PCL412		HEX	005		; left
PCL413		HEX	005		; right
;					usagi
PCL414		HEX	002,002,002,002	; up
PCL415		HEX	002,002,002,002	; down
PCL416		HEX	002,002,002,002	; left
PCL417		HEX	002,002,002,002	; right
;					soromon (baria)
PCL418		HEX	000,000,002; up
PCL419		HEX	002,000,000; down
PCL420		HEX	000,000,000; left
PCL421		HEX	000,000,000; right
;					 ami
PCL422		HEX	002,002,000,000,000,000
		HEX	000,002,002,000,002,000
;					clear demo
PCL423		HEX	005
;					book read demo
PCL424		HEX	002
;					item hiku demo
PCL425		HEX	000,000,000,000,000
;					new ken move
PCL426		HEX	003,003,003,003,003,003,003,003,003; up
PCL427		HEX	000,00B,00B,00B,00B,00B,00B,00B,00B; down
PCL428		HEX	002,002,002,002,002,000,000,000,000; left
PCL429		HEX	002,002,002,002,002,000,000,000,000; right
;************	index data
PYINDX		EQU	$		; data index
PYIN00		WORD	PCL000-PLCRYD,PCL004-PLCRYD,PCL008-PLCRYD;up
		WORD	PCL00C-PLCRYD,PCL010-PLCRYD,PCL011-PLCRYD
		WORD	PCL019-PLCRYD,PCL025-PLCRYD,PCL004-PLCRYD
		WORD	PCL02D-PLCRYD,PCL031-PLCRYD,PCL064-PLCRYD
		WORD	PCL067-PLCRYD,PCL09A-PLCRYD,PCL09E-PLCRYD
		WORD	PCL0A2-PLCRYD,PCL0A3-PLCRYD,PCL100-PLCRYD
		WORD	PCL104-PLCRYD,PCL108-PLCRYD,PCL140-PLCRYD
		WORD	PCL148-PLCRYD,PCL180-PLCRYD,PCL200-PLCRYD
		WORD	PCL240-PLCRYD,PCL300-PLCRYD,PCL302-PLCRYD
		WORD	PCL340-PLCRYD,PCL400-PLCRYD,PCL404-PLCRYD
		WORD	PCL405-PLCRYD,PCL406-PLCRYD,PCL410-PLCRYD
		WORD	PCL414-PLCRYD,PCL418-PLCRYD,PCL422-PLCRYD
		WORD	PCL423-PLCRYD,PCL424-PLCRYD,PCL425-PLCRYD
		WORD	PCL426-PLCRYD
;
PYIN01		WORD	PCL001-PLCRYD,PCL005-PLCRYD,PCL009-PLCRYD;down
		WORD	PCL00D-PLCRYD,PCL010-PLCRYD,PCL012-PLCRYD
		WORD	PCL01A-PLCRYD,PCL026-PLCRYD
		WORD	PCL005-PLCRYD,PCL02E-PLCRYD
		WORD	PCL032-PLCRYD
;
		WORD	PCL064-PLCRYD
		WORD	PCL067-PLCRYD
		WORD	PCL09B-PLCRYD,PCL09F-PLCRYD
		WORD	PCL0A2-PLCRYD,PCL0A4-PLCRYD
		WORD	PCL101-PLCRYD,PCL105-PLCRYD,PCL109-PLCRYD
		WORD	PCL141-PLCRYD
		WORD	PCL148-PLCRYD
		WORD	PCL181-PLCRYD
		WORD	PCL200-PLCRYD,PCL241-PLCRYD
		WORD	PCL301-PLCRYD,PCL303-PLCRYD,PCL340-PLCRYD
		WORD	PCL401-PLCRYD,PCL404-PLCRYD,PCL405-PLCRYD
		WORD	PCL406-PLCRYD,PCL411-PLCRYD,PCL415-PLCRYD
		WORD	PCL419-PLCRYD,PCL422-PLCRYD,PCL423-PLCRYD
		WORD	PCL424-PLCRYD,PCL425-PLCRYD,PCL427-PLCRYD
;
PYIN02		WORD	PCL002-PLCRYD,PCL006-PLCRYD,PCL00A-PLCRYD;left
		WORD	PCL00E-PLCRYD,PCL010-PLCRYD,PCL013-PLCRYD
		WORD	PCL01B-PLCRYD,PCL027-PLCRYD
		WORD	PCL006-PLCRYD,PCL02F-PLCRYD
		WORD	PCL033-PLCRYD
;
		WORD	PCL064-PLCRYD
		WORD	PCL066-PLCRYD
		WORD	PCL09C-PLCRYD,PCL0A0-PLCRYD
		WORD	PCL0A2-PLCRYD,PCL0A5-PLCRYD
		WORD	PCL102-PLCRYD,PCL106-PLCRYD,PCL10A-PLCRYD
		WORD	PCL142-PLCRYD
		WORD	PCL148-PLCRYD
		WORD	PCL182-PLCRYD
		WORD	PCL200-PLCRYD,PCL242-PLCRYD
		WORD	PCL300-PLCRYD,PCL302-PLCRYD,PCL340-PLCRYD
		WORD	PCL402-PLCRYD,PCL404-PLCRYD,PCL405-PLCRYD
		WORD	PCL406-PLCRYD,PCL412-PLCRYD,PCL416-PLCRYD
		WORD	PCL420-PLCRYD,PCL422-PLCRYD,PCL423-PLCRYD
		WORD	PCL424-PLCRYD,PCL425-PLCRYD,PCL428-PLCRYD
;
PYIN03		WORD	PCL003-PLCRYD,PCL007-PLCRYD,PCL00B-PLCRYD;right
		WORD	PCL00F-PLCRYD,PCL010-PLCRYD,PCL014-PLCRYD
		WORD	PCL01C-PLCRYD,PCL028-PLCRYD
		WORD	PCL007-PLCRYD,PCL030-PLCRYD
		WORD	PCL034-PLCRYD
;
		WORD	PCL064-PLCRYD
		WORD	PCL067-PLCRYD
		WORD	PCL09D-PLCRYD,PCL0A1-PLCRYD
		WORD	PCL0A2-PLCRYD,PCL0A6-PLCRYD
		WORD	PCL103-PLCRYD,PCL107-PLCRYD,PCL10B-PLCRYD
		WORD	PCL143-PLCRYD
		WORD	PCL148-PLCRYD
		WORD	PCL183-PLCRYD
		WORD	PCL200-PLCRYD,PCL243-PLCRYD
		WORD	PCL301-PLCRYD,PCL303-PLCRYD,PCL340-PLCRYD
		WORD	PCL403-PLCRYD,PCL404-PLCRYD,PCL405-PLCRYD
		WORD	PCL406-PLCRYD,PCL413-PLCRYD,PCL417-PLCRYD
		WORD	PCL421-PLCRYD,PCL422-PLCRYD,PCL423-PLCRYD
		WORD	PCL424-PLCRYD,PCL425-PLCRYD,PCL429-PLCRYD
;
LNPYIN		EQU	$		; index pointer
		WORD	PYIN00-PYINDX
		WORD	PYIN01-PYINDX
		WORD	PYIN02-PYINDX
		WORD	PYIN03-PYINDX
;
PYINDX1		EQU	$		; ude index pointer data
PYDI00		EQU	$
		WORD	PUD000-UDMODE1,PUD001-UDMODE1,PUD005-UDMODE1
		WORD	PUD009-UDMODE1,PUD00A-UDMODE1,PUD00B-UDMODE1
		WORD	PUD00F-UDMODE1
PYDI01		EQU	$
		WORD	PUD000-UDMODE1,PUD002-UDMODE1,PUD006-UDMODE1
		WORD	PUD009-UDMODE1,PUD00A-UDMODE1,PUD00C-UDMODE1
		WORD	PUD010-UDMODE1
PYDI02		EQU	$
		WORD	PUD000-UDMODE1,PUD003-UDMODE1,PUD007-UDMODE1
		WORD	PUD009-UDMODE1,PUD00A-UDMODE1,PUD00D-UDMODE1
		WORD	PUD011-UDMODE1
PYDI03		EQU	$
		WORD	PUD000-UDMODE1,PUD004-UDMODE1,PUD008-UDMODE1
		WORD	PUD009-UDMODE1,PUD00A-UDMODE1,PUD00E-UDMODE1
		WORD	PUD012-UDMODE1
;
LNPYIN1		EQU	$		; index pointer
		WORD	PYDI00-PYINDX1
		WORD	PYDI01-PYINDX1
		WORD	PYDI02-PYINDX1
		WORD	PYDI03-PYINDX1
;
;***********	nomal oam point data
UDPTDT		EQU	$		; ude oam point data
;			  0   1   2   3   4   5   6   7
		HEX	000,008,000,008,008,00C,014,008
;			  8   9   A   B
		HEX	008,000,000,000
UDPTDT1		EQU	$		; ude oam point data
		HEX	004,00C,004,00C,00C,010,018,00C
		HEX	00C,00C,004,004
KNPTDT		EQU	$		; ken oam point data
		HEX	008,010,010,018,010,000,000,010
		HEX	018,010,018,010
PYPTDT		EQU	$		; player oam point data
		HEX	014,01C,008,010,000,014,018,000
		HEX	010,004,010,01C
TTPTDT		EQU	$		; tate oam point data
		HEX	01C,000,01C,000,018,01C,00C,01C
		HEX	024,01C,008,008
KGPTDT		EQU	$		; kage oam point data
		HEX	028,028,028,028,028,028,028,028
		HEX	000,028,028,028
;***********	kusa,asai water  oam point data
UDPTDT2		EQU	$		; ude oam point data
;			  0   1   2   3   4   5   6   7
		HEX	014,01C,008,010,010,014,01C,010
;			  8   9   A   B
		HEX	008,008,008,014
UDPTDT3		EQU	$		; ude oam point data
		HEX	018,020,00C,014,014,018,020,014
		HEX	00C,014,00C,018
KNPTDT1		EQU	$		; ken oam point data
		HEX	000,000,018,020,018,000,000,018
		HEX	018,018,020,000
PYPTDT1		EQU	$		; player oam point data
		HEX	01C,024,010,018,008,01C,024,008
		HEX	010,00C,018,024
TTPTDT1		EQU	$		; tate oam point data
		HEX	024,014,024,008,020,024,014,024
		HEX	024,024,010,01C
KGPTDT1		EQU	$		; kage oam point data
		HEX	00C,00C,000,000,000,00C,00C,000
		HEX	000,000,000,00C
;
OMS000		EQU	UDPTDT1-UDPTDT
;***********	oam point data table
LUDPTBL		EQU	$	; ude (L) table data
		WORD	UDPTDT
		WORD	UDPTDT2
RUDPTBL		EQU	$	; ude (R) table data
		WORD	UDPTDT1
		WORD	UDPTDT3
KNPTTBL		EQU	$	; ken table data
		WORD	KNPTDT
		WORD	KNPTDT1
PYPTTBL		EQU	$	; player table data
		WORD	PYPTDT
		WORD	PYPTDT1
TTPTTBL		EQU	$	; tate table data
		WORD	TTPTDT
		WORD	TTPTDT1
KGPTTBL		EQU	$	; kage table data
		WORD	KGPTDT
		WORD	KGPTDT1
;
;***********	oam kihon point data
PLOMPT		EQU	$
;			     0      1      2
		WORD	00190H,000E0H,00000H
;
;***********	oam uusen juni data
PYUSNDT		EQU	$		; BG2,BG1,BG3,BG2
		WORD	02000H,01000H,03000H,02000H
;
;***********	oam lot CG data
LTCGDT		EQU	$	; atoribuuto set
		HEX	002,004,004
;
;***********	naname kaidan (dasen kaidan) data
NAWKDT		EQU	$	; naname walk (dasen kaidan) data
		HEX	000,001,002,000,001,002,000,001,002
;
;*********** 	purzu mode 
RUNM		EQU	000H		; run
KNMV		EQU	RUNM+1		; ken move
KNKM		EQU	KNMV+1		; ken kamae
DIFN		EQU	KNKM+1		; deifence
DWMV		EQU	DIFN+1		; hole down
JUMP		EQU	DWMV+1		; jump
LTMV		EQU	JUMP+1		; lot,hanmer move
;;;;KLMV		EQU	LTMV+1		; lot kamae
YAMV		EQU	LTMV+1		; ya move
;;;;HNMV		EQU	YAMV+1		; hane jump move
FRMV		EQU	YAMV+1		; fire kona move
BRMV		EQU	FRMV+1		; bumeran move
WALK		EQU	BRMV+1		; walk
;
;;;;AIAM		EQU	WALK+1		; aisatsu
INOM		EQU	WALK+1		; inoru
;;;;NERM		EQU	INOM+1		; neru
HORM		EQU	INOM+1		; horu
;;;;UTUM		EQU	HORM+1		; utau
;;;;ODOM		EQU	UTUM+1		; odoru
;;;;EATM		EQU	ODOM+1		; taberu
TSUM		EQU	HORM+1		; tsukamu
MOTM		EQU	TSUM+1		; motsu 0
SPKM		EQU	MOTM+1		; special ken furi
MOT1		EQU	SPKM+1		; motsu 1
;
SWSM		EQU	MOT1+1		; swim stop
SWIM		EQU	SWSM+1		; swim
SWDM		EQU	SWIM+1		; swim dasei
PIRI		EQU	SWDM+1		; piri piri
SUDR		EQU	PIRI+1		; sunder
OSUM		EQU	SUDR+1		; osu
HIKU		EQU	OSUM+1		; hiku
NOHK		EQU	HIKU+1		; no hiku
NAW0		EQU	NOHK+1		; naname walk 0 (dasen kaidan)
NAW1		EQU	NAW0+1		; naname walk 1 (dasen kaidan)
GMOV		EQU	NAW1+1		; game over
FTST		EQU	GMOV+1		; foot shot
AIM0		EQU	FTST+1		; aitem motsu porzu 0
AIM1		EQU	AIM0+1		; aitem motsu porzu 1
ONER		EQU	AIM1+1		; oopning neru
FOTS		EQU	ONER+1		; foot shot
USAG		EQU	FOTS+1		; usagi
BARA		EQU	USAG+1		; soromon (baria)
MAMI		EQU	BARA+1		; ami
CLDM		EQU	MAMI+1		; clear demo
BKRD		EQU	CLDM+1		; book read demo
ITHD		EQU	BKRD+1		; item hiku demo
NWKN		EQU	ITHD+1		; new ken move
;
BKYND		EQU	$		; b ksy demo data
;				     N    N         N
		BYTE	LTMV,LTMV,LTMV,LTMV,YAMV,YAMV,FRMV,BRMV
BKYND1		EQU	$		; b ksy demo data
		BYTE	HORM,INOM,FOTS,BARA,MAMI,BKRD
YKYND		EQU	$		; y key demo data
;			   N         N         N    N    N
		BYTE	ITHD,INOM,INOM,HORM,INOM,INOM,INOM,TSUM
UDONDT		EQU	$		; ude on,off data
		WORD	DWMV,MOT1,SWIM,SUDR,HIKU,NOHK,NWKN
STETYP		EQU	$
		WORD	00000H,0FFFEH,0FFFDH,00000H,0FFFEH,0FFFDH ; up
		WORD	00000H,00000H,00000H,00000H,00000H,00000H ; up
		WORD	00000H,0FFFEH,0FFFDH,00000H,0FFFEH,0FFFDH ; down
		WORD	00000H,00000H,00000H,00000H,00000H,00000H ; down
;
;************************************************************************
;*		player move oam set			(PYOMST)	*
;************************************************************************
PYOMST		EQU	$
		PHB
		PHK
		PLB
;
		LDY	#000H
		LDA	<GAMEMD		; street kaidan check
		CMP	#p1_sls0
		BEQ	PYOM002
		LDY	#018H
		CMP	#p1_sls1
		BNE	PYOM01F
PYOM002		EQU	$
		STY	<WORK0
		LDA	<PLYPS1
		PHA
		LDA	<PLYPS0
		PHA
		LDY	#000H
		LDA	!STPFLG
		AND	#004H
		BEQ	PYOM004
		LDY	#00CH
PYOM004		EQU	$
		TYA
		CLC
		ADC	<WORK0
		STA	<WORK0
;
		LDA	<PYCRCH
		CMP	#006H
		BCC	PYOM008
		LDA	#000H
PYOM008		EQU	$
		ASL	A
		CLC
		ADC	<WORK0
		TAY
		MEM16
		REP	#00100000B
		LDA	!STETYP,Y
		CLC
		ADC	<PLYPS1
		STA	<PLYPS1
		MEM8
		SEP	#00100000B
;
PYOM01F		EQU	$
		LDA	<PLYPS1		; Y-pos
		SEC
		SBC	<SCCV2		; Y-scr hosei
		STA	<WORK1
		LDA	<PLXPS1		; X-pos
		SEC
		SBC	<SCCH2		; X-acr hosei
		STA	<WORK0
;
PYOM01F8	EQU	$
PYOM01FC	EQU	$
		LDA	#080H		; teki ken haba clear !
		STA	<KNCRXP
		STA	<KNCRYP
		LDX	#000H
		LDA	ASWFLG		; asase ? [NO:PYOM604]
		BEQ	PYOM020
		LDX	#001H
PYOM020		EQU	$
		TXA
		ASL	A
		STA	<BMWORK
		STZ	<BMWORK+1
;
		MEM16
		REP	#00100000B
		LDA	<PLBGCKF
		AND	#00FFH
		ASL	A
		TAX
		LDA	!PYUSNDT,X
		STA	<PYBGUN		; bg uusen juni set
;
		LDA	OAMTYP		; oam point type 
		ASL	A
		TAY
		LDA	!PLOMPT,Y
		STA	OMPTFG
;
PYOM040		EQU	$
		MEM8
		SEP	#00100000B
;
;************	player mode henkan shori
;				y-reji	0 ----> run
;					1 ----> ken move
;					2 ----> kamae
;					3 ----> deifence
;					4 ----> hole down
;					5 ----> jump
;					6 ----> lot,hanmer move
;;;;;;;;					7 ----> walk lot move
;					7 ----> ya move
;;;;;;;;					9 ----> hane jump move
;					8 ----> fire drag move
;					9 ----> bumeran move
;					A ----> walk
;
;;;;;;;;					D ----> aisatsu
;					B ----> inoru
;;;;;;;;					E ----> neru
;				        C ----> horu
;;;;;;;;				       11 ----> utau
;;;;;;;;				       12 ----> odoru
;;;;;;;;				       13 ----> taberu
;				        D ----> tsukamu
;				        E ----> motsu 0
;				        F ----> special ken furi
;				       10 ----> motsu 1
;				       11 ----> swim stop
;				       12 ----> swim
;				       13 ----> swim dasei
;				       14 ----> piri piri
;				       15 ----> sunder
;				       16 ----> osu
;				       17 ----> hiku
;				       18 ----> no hiku
;				       19 ----> naname walk 0 (dasen kaidan)
;				       1A ----> naname walk 1 (dasen kaidan)
;				       1B ----> game over
;				       1C ----> aitem motsu porzu 0
;				       1D ----> aitem motsu porzu 1
;				       1E ----> oopning neru
;				       1F ----> foot shot
;				       20 ----> usagi
;				       21 ----> soromon (baria)
;				       22 ----> ami
;				       23 ----> clear demo
;				       24 ----> book read demo
;				       25 ----> item hiku demo
;				       26 ----> new ken move
PYOM100		EQU	$
		LDA	<LNMODE		; oopning neru ? [NO:PYOM1008]
		CMP	#OPNG
		BNE	PYOM1004
		LDY	#ONER
		LDA	OPNGFG
		CMP	#002H
		BEQ	PYOM1004
		STA	<WORK2
		BRL	PYOM300
;
PYOM1004	EQU	$
		LDA	!KNPASFG	; clear demo ?
		BEQ	PYOM1006
		LDY	#CLDM		; clear demo set
		STZ	<WORK2
		LDA	<PLMKCH
		STA	KGHORM		; kage houkou set
		BRL	PYOM300
;		
PYOM1006	EQU	$
		LDA	RABFLG
		BEQ	PYOM1008
		LDY	#USAG
		LDA	<PYCRCH
		AND	#00000011B
		STA	<WORK2
		LDA	<PLMKCH
		STA	KGHORM		; kage houkou set
		BRL	PYOM300
PYOM1008	EQU	$
		LDY	#RUNM
		LDA	ASWFLG
		BEQ	PYOM101
		LDY	#WALK
PYOM101		EQU	$
		LDA	<GAMEMD
		CMP	#p1_kstp
		BNE	PYOM1012
		LDA	<SLMODE
		CMP	#MD_gover
		BEQ	PYOM1012
		LDY	#WALK
		LDA	<PLXSPD
		BEQ	PYOM1012
		LDX	<PLMKCH
		CPX	#004H
		BEQ	PYOM1016
		CPX	#006H
		BEQ	PYOM1016
		LDX	<PYCRCH
		LDA	!NAWKDT,X
		STA	<WORK2
		LDY	#NAW0
		LDA	!STPFLG
		AND	#004H
		BEQ	PYOM1018
		LDY	#NAW1
		BRA	PYOM1018
PYOM1012	EQU	$
		LDA	DODMBT
		AND	#00000011B
		BEQ	PYOM1014
		LDY	#NOHK
		LDA	PYDMMD
		STA	<WORK2
		BRA	PYOM1018
PYOM1014	EQU	$
		LDA	<HANIFG1
		AND	#00001101B
		BEQ	PYOM1016
		LDY	#OSUM
		LDA	<PYCRCH
		CMP	#005H
		BCC	PYOM1016
		STZ	<PYCRCH
PYOM1016	EQU	$
		LDA	<PYCRCH
		STA	<WORK2
PYOM1018	EQU	$
		LDA	<PLMKCH
		STA	KGHORM		; kage houkou set
;
		LDA	WATRFG		; water ? [NO:PYOM102]
		BEQ	PYOM102
;
		LDA	#020H
		STA	<PYBGUN+1
		STZ	<PYBGUN
;
PYOM102		EQU	$
		LDA	<LNMODE
		CMP	#SWMD
		BNE	PYOM110
		LDY	#SWSM
		LDA	<WORK2
		AND	#00000001B
		STA	<WORK2
;
		LDA	<GAMEMD
		BNE	PYOM103
;
		LDA	<KEYA1
		AND	#00FH
		BNE	PYOM104
;
PYOM103		EQU	$
		LDA	SWKASY		; speed not = 0 ? [YES:SWMV040]
		ORA	SWKASY+1
		ORA	SWKASX
		ORA	SWKASX+1
		BEQ	PYOM106
;
PYOM104		EQU	$
		LDY	#SWDM
		LDA	SWDSMD
		STA	<WORK2
PYOM106		EQU	$
		LDA	SWMODE		; player swimming ? [NO:PYOM108]
		BEQ	PYOM108
		DEC	A
		STA	<WORK2
		LDY	#SWIM
PYOM108		EQU	$
		BRL	PYOM300
;
PYOM110		EQU	$
		LDA	ATMTHK		; aitem mochi porzu ?
		BEQ	PYOM1108
		STZ	<WORK2
		LDY	#AIM1
		CMP	#002H
		BEQ	PYOM1104
		LDY	#AIM0
PYOM1104	EQU	$
		BRA	PYOM108
;
PYOM1108	EQU	$
		LDA	DEMOFG
		AND	#00000001B
		BEQ	PYOM111
		LDA	PYDMMD
		STA	<WORK2
		LDY	#GMOV
		BRA	PYOM108
;
PYOM111		EQU	$
		LDA	<DIEFG		; hane kaeri ?
		BEQ	PYOM120
		CMP	#001H
		BEQ	PYOM1118
		CMP	#004H
		BNE	PYOM120
		LDY	#SWDM
		LDA	<FCNT
		AND	#00011000B
		LSR	A
		LSR	A
		LSR	A
		TAX
		LDA	>DASIMD,X
		STA	<WORK2
		BRL	PYOM300
;
PYOM1118	EQU	$
		LDA	<LNMODE
		CMP	#JPMV
		BNE	PYOM114
		LDA	PRIONF
		BNE	PYOM112
		LDA	#030H
		STA	<PYBGUN+1	; bg uusen juni (H)set
		STZ	<PYBGUN		; bg uusen juni (L)set
PYOM112		EQU	$
		BRL	PYOM148
;
PYOM114		EQU	$
		LDA	<LNMODE
		CMP	#BOGN
		BEQ	PYOM120
		LDA	<KAKUMD
		BNE	PYOM120
		LDY	#JUMP		; link jump set
		LDA	PIPIFG
		BEQ	PYOM118
		LDY	#PIRI		; link piri piri set
		LDA	AITMMD
		AND	#00000011B
PYOM118		EQU	$
		STA	<WORK2
		BRL	PYOM300
;
PYOM120		EQU	$
		LDA	<HOLEFG2	; hole down ?
		BEQ	PYOM140
		CMP	#01H
		BEQ	PYOM140
		CMP	#003H
		BNE	PYOM124
		LDA	!PLOMPT+4
		STA	!OMPTFG
		LDA	!PLOMPT+5
		STA	!OMPTFG+1
PYOM124		EQU	$
		LDA	<HOLEFG1
		STA	<WORK2
		CMP	#006H
		BCC	PYOM130
		LDA	<PYBGUN+1
		ORA	#00110000B
		STA	<PYBGUN+1
PYOM130		EQU	$
		LDY	#DWMV
		BRL	PYOM300
;
PYOM140		EQU	$
		LDA	PYDMBT		; Y demo on ? [no:PYOM148]
		BEQ	PYOM148
		JSR	PYBTSR		; bit surch sub
;
		CPX	#06H
		BCS	PYOM143
		LDA	#02H		; kage houkou down set
		STA	KGHORM
PYOM143		EQU	$
		LDY	!YKYND,X
		CPY	#TSUM
		BCC	PYOM147
;
		LDA	PYDMBT1
		AND	#00000010B
		BEQ	PYOM144
		INY
PYOM144		EQU	$
		LDA	PYDMBT1
		AND	#00000001B
		BEQ	PYOM145
		LDY	#MOT1
		BRA	PYOM147
PYOM145		EQU	$
		LDA	PYDMBT		; teki tsukamu set ? [YES:PYOM300]
		AND	#10000000B
		BEQ	PYOM147
		BRL	PYOM300
PYOM147		EQU	$
		LDA	PYDMMD
		BRA	PYOM1613
;
PYOM148		EQU	$
;;;;;;;;		LDA	DODMBT		; DO demo ?
;;;;;;;;		BEQ	PYOM1484
;;;;;;;;		JSR	PYBTSR		; bit surch sub
		LDA	HIKUFG		; hiku move ? [NO:PYOM1484]
		BEQ	PYOM1484
		DEC	A
		LDY	#HIKU
		BRA	PYOM1613
;
PYOM1484	EQU	$
		LDA	AITMBT		; B item on ? [no:PYOM160]
		BEQ	PYOM160
		JSR	PYBTSR		; bit surch sub
		LDY	!BKYND,X
		BRA	PYOM161
;
PYOM160		EQU	$
		LDA	AITMBT1		; B item on ? [no:PYOM167]
		BEQ	PYOM162
		JSR	PYBTSR		; bit surch sub
		LDY	!BKYND1,X
PYOM161		EQU	$
		LDA	AITMMD
PYOM1613	EQU	$
		STA	<WORK2
		BRA	PYOM300
;
PYOM162		EQU	$
		LDA	<LNMODE		; special ? [NO:PYOM170]
		CMP	#JNSP
		BEQ	PYOM164
		CMP	#SDSP
		BEQ	PYOM164
		CMP	#BBSP
		BNE	PYOM166
PYOM164		EQU	$
		LDY	#SUDR
		BRA	PYOM178
;
PYOM166		EQU	$
		CMP	#KNS1
		BEQ	PYOM168
		CMP	#KNSP
		BNE	PYOM180
PYOM168		EQU	$
		LDY	#SPKM
PYOM178		EQU	$
		LDA	KNSPMD
		STA	<WORK2
		BRA	PYOM300
;
PYOM180		EQU	$
		LDA	<KENKY		; a key continue ? [no:PYOM300]
		AND	#10000000B
		BEQ	PYOM300
;
		LDA	<KENMD		; ken kamae ? [no:PYOM200]
		CMP	#09H
		BNE	PYOM200
		LDY	#KNKM		; kamae set
		BRA	PYOM300
PYOM200		EQU	$
;;;;;;;;		LDY	#KNMV		; ken furi set
		LDY	#NWKN
		LDA	<KENMD
		STA	<WORK2
		CMP	#09H
		BCC	PYOM300
		LDA	<WORK2
		SEC
		SBC	#0AH
		STA	<WORK2
		LDY	#DIFN		; ken defence set
;
;************	OAM,INDEX set
PYOM300		EQU	$
		STY	PYMODE
		CPY	#JUMP
		BEQ	PYOM310
;;;;;;;;		CPY	#HNMV
;;;;;;;;		BEQ	PYOM310
		LDA	<PYBGUN
		STA	KGBGUN
		LDA	<PYBGUN+1
		STA	KGBGUN+1
PYOM310		EQU	$
		STZ	<WORK3
		LDA	<WORK2
		STA	<BMWORK+4
		MEM16
		IDX16
		REP	#00110000B
		LDA	<PLMKCH
		AND	#00FFH
		TAX
		LDA	!LNPYIN1,X
		STA	<BMWORK+2
		LDA	!LNPYIN,X
		STA	<WORK4
		TYA
		AND	#00FFH
		ASL	A
		CLC
		ADC	<WORK4
		TAY
		LDA	!PYINDX,Y	; index set
		CLC
		ADC	<WORK2
		STA	<WORK2
		TAY
		LDA	!PLCRYD,Y	; cryority set
		AND	#00FFH
		STA	<WORK4
;
;************	player coler oam set
		LDA	#00E00H
		STA	PLCGRM
		LDA	!PCGCKF
		BEQ	PYOM312
 		STZ	PLCGRM
;
;************	player ude oam set
PYOM312		EQU	$
		STZ	PCHPT1		;character patern clear 
		STZ	PCHPT2
;
		LDX	#STETYP-UDONDT-2
PYOM314		EQU	$
		LDA	PYMODE
		AND	#00FFH
		CMP	!UDONDT,X
		BEQ	PYOM315
		DEX
		DEX
		BPL	PYOM314
		BRL	PYOM400
;
PYOM315		EQU	$
		TXA
		AND	#00FFH
		CLC
		ADC	<BMWORK+2
		TAX
		LDA	<BMWORK+4
		AND	#00FFH
		CLC
		ADC	!PYINDX1,X
		STA	<BMWORK+2
;
		LDY	<BMWORK+2
		LDA	!UDMODE0,Y	; ude oam set ?
		AND	#00FFH
		CMP	#00FFH
		BNE	PYOM316
		BRL	PYOM350
PYOM316		EQU	$
		ASL	A
		STA	PCHPT1		;character patern no set 
;
		LDX	<BMWORK+0
		LDA	!LUDPTBL,X
		STA	<WORKA
		LDY	<WORK4
		LDA	(<WORKA),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX			; oam point set
		LDY	<BMWORK+2
;
		MEM8
		SEP	#00100000B
;
		LDA	<PLZPS0
		BMI	PYOM318
		LDA	<PLZPS1
		BRA	PYOM320
;
PYOM318		EQU	$
		LDA	<PLZPS1
		CMP	#0F0H
		BCC	PYOM320
		LDA	#0000H
PYOM320		EQU	$
		STA	<WORKF
		STZ	<WORKE
;
		LDA	!UDYPSD0,Y	; ude kihon y-pos set
		CLC
		ADC	<WORK1
		SEC
		SBC	<WORKF
		STA	!POAM+1,X	; ude y-pos set
		LDA	!UDXPSD0,Y	; ude kihon x-pos set
		CLC
		ADC	<WORK0
		STA	!POAM+0,X	; ude x-pos set
		MEM16
		REP	#00100000B
;
		LDA	!UDMODE0,Y
		AND	#00FFH
		STA	<WORK6
		LSR	A
		TAY			; ude data point
		LDA	!LNUDCR-1,Y
		TAY
		LDA	<WORK6
		AND	#0001H
		BEQ	PYOM340
		TYA
		ASL	A
		ASL	A
		ASL	A
		ASL	A
		TAY
PYOM340		EQU	$
		TYA
		AND	#0C000H
		ORA	<PYBGUN
		ORA	PLCGRM
		ORA	#00004H
		STA	!POAM+2,X
		TXA
		LSR	A
		LSR	A
		TAX
		LDA	!POAMSB+0,X
		AND	#0FF00H
		STA	!POAMSB+0,X
;
;************	player ude oam set 1
PYOM350		EQU	$
		LDY	<BMWORK+2
		LDA	!UDMODE1,Y	; ude oam set ?
		AND	#00FFH
		CMP	#00FFH
		BNE	PYOM352
		BRL	PYOM400
PYOM352		EQU	$
		ASL	A
		STA	PCHPT2		;character patern no set 
;
		LDX	<BMWORK+0
		LDA	!RUDPTBL,X
		STA	<WORKA
		LDY	<WORK4
		LDA	(<WORKA),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX			; oam point set
		LDY	<BMWORK+2
;
		MEM8
		SEP	#00100000B
		LDA	<PLZPS0
		BMI	PYOM354
		LDA	<PLZPS1
		BRA	PYOM370
;
PYOM354		EQU	$
		LDA	<PLZPS1
		CMP	#0F0H
		BCC	PYOM370
		LDA	#000H
PYOM370		EQU	$
		STA	<WORKF
		STZ	<WORKE
;
		LDA	!UDYPSD1,Y	; ude kihon y-pos set
		CLC
		ADC	<WORK1
		SEC
		SBC	<WORKF
		STA	!POAM+1,X	; ude y-pos set
		LDA	!UDXPSD1,Y	; ude kihon x-pos set
		CLC
		ADC	<WORK0
		STA	!POAM+0,X	; ude x-pos set
		MEM16
		REP	#00100000B
		LDA	!UDMODE1,Y
		AND	#00FFH
		STA	<WORK6
		LSR	A
		TAY			; ude data point
		LDA	!LNUDCR-1,Y
		TAY
		LDA	<WORK6
		AND	#0001H
		BEQ	PYOM380
		TYA
		ASL	A
		ASL	A
		ASL	A
		ASL	A
		TAY
PYOM380		EQU	$
		TYA
		AND	#0C000H
		ORA	<PYBGUN
		ORA	PLCGRM
		ORA	#00014H
		STA	!POAM+2,X
		TXA
		LSR	A
		LSR	A
		TAX
		LDA	!POAMSB+0,X
		AND	#0FF00H
		STA	!POAMSB+0,X
;
;************	player ken oam set
PYOM400		EQU	$
		LDA	PYDMBT1
		AND	#0004H
		BEQ	PYOM402
		JSR	YDMSBOM		; y demo sub oam set
		BRA	PYOM410
PYOM402		EQU	$
		LDA	<LNMODE
		AND	#00FFH
		CMP	#SDSP		;
		BEQ	PYOM406
		CMP	#BBSP
		BEQ	PYOM406
		CMP	#JNSP
		BEQ	PYOM406
		CMP	#KNSP
		BEQ	PYOM406
		CMP	#KNS1
		BEQ	PYOM406
		LDA	PYDMBT		; Y demo on ?
		AND	#00FFH
		BNE	PYOM406
		LDA	!KNPASFG	; monoris ken porzu flag !!
		ORA	PIPIFG		; piri piri ?
		AND	#00FFH
		BNE	PYOM406
		LDA	AITMBT
		AND	#0000000001000000B
		BNE	PYOM410
		LDA	AITMBT1		;B item on ? [YES:PYOM404]
		AND	#0000000000111101B
		BNE	PYOM408
		LDA	AITMBT		; B item on ? [no:PYOM410]
		AND	#0000000010010011B
		BNE	PYOM408
;
PYOM404		EQU	$
		LDA	<KENKY
		AND	#0080H
		BEQ	PYOM410
PYOM406		EQU	$
		LDA	>ITMTBL6	; ken have ?
		INC	A
		AND	#00FEH
		BEQ	PYOM410
;
PYOM408		EQU	$
		JSR	KNCNST
		BCC	PYOM418
PYOM410		EQU	$
		BRL	PYOM520
;
PYOM418		EQU	$
		LDY	<WORK2
		MEM8
		SEP	#00100000B
		LDA	<PLZPS0
		BMI	PYOM41C
		LDA	<PLZPS1
		BRA	PYOM420
;
PYOM41C		EQU	$
		LDA	<PLZPS1		; z-pos over check !!
		CMP	#0F0H
		BCC	PYOM420
		LDA	#000H
PYOM420		EQU	$
		STA	<WORKB

		LDA	<WORK1		; ken kihon y-pos set
		CLC
		ADC	!KNYPSD,Y
		SEC
		SBC	<WORKB
		STA	<WORKB
		LDA	<WORK0		; ken kihon x-pos set
		CLC
		ADC	!KNXPSD,Y
		STA	<WORKA
		STA	<WORK8
;
		LDA	AITMBT		; hanmer ?
		AND	#00000010B
		BEQ	PYOM428
		LDA	AITMMD
		CMP	#002H
		BNE	PYOM430
		LDA	<KENFM
		CMP	#00FH
		BNE	PYOM430
		BRA	PYOM42C
PYOM428		EQU	$
		LDA	AITMBT		; B aitem (rot) ? [YES:PYOM430]
		AND	#00000101B
		BNE	PYOM430
;
PYOM42C		EQU	$
		LDA	!ENMYDT,Y	; teki ken haba y-pos set
		STA	<KNCRYP
		LDA	!ENMXDT,Y	; teki ken haba x-pos set
		STA	<KNCRXP		
;
PYOM430		EQU	$
		STZ	<WORKE
		STZ	<WORKF
;;;;;;;;		LDA	PLCGRM+1
;;;;;;;;		BNE	PYOM434
;;;;;;;;		LDA	#006H
;;;;;;;;		STA	<WORKF
;;;;;;;;PYOM434		EQU	$
		LDA	AITMBT		; dot check !!
		AND	#00000101B
		BEQ	PYOM438
		LDY	LOTITM
		DEY
		LDA	!LTCGDT,Y	; atoribuuto set
		STA	<WORKF
;
PYOM438		EQU	$
		LDA	AITMBT1		; soromon check !!
		AND	#00001000B
		BEQ	PYOM43C
		LDA	BPSHMD
		CMP	#00DH
		BNE	PYOM43C
		LDA	#004H
		STA	<WORKF
PYOM43C		EQU	$
		MEM16
		REP	#00100000B
;
		LDA	<WORK6		; *3
		ASL	A
		CLC
		ADC	<WORK6
		ASL	A		; *2
		TAY
		STZ	<WORK6		; loop counter
		PHY
		LDX	<BMWORK+0
		LDA	!KNPTTBL,X
		STA	<BMWORK+2
		LDA	<WORK4
		AND	#00FFH
		TAY
		LDA	(<BMWORK+2),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX
		PLY
;
		LDA	<WORKE
		PHA
		JSR	LVUPKN		; level up ken oam set
		PLA
		STA	<WORKE
;
PYOM440		EQU	$
		MEM16
		REP	#00100000B
		LDA	!KNCRDT,Y
		CMP	#0FFFFH
		BEQ	PYOM480
		AND	#0CFFFH
		ORA	<PYBGUN
		STA	!POAM+2,X
		AND	#00E00H
		CMP	#00200H
		BEQ	PYOM450
;
		LDA	PLCGRM		; coler chenge ?
		BNE	PYOM450
		LDA	!POAM+2,X
		AND	#0F1FFH
		ORA	#00600H
		STA	!POAM+2,X
;
PYOM450		EQU	$
		LDA	<WORKE		; dot check !!
		BEQ	PYOM460
		LDA	!POAM+2,X
		AND	#0F1FFH
		ORA	<WORKE
		STA	!POAM+2,X
;
PYOM460		EQU	$
		LDA	<WORKA
		STA	!POAM+0,X
		AND	#00FFH
		STA	<BMWORK+2
;
		LDA	<WORK0
		AND	#00FFH
		SEC
		SBC	<BMWORK+2
		BPL	PYOM470
		EOR	#0FFFFH
		INC	A
PYOM470		EQU	$
		CMP	#0080H
		BCC	PYOM474
		LDA	#0001H
		TSB	<WORKC
;
PYOM474		EQU	$
		PHY
		PHX
		TXA
		LSR	A
		LSR	A
		TAX
		MEM8
		SEP	#00100000B
		LDA	<WORKC
		STA	!POAMSB+0,X
		AND	#11111110B
		STA	<WORKC
;
		PLX
		PLY
		INX
		INX
		INX
		INX
PYOM480		EQU	$
		MEM8
		SEP	#00100000B
		LDA	<WORKA
		CLC
		ADC	#08H
		STA	<WORKA
		INY
		INY
		LDA	<WORK6
		INC	A
		STA	<WORK6
		AND	#00000001B
		BNE	PYOM500
		LDA	<WORKB		; y-pos next set
		CLC
		ADC	#08H
		STA	<WORKB
		LDA	<WORK8		;x-pos hozon set
		STA	<WORKA
PYOM500		EQU	$
		LDA	<WORK6
		CMP	#03H
		BEQ	PYOM510
		BRL	PYOM440
PYOM510		EQU	$
		IDX8
		SEP	#00010000B
;
;************** tate oam set
PYOM520		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		LDA	>ITMTBL7	; tate have ?
		AND	#00FFH
		BEQ	PYOM526
		LDA	>MODTBL0	; oopning demo ? [YES:PYOM600]
		AND	#00FFH
		BEQ	PYOM526
		JSR	TTCNST
		BCC	PYOM528
PYOM526		EQU	$
		BRL	PYOM600
;
PYOM528		EQU	$
		LDY	<WORK2
		MEM8
		SEP	#00100000B
		LDA	<PLZPS0
		BMI	PYOM52C
		LDA	<PLZPS1
		BRA	PYOM530
;
PYOM52C		EQU	$
		LDA	<PLZPS1		; z-pos over check !!
		CMP	#0F0H
		BCC	PYOM530
		LDA	#000H
PYOM530		EQU	$
		STA	<WORKB
		LDA	<WORK1		; ken kihon y-pos set
		CLC
		ADC	!TTYPSD,Y
		DEC	A
		SEC
		SBC	<WORKB
		STA	<WORKB
		LDA	<WORK0		; ken kihon x-pos set
		CLC
		ADC	!TTXPSD,Y
		STA	<WORKA
		STA	<WORK8
		LDA	!TTXPSD,Y
		JSR	XSRGICK		; tate gamen gai check !!
;
		STZ	<WORKE		; coler clear !!
		LDA	#00AH
		STA	<WORKF
		LDA	PLCGRM+1
		BNE	PYOM538
		LDA	#006H
		STA	<WORKF
;
PYOM538		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		LDA	<WORK6		;chara data index
		ASL	A
		CLC
		ADC	<WORK6
		ASL	A
		TAY
		STZ	<WORK6		; loop counter
		PHY
		LDX	<BMWORK+0
		LDA	!TTPTTBL,X
		STA	<BMWORK+2
		LDA	<WORK4
		AND	#00FFH
		TAY
		LDA	(<BMWORK+2),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX
		PLY
;
PYOM540		EQU	$
		MEM16
		REP	#00100000B
		STZ	<BMWORK+2
		LDA	!TTCRDT,Y
		CMP	#0FFFFH
		BEQ	PYOM580
		AND	#0C1FFH
		ORA	<WORKE
		ORA	<PYBGUN
		STA	!POAM+2,X
		LDA	<WORKA
		STA	!POAM+0,X
;
		PHX
		TXA
		LSR	A
		LSR	A
		TAX
		MEM8
		SEP	#00100000B
		LDA	<WORKC
		ORA	!XRHIFG
		STA	!POAMSB+0,X
		PLX
		INX
		INX
		INX
		INX
PYOM580		EQU	$
		MEM8
		SEP	#00100000B
		LDA	<WORKA
		CLC
		ADC	#08H
		STA	<WORKA
		INY
		INY
		INC	<WORK6
		LDA	<WORK6
		AND	#00000001B
		BNE	PYOM584
		LDA	<WORKB
		CLC
		ADC	#08H
		STA	<WORKB
		LDA	<WORK8
		STA	<WORKA
PYOM584		EQU	$
		LDA	<WORK6
		CMP	#03H
		BNE	PYOM540
		IDX8
		SEP	#00010000B
;
;************** kage oam set
PYOM600		EQU	$
		MEM8
		IDX8
		SEP	#00110000B
		LDA	<OMSBMD		; oam sub shokyo ?
		CMP	#OMS000
		BNE	PYOM602
		BRL	PYOM700
;
PYOM602		EQU	$
		LDA	<LNMODE		; oopning neru ? [NO:PYOM700]
		CMP	#OPNG
		BEQ	PYOM620
;
		LDA	PYMODE
		CMP	#JUMP
		BEQ	PYOM604
;;;;;;;;		CMP	#HNMV
;;;;;;;;		BEQ	PYOM604
;
		LDA	ASWFLG		; asase ? [NO:PYOM604]
		BEQ	PYOM604
		JSR	AWKGOM		; asase kage oam set
		BRA	PYOM620
PYOM604		EQU	$
		MEM8
		IDX8
		LDA	<DIEFG
		CMP	#004H
		BEQ	PYOM620
		LDA	<LNMODE
		CMP	#SWMD
		BEQ	PYOM620
;
PYOM610		EQU	$
		LDY	#000H
		LDA	<HOLEFG2	; hole down ?
		BEQ	PYOM640
		CMP	#01H
		BEQ	PYOM640
		LDA	<HOLEFG1
		CMP	#006H
		BCC	PYOM620
		JSR	KGOMST		; kage kotei set sub
PYOM620		EQU	$
		BRL	PYOM700
;
PYOM640		EQU	$
		LDA	<DIEFG		; jump ?
		BEQ	PYOM680
		CMP	#001H
		BNE	PYOM660
		LDA	<KAKUMD
		BNE	PYOM680
PYOM660		EQU	$
		LDY	#001H
PYOM680		EQU	$
		STY	<WORKA
		STZ	<WORKB
;
		LDA	KGHORM
		LSR	A
		TAY
		MEM16
		REP	#00100000B
		LDA	<PLYPS1
		SEC
		SBC	<SCCV2
		STA	<WORK6
		LDA	!KGYPSD,Y
		AND	#00FFH
		CMP	#0080H
		BCC	PYOM6A0
		ORA	#0FF00H
PYOM6A0		EQU	$
		CLC
		ADC	<WORK6
		STA	<WORK6
		MEM8
		SEP	#00100000B
;
		LDA	<WORK7
		BNE	PYOM620
;
		LDA	<WORK1		; ken kihon y-pos set
		CLC
		ADC	!KGYPSD,Y
		STA	<WORK7
		LDA	<WORK0		; ken kihon x-pos set
		CLC
		ADC	!KGXPSD,Y
		STA	<WORK6
;
PYOM6C0		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		LDX	<BMWORK+0
		LDA	!KGPTTBL,X
		STA	<BMWORK+2
		LDA	<WORK4
		AND	#00FFH
		TAY
		LDA	(<BMWORK+2),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX
		LDA	<WORKA
		ASL	A
		ASL	A
		TAY
;
PYOM6E0		EQU	$
		LDA	!KGCRDT,Y
		AND	#0CFFFH
		ORA	KGBGUN
		STA	!POAM+2,X
		AND	#03FFFH
		ORA	#04000H		; (H) flip set
		STA	!POAM+6,X
;
		LDA	<WORK6
		STA	!POAM+0,X
		XBA
		CLC
		ADC	#00800H
		XBA
		STA	!POAM+4,X
;
		LDA	PLCGRM		; coler chenge ?
		BNE	PYOM6F0
		LDA	!POAM+2,X
		AND	#0F1FFH
		ORA	#00600H
		STA	!POAM+2,X
		LDA	!POAM+6,X
		AND	#0F1FFH
		ORA	#00600H
		STA	!POAM+6,X
PYOM6F0		EQU	$
		TXA
		LSR	A
		LSR	A
		TAX
		STZ	!POAMSB+0,X
		MEM8
		IDX8
		SEP	#00110000B
;
;
;************	player link oam set
PYOM700		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		LDX	<BMWORK+0
		LDA	!PYPTTBL,X
		STA	<BMWORK+2
		LDY	<WORK4
		LDA	(<BMWORK+2),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX
		LDA	<WORK2
		ASL	A
		TAY
		LDA	!PLMODE,Y
		STA	<WORKE
		ASL	A
		STA	PCHPT0		;character patern no set 
		CLC			; * 3
		ADC	<WORKE
		TAY
;
		MEM8
		SEP	#00100000B
		LDA	<OMSBMD		; oam sub shokyo ?
		CMP	#OMS000
		BNE	PYOM708
		BRL	PYOM760
;
PYOM708		EQU	$
		LDA	<PLZPS0
		BMI	PYOM710
		LDA	<PLZPS1
		BRA	PYOM720
;
PYOM710		EQU	$
		LDA	<PLZPS1		; z-pos over ? [NO:PYOM760]
		CMP	#0F0H
		BCC	PYOM720
		LDA	#000H
PYOM720		EQU	$
		STA	<WORKF
		STZ	<WORKE
;
		LDA	<WORK1		; player kihon y-pos set
		CLC
		ADC	!LINKDT,Y
		SEC
		SBC	<WORKF
		STA	<WORKB
		LDA	<WORK0		; player kihon x-pos set
		CLC
		ADC	!LINKDT+1,Y
		STA	<WORKA
;
		MEM16
		REP	#00100000B
		LDA	!LINKDT+2,Y	; no chara [YES:PYOM780]
		XBA
		STA	<WORK6
		AND	#0F000H
		CMP	#0F000H
		BEQ	PYOM740
;
		ORA	<PYBGUN		; uusen juni set
		ORA	PLCGRM		;
		STA	!POAM+2,X	; atori set
		STZ	<WORK2
		LDA	<WORKA		; Y,X pos oam set
		STA	!POAM+0,X
		AND	#000FFH
		CMP	#000F8H
		BCC	PYOM730
		LDA	#0001H
		STA	<WORK2
		
PYOM730		EQU	$
		PHX
		TXA
		LSR	A
		LSR	A
		TAX
		LDA	!POAMSB+0,X
		AND	#0FF00H
		ORA	<WORK2
		ORA	#00002H
		STA	!POAMSB+0,X
		PLX
PYOM740		EQU	$
		LDA	<WORK6
		AND	#00F00H
		CMP	#00F00H
		BEQ	PYOM760
		ASL	A
		ASL	A
		ASL	A
		ASL	A
		ORA	<PYBGUN
		ORA	PLCGRM
		ORA	#00002H
		STA	!POAM+6,X
		LDA	<WORK0
		SEC
		SBC	<WORKE
		CLC
		ADC	#00800H
		STA	!POAM+4,X
		TXA
		LSR	A
		LSR	A
		TAX
		LDA	!POAMSB+1,X
		AND	#0FF00H
		ORA	#0002H
		STA	!POAMSB+1,X
PYOM760		EQU	$
		IDX8
		MEM8
		SEP	#00110000B
;
;************	player link gamen gai check
		LDA	#001H
		STA	<WORKE
		LDA	<PWORK6		; door in ? [NO:PYOM780]
		BEQ	PYOM780
		MEM16
		REP	#00100000B
		LDA	<PLXPS1
		SEC
		SBC	<SCCH2
		CMP	#0004H
		BCC	PYOM840
		CMP	#000FCH
		BCS	PYOM840
		LDA	<PLYPS1
		SEC
		SBC	<SCCV2
		CMP	#004H
		BCC	PYOM840
		CMP	#000E0H
		BCS	PYOM840
		MEM8
		SEP	#00100000B
;
;************	player link oam sub set
PYOM780		EQU	$
		STZ	<WORKE
		LDA	<GAMEMD		; player stop check !!
		BNE	PYOM820
;
		LDA	PYFLASH		; flash on ?
		BEQ	PYOM820
		DEC	A
		STA	PYFLASH
		CMP	#004H		; time lag
		BCC	PYOM820
		AND	#00000001B
		BEQ	PYOM840
;
PYOM820		EQU	$
		LDA	<OMSBMD		; oam sub shokyo ?
		CMP	#OMS000
		BEQ	PYOM840
		LDA	<KAKUMD		; kakuremino ?
		BEQ	PYOM900
PYOM840		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		LDA	OMPTFG
		LSR	A
		LSR	A
		TAX
		LDA	#0101H
		STA	!POAMSB+0,X
		STA	!POAMSB+2,X
		STA	!POAMSB+4,X
		STA	!POAMSB+6,X
		STA	!POAMSB+8,X
		STA	!POAMSB+0AH,X
;
		LDA	<OMSBMD		; oam sub shokyo ?
		AND	#00FFH
		CMP	#OMS000
		BEQ	PYOM880
		LDA	<WORKE
		AND	#00FFH
		BNE	PYOM880
;;;;;;;;		LDA	<KAKUMD
;;;;;;;;		BEQ	PYOM880
		LDX	<BMWORK+0
		LDA	!KGPTTBL,X
		STA	<BMWORK+2
		LDA	<WORK4
		AND	#00FFH
		TAY
		LDA	(<BMWORK+2),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		LSR	A
		LSR	A
		TAX
		STZ	!POAMSB+0,X
PYOM880		EQU	$
		MEM8
		IDX8
		SEP	#00110000B
;
PYOM900		EQU	$
		LDA	<GAMEMD		; street kaidan check
		CMP	#p1_sls0
		BEQ	PYOMA00
		CMP	#p1_sls1
		BNE	PYOMA40
PYOMA00		EQU	$
		PLA
		STA	<PLYPS0
		PLA
		STA	<PLYPS1
;
PYOMA40		EQU	$
		PLB
		RTL
;
;
;************************************************************************
;*		bit surch sub  (in-->A out-->X)		(PYBTSR)        *
;************************************************************************
PYBTSR		EQU	$
		LDX	#07H		; item surch !
PYBT100		EQU	$
		ASL	A
		BCS	PYBT200
		DEX
		BPL	PYBT100
PYBT200		EQU	$	
		RTS
;
;************************************************************************
;*		ken edia chara chenge no set		(KNCNST)        *
;************************************************************************
KNNODT		EQU	$		; ken edia data
;			  0   1   2   3   4   5   6   7
		HEX	006,006,004,004,004,004,000,000	;ken
		HEX	008,008,008,008,002,002,002,002
		HEX	00A,00A,00A,00A,00C,00C,00C,00C
		HEX	00E,00E,00E,00E,000
		HEX	009,00C,009,00C,00E,00A,008,00D ;item
		HEX	008,00D,012,012,011,011,010,010
		HEX	010,010,040,041,040,041,018,018
		HEX	019,019,024,021,025,023,022,020
		HEX	026,023,025,026,022,028,02A,029
		HEX	029,02C,028,02B,028,02B,030
KNNODT1		EQU	$
		HEX	001,004,001,004,006,002,000,005 ;item
		HEX	000,005
;
KNNOSB		EQU	$		; ken sizu data
;			  0   1   2   3   4   5   6   7
		HEX	000,000,000,000,000,000,000,000	;ken
		HEX	000,000,000,000,002,002,002,002
		HEX	002,002,002,002,002,002,002,002
		HEX	002,002,002,002,000
		HEX	000,000,000,000,000,000,002,000 ;item
		HEX	002,000,000,000,000,000,002,002
		HEX	002,002,002,000,002,000,000,000
		HEX	000,000,002,002,002,002,002,002
		HEX	002,002,002,002,002,002,000,000
		HEX	000,000,002,000,002,000,002
;
KNCNST		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		LDY	<WORK2
		LDA	!KNMODE,Y
		AND	#00FFH
		CMP	#00FFH
		BEQ	KNCN300
		STA	<WORK6
		TAX
		LDA	!KNNOSB,X
		AND	#00FFH
		STA	<WORKC
		TXA
		LDY	!KNNODT,X
		CMP	#DT00
		BCC	KNCN100
		LDA	AITMBT
		AND	#0005H
		BEQ	KNCN080
KNCN040		EQU	$
		TXA
		SEC
		SBC	#DT00
		TAX
		LDY	!KNNODT1,X
KNCN080		EQU	$
		TYA
		AND	#00FFH
		STA	<WORKA
;
		LDA	ITMCPT
		AND	#0FF00H
		ORA	<WORKA
		STA	ITMCPT
		BRA	KNCN200
;
KNCN100		EQU	$
		TYA
		AND	#00FFH
		STA	<WORKA
		LDA	KENCPT
		AND	#0FF00H
		ORA	<WORKA
		STA	KENCPT
;
KNCN200		EQU	$
		CLC
		RTS
;
KNCN300		EQU	$
		SEC
		RTS
;
;************************************************************************
;*		tate edia chara chenge no set		(TTCNST)        *
;************************************************************************
TTNODT		EQU	$		; tate edia data
;			  0   1   2   3   4   5   6   7
		HEX	000,002,004,004,004,004,004,004	;tate
		HEX	009,00C,009,00C,00E,00A,008,00D	;item
		HEX	008,00D
TTNODT1		EQU	$
		HEX	001,004,001,004,006,002,000,005	;item
		HEX	000,005
;
TTCNST		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		STZ	<WORKC
		LDY	<WORK2
		LDA	!TTMODE,Y
		AND	#00FFH
		CMP	#00FFH
		BEQ	TTCN300
		STA	<WORK6
		TAX
		LDY	!TTNODT,X
		AND	#00F8H
		BEQ	TTCN100
		LDA	AITMBT
		AND	#0005H
		BEQ	TTCN080
		TXA
		SEC
		SBC	#0008H
		TAX
		LDY	!TTNODT1,X
TTCN080		EQU	$
		TYA
		AND	#00FFH
		STA	<WORKA
		LDA	ITMCPT
		AND	#0FF00H
		ORA	<WORKA
		STA	ITMCPT
		AND	#0007H
		BEQ	TTCN140
		BRA	TTCN200
;
TTCN100		EQU	$
		TYA
		AND	#00FFH
		STA	<WORKA
		LDA	TATCPT
		AND	#0FF00H
		ORA	<WORKA
		STA	TATCPT
TTCN140		EQU	$
		LDA	#0002H
		STA	<WORKC
;
TTCN200		EQU	$
		CLC
		RTS
;
TTCN300		EQU	$
		SEC
		RTS
;
;************************************************************************
;*		player level up ken oam set		(LVUPKN)	*
;************************************************************************
;;;;;;;;LVKNCRD		EQU	$		; level up ken chara data
;;;;;;;;		WORD	0FFFFH,0FFFFH,06A3EH,06A2FH,02A05H ; up
;;;;;;;;		WORD	02A2FH,02A3EH,0FFFFH,0FFFFH
;;;;;;;;		WORD	0FFFFH,0FFFFH,0AA3EH,0AA2FH,0AA05H ; down
;;;;;;;;		WORD	0EA2FH,0EA3EH,0FFFFH,0FFFFH
;;;;;;;;		WORD	0FFFFH,0FFFFH,02A3EH,02A3FH,02A05H ; left
;;;;;;;;		WORD	0AA3FH,0AA3EH,0FFFFH,0FFFFH
;;;;;;;;		WORD	0FFFFH,0FFFFH,06A3EH,06A3FH,06A05H ; right
;;;;;;;;		WORD	0EA3FH,0EA3EH,0FFFFH,0FFFFH
;;;;;;;;LVKNYPD		EQU	$		; level up ken y-pos data
;;;;;;;;		HEX	0FF,0FF,0FD,0F7,0F3 ; up
;;;;;;;;		HEX	0F8,0FD,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,017,01E,021 ; down
;;;;;;;;		HEX	01E,017,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,002,005,00C ; left
;;;;;;;;		HEX	015,019,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,002,005,00C ; right
;;;;;;;;		HEX	015,019,0FF,0FF
;;;;;;;;LVKNXPD		EQU	$		; level up ken x-pos data
;;;;;;;;		HEX	0FF,0FF,00E,009,000 ; up
;;;;;;;;		HEX	0F7,0F3,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,0FC,0FE,008 ; down
;;;;;;;;		HEX	011,013,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,0F5,0F1,0EC ; left
;;;;;;;;		HEX	0F1,0F6,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,013,017,01C ; right
;;;;;;;;		HEX	017,012,0FF,0FF
;;;;;;;;LNYPEM		EQU	$		; teki ken y-pos haba data
;;;;;;;;		HEX	0FF,0FF,0FD,0F7,0F3 ; up
;;;;;;;;		HEX	0F8,0FD,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,017,01E,021 ; down
;;;;;;;;		HEX	01E,017,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,002,006,00D ; left
;;;;;;;;		HEX	015,019,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,002,006,00D ; right
;;;;;;;;		HEX	015,019,0FF,0FF
;;;;;;;;LNXPEM		EQU	$		; teki ken x-pos haba data
;;;;;;;;		HEX	0FF,0FF,00E,009,000 ; up
;;;;;;;;		HEX	0F7,0F3,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,0FC,0FE,008 ; down
;;;;;;;;		HEX	011,013,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,0F5,0F1,0EC ; left
;;;;;;;;		HEX	0F1,0F7,0FF,0FF
;;;;;;;;		HEX	0FF,0FF,013,017,01C ; right
;;;;;;;;		HEX	017,011,0FF,0FF
LVKNCRD		EQU	$		; level up ken chara data
		WORD	0FFFFH,0FFFFH,06A3EH,06A2FH,06A2FH ; up
		WORD	02A05H,02A2FH,02A3EH,0FFFFH
		WORD	0FFFFH,0FFFFH,0AA3EH,0AA2FH,0AA2FH ; down
		WORD	0AA05H,0EA2FH,0EA3EH,0FFFFH
		WORD	0FFFFH,0FFFFH,02A3EH,02A3FH,02A3FH ; left
		WORD	02A05H,0AA3FH,0AA3EH,0FFFFH
		WORD	0FFFFH,0FFFFH,06A3EH,06A3FH,06A3FH ; right
		WORD	06A05H,0EA3FH,0EA3EH,0FFFFH
LVKNYPD		EQU	$		; level up ken y-pos data
		HEX	0FF,0FF,0FB,0F3,0F1 ; up
		HEX	0EB,0F3,0FB,0FF
		HEX	0FF,0FF,016,01B,01D ; down
		HEX	023,01B,018,0FF
		HEX	0FF,0FF,0FF,002,005 ; left
		HEX	00C,014,01A,0FF
		HEX	0FF,0FF,0FF,002,005 ; right
		HEX	00C,014,01A,0FF
LVKNXPD		EQU	$		; level up ken x-pos data
		HEX	0FF,0FF,00F,00D,008 ; up
		HEX	0FF,0F6,0F2,0FF
		HEX	0FF,0FF,0FA,0FD,001 ; down
		HEX	008,010,015,0FF
		HEX	0FF,0FF,0F5,0F1,0EE ; left
		HEX	0E8,0EF,0F4,0FF
		HEX	0FF,0FF,013,017,01A ; right
		HEX	020,019,014,0FF
;
		MEM16
		IDX16
;
LVUPKN		EQU	$
		LDA	<WORKA
		PHA
		PHY
		LDA	<LNMODE
		BEQ	LVKN100
LVKN080		EQU	$
		BRL	LVKNF00
LVKN100		EQU	$
		LDA	>ITMTBL6	; level up ken ? [NO:LVKNF00]
		AND	#00FFH
		BEQ	LVKN080
		CMP	#00FFH
		BEQ	LVKN080
		CMP	#0001H
		BEQ	LVKN080
		LDA	<KENKY		; a key on ? [NO:LVKNF00]
		AND	#0080H
		BEQ	LVKN080
		LDA	<KENMD
		AND	#00FFH
		CMP	#0009H
		BCS	LVKN080
		ASL	A
		STA	<WORKA
		LDA	<PLMKCH
		AND	#00FFH
		LSR	A
		STA	<WORKE
		ASL	A
		ASL	A
		ASL	A
		CLC
		ADC	<WORKE
		ASL	A
		CLC
		ADC	<WORKA
		TAY
		LDA	!LVKNCRD,Y
		CMP	#0FFFFH
		BEQ	LVKNF00
		AND	#0CFFFH
		ORA	<PYBGUN
		STA	!POAM+2,X
		LDA	PLCGRM		; coler chenge ?
		BNE	LVKN200
		LDA	!POAM+2,X
		AND	#0F1FFH
		ORA	#00600H
		STA	!POAM+2,X
;
LVKN200		EQU	$
		TYA
		LSR	A
		TAY
		MEM8
		SEP	#00100000B
		LDA	!LVKNYPD,Y
		CLC
		ADC	<WORK1
		STA	<WORKB
		LDA	!LVKNXPD,Y
		CLC
		ADC	<WORK0
		STA	<WORKA
		LDA	!LVKNYPD,Y
		STA	<KNCRYP		; teki ken y-pos haba set
		LDA	!LVKNXPD,Y
		STA	<KNCRXP		; teki ken x-pos haba set
		JSR	XSRGICK		; tate gamen gai check !!
		MEM16
		REP	#00100000B
		LDA	<WORKA
		STA	!POAM+0,X
;
		INX
		INX
		INX
		INX
;
		PHX
		TXA
		SEC
		SBC	#0004H
		LSR	A
		LSR	A
		TAX
		LDA	#000H
		ORA	!XRHIFG
		STA	!POAMSB+0,X
		PLX
;
LVKNF00		EQU	$
		STZ	<WORKE
		PLY
		PLA
		STA	<WORKA
		RTS
;
		MEM8
		IDX8
;
;
;************************************************************************
;*		player y-demo sub oam set	       	(YDMSBOM)        *
;************************************************************************
SBCRDT0		EQU	$
		WORD	02609H		; [0] neru (zzzz)
SBMODE		EQU	$
		BYTE	0FFH,0FFH,0FFH,0FFH	; [0]	0
		BYTE	000H,0FFH,0FFH,0FFH	; 	1
		BYTE	000H,000H,0FFH,0FFH	; 	2
		BYTE	000H,000H,000H,0FFH	; 	3
SBYPOS		EQU	$
		BYTE	0FFH,0FFH,0FFH,0FFH	; [0]	0
		BYTE	008H,0FFH,0FFH,0FFH	; 	1
		BYTE	008H,005H,0FFH,0FFH	; 	2
		BYTE	008H,005H,002H,0FFH	; 	3
SBXPOS		EQU	$
		BYTE	0FFH,0FFH,0FFH,0FFH	; [0]	0
		BYTE	00EH,0FFH,0FFH,0FFH	; 	1
		BYTE	00EH,016H,0FFH,0FFH	; 	2
		BYTE	00EH,016H,01EH,0FFH	; 	3
SBINDEX		EQU	$		; data index
		BYTE	000H,004H
YDMSBOM		EQU	$
		MEM8
		IDX8
		SEP	#00110000B
		LSR	A
		LSR	A
		JSR	PYBTSR		; bit check sub
		LDA	SBINDEX,X
		CLC
		ADC	PYDMNO1
		ASL	A
		ASL	A
		STA	<WORK6
		STZ	<WORK7
		LDA	#042H
		STA	ITMCPT
		MEM16
		IDX16
		REP	#00110000B
		LDX	<BMWORK+0
		LDA	!KNPTTBL,X
		STA	<BMWORK+2
;
		LDA	<WORK4		; oam point ---> x-reji
		AND	#00FFH
		TAY
		LDA	(<BMWORK+2),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX
		LDY	<WORK6		; y-reji index set
		STZ	<WORK6		; loop counter clear
;
YDMS100		EQU	$
		MEM8
		SEP	#00100000B
		LDA	<WORK1		; ken kihon y-pos set
		CLC
		ADC	!SBYPOS,Y
		STA	<WORKB
		LDA	<WORK0		; ken kihon x-pos set
		CLC
		ADC	!SBXPOS,Y
		STA	<WORKA
		PHY
		LDA	!SBMODE,Y
		CMP	#0FFH
		BEQ	YDMS140
		MEM16
		REP	#00100000B
		AND	#00FFH
		TAY
		LDA	!SBCRDT0,Y
		AND	#0CFFFH
		ORA	<PYBGUN
		STA	!POAM+2,X
		LDA	<WORKA
		STA	!POAM+0,X
		PHX
		TXA
		LSR	A
		LSR	A
		TAX
		MEM8
		SEP	#00100000B
		STZ	!POAMSB+0,X
		PLX
		INX
		INX
		INX
		INX
YDMS140		EQU	$
		PLY
		INY
		INC	<WORK6
		LDA	<WORK6
		CMP	#004H
		BNE	YDMS100
		MEM16
		IDX16
		REP	#00110000B
		RTS
;
;
		MEM8
		IDX8
;
;************************************************************************
;*		player hole down kage oam  set		(KGOMST)	*
;************************************************************************
KGYXPS		EQU	$
		BYTE	000H,000H,004H
KGOMST		EQU	$
		LDY	#000H
		LDA	<PLHNL0
		SEC
		SBC	#00CH
		SEC
		SBC	<PLYPS1
		CMP	#0F0H
		BCS	KGOM200
		CMP	#030H
		BCC	KGOM100
		LDY	#004H
KGOM100		EQU	$
		CMP	#060H
		BCC	KGOM200
		LDY	#008H
KGOM200		EQU	$
		TYA
		LSR	A
		LSR	A
		TAX
		LDA	!KGYXPS,X
		STA	<WORK6
;
		LDA	<PLHNL0
		SEC
		SBC	#00CH
		SEC
		SBC	<SCCV2
		CLC
		ADC	#01DH
		STA	<WORK7
		LDA	<WORK0		; ken kihon x-pos set
		CLC
		ADC	<WORK6
		STA	<WORK6
;
		STZ	<WORK4		; loop counter
		MEM16
		IDX16
		REP	#00110000B
		PHY
		LDX	<BMWORK+0
		LDA	!KGPTTBL,X
		STA	<BMWORK+2
		LDA	<WORK3
		AND	#00FFH
		TAY
		LDA	(<BMWORK+2),Y
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX
		PLY
;
KGOM300		EQU	$
		MEM16
		REP	#00100000B
		LDA	!KGCRDT,Y
		CMP	#0FFFFH
		BEQ	KGOM400
		AND	#0CFFFH
		ORA	KGBGUN
		STA	!POAM+2,X
		LDA	<WORK6
		STA	!POAM+0,X
KGOM400		EQU	$
		PHX
		TXA
		LSR	A
		LSR	A
		TAX
		MEM8
		SEP	#00100000B
		STZ	!POAMSB+0,X
		PLX
;
		LDA	<WORK6
		CLC
		ADC	#08H
		STA	<WORK6
		INY
		INY
		INX
		INX
		INX
		INX
		INC	<WORK4
		LDA	<WORK4
		CMP	#02H
		BNE	KGOM300
		IDX8
		SEP	#00010000B
		RTS

;;;;;;;;;
;;;;;;;;;************************************************************************
;;;;;;;;;*		player swimming kage oam  set		(SWKGOM)	*
;;;;;;;;;************************************************************************
;;;;;;;;SWKGOM		EQU	$	; swimming kage set
;;;;;;;;		LDA	<PLMKCH
;;;;;;;;		CMP	#002H
;;;;;;;;		BNE	SWKG600	
;;;;;;;;		LDA	SWMODE
;;;;;;;;		BEQ	SWKG600
;;;;;;;;		DEC	A
;;;;;;;;		BEQ	SWKG600
;;;;;;;;;
;;;;;;;;		LDX	#03H
;;;;;;;;		CMP	#01H
;;;;;;;;		BEQ	SWKG100
;;;;;;;;		LDX	#04H
;;;;;;;;SWKG100		EQU	$
;;;;;;;;		STX	<WORKA
;;;;;;;;		STZ	<WORKB
;;;;;;;;		LDA	<WORK1
;;;;;;;;		CLC
;;;;;;;;		ADC	#011H
;;;;;;;;		STA	<WORK7
;;;;;;;;		LDA	<WORK0
;;;;;;;;		STA	<WORK6
;;;;;;;;		SEC
;;;;;;;;		RTS
;;;;;;;;;
;;;;;;;;SWKG600		EQU	$
;;;;;;;;		CLC
;;;;;;;;		RTS
;
;************************************************************************
;*		player asai swim kage oam set		(AWKGOM)	*
;************************************************************************
AWLAKD		EQU	$		; walk mode data
		BYTE	WALK,KNKM,MOTM
TATEKG		EQU	$
		HEX	004,004,008,008
;
AWKGOM		EQU	$
		LDA	ASAFLM
		INC	A
		AND	#00001111B
		STA	ASAFLM
		CMP	#09H
		BCC	AWKG040
;
		STZ	ASAFLM
;
		LDA	ASAMDE
		INC	A
		AND	#00000011B
		STA	ASAMDE
		CMP	#003H
		BNE	AWKG040
		STZ	ASAMDE
AWKG040		EQU	$
		LDA	>ITMTBL7
		TAY
		LDA	KGHORM		; kage houkou
		LSR	A
		CLC
		ADC	!TATEKG,Y
		TAY
;
		LDA	<WORK1
		CLC
		ADC	!KGYPSD,Y
		STA	<WORK7
		LDA	<WORK0
		CLC
		ADC	!KGXPSD,Y
		STA	<WORK6
;
		LDA	ASAMDE
		ASL	A
		ASL	A
		STA	<CGBFWK
;
		PHY
		LDX	<BMWORK+0
		LDA	!KGPTTBL,X
		STA	<BMWORK+2
		LDA	!KGPTTBL+1,X
		STA	<BMWORK+3
		LDY	<WORK4
		LDA	(<BMWORK+2),Y
		TAX
		PLY
		LDA	ASWFLG
		CMP	#002H
		BNE	AWKG100
;
		LDY	#AWKGOM-AWLAKD-1
AWKG080		EQU	$
		LDA	!AWLAKD,Y
		CMP	PYMODE
		BNE	AWKG0A0
		STZ	<CGBFWK
		BRA	AWKG0C0
AWKG0A0		EQU	$
		DEY
		BPL	AWKG080
;
AWKG0C0		EQU	$
		LDA	<PYCRCH
		CMP	#03H
		BCC	AWKG0E0
		SEC
		SBC	#003H
AWKG0E0		EQU	$
		ASL	A
		ASL	A
		STA	<CGBFWK
;
		LDA	#008H
		ASL	A
		ASL	A
		CLC
		ADC	<CGBFWK
		TAY
		BRA	AWKG200
;
AWKG100		EQU	$
		LDA	#005H
		ASL	A
		ASL	A
		CLC
		ADC	<CGBFWK
		TAY
;
AWKG200		EQU	$
		MEM16
		IDX16
		REP	#00110000B
		TYA
		AND	#00FFH
		TAY
		TXA
		AND	#00FFH
		CLC
		ADC	OMPTFG
		TAX
		LDA	!KGCRDT,Y
		AND	#0CFFFH
		ORA	KGBGUN
		STA	!POAM+2,X
		LDA	!KGCRDT+2,Y
		ORA	KGBGUN
		STA	!POAM+6,X
;
		LDA	<WORK6
		STA	!POAM+0,X
		XBA
		CLC
		ADC	#00800H
		XBA
		STA	!POAM+4,X
		TXA
		LSR	A
		LSR	A
		TAX
		STZ	!POAMSB+0,X
		MEM8
		IDX8
		SEP	#00110000B
		RTS
;
;************************************************************************
;*		player rasen kaidan demo oam set	(RSDMOM)	*
;************************************************************************
RSYHSD		EQU	$
		HEX	000,000,000,001,000,001,001,001,000
RSDMOM		EQU	$
		MEM8
		IDX8
		SEP	#00110000B
		LDX	<PYCRCH
		LDA	PYMODE
		CMP	#NAW0
		BNE	RSOM100
		LDA	!NAWKDT,X
		TAX
RSOM100		EQU	$
		LDA	!RSYHSD,X
		CLC
		ADC	<WORK1
		STA	<WORK1
		MEM16
		IDX16
		REP	#00110000B
		RTS
;
		MEM8
		IDX8
;
;************************************************************************
;*		player x-gamen gai check		(XSRGICK)	*
;************************************************************************
XSRGICK		EQU	$
		MEM16
		REP	#00100000B
		AND	#00FFH
		CMP	#0080H
		BCC	XSRG100
		ORA	#0FF00H
XSRG100		EQU	$
		CLC
		ADC	<PLXPS1
		SEC
		SBC	<SCCH2
		XBA
		AND	#0001H
		STA	!XRHIFG
		MEM8
		SEP	#00100000B
		RTS
;
;
;
;
;
		END
;
;
;
;
