;****************************************************************************
;*		Buffer for mario-kart					    *
;*					     1992.05.31			    *
;****************************************************************************
enemy_table	equ	00690h		;80h
Enemy_accel_table	equ	enemy_table+000h
Enemy_velocity_table	equ	enemy_table+020h
Enemy_steering_table	equ	enemy_table+040h
player01_table	equ	00710h		;58h
player02_table	equ	00768h		;58h
accel_address	equ	00000h
resist_address	equ	00020h
steering_address equ	00040h
;							AMARI 50h(7b0-800)
gear_address	equ	00048h		;for enemy only
;drive address
maximum_steering	equ	0000h
fast_steering		equ	0002h
middle_steering		equ	0004h
slow_steering		equ	0006h
;----------------------------------------------------------------------------
sprite_buffer	equ	0200h		;0-1ffh
;
sub_buffer	equ	0400h		;0-1fh
;
screen1_buffer	equ	0200h		;0200h-03ffh(200h)
screen1_main	equ	screen1_buffer
screen2_buffer	equ	0420h		;0420h-061fh(200h)
screen2_main	equ	screen2_buffer
screen1_sub	equ	0400h		;0400h-041fh(020h)
screen2_sub	equ	0620h		;0620h-063fh(020h)
;----------------------------------------------------------------------------
hdma_buffer	equ	0640h		;HDA A parameter
HDMA_A_param	equ	0640h		;    B
HDMA_B_param	equ	064dh		;    C
HDMA_C_param	equ	065ah		;    D
HDMA_D_param	equ	0667h		;		 end 667h
mode_change_buffer equ	0674h		;HDA mode change
through_screen_buffer equ 067dh		;HDMA through screen change
					;	686 to 68fh (0ah)=free!!!!
;----------------------------------------------------------------------------
target_status	equ	0800h		;driving status(speed ot etc.)
target_direction equ	0801h		;from target to next target
					;driving target x&y
target_bufferX	equ	0900h	
target_bufferY	equ	0a00h	
bg_check_table	equ	0b00h		;0b00h-0bffh(100h)
;----------------------------------------------------------------------------
color_buffer    equ     7e3a80h		;(0200h)
;----------------------------------------------------------------------------
realtime_buffer	 equ	07e3c80h		;7e4000h-380h
realtime_bufferA equ	realtime_buffer+000h	;realtime pers data
realtime_bufferB equ	realtime_buffer+0e0h	;realtime pers data
realtime_bufferC equ	realtime_buffer+1c0h	;realtime pers data
realtime_bufferD equ	realtime_buffer+2a0h	;realtime pers data
;----------------------------------------------------------------------------
smoke_obj	equ	7f6c00h			;(400h)
;----------------------------------------------------------------------------
item_obj	equ	7f8000h			;(OBJ 0a0h*020h=01000h)
;----------------------------------------------------------------------------
mark_obj	equ	7fc000h
mark_obj_2	equ	7fc800h
;7fc800h-7c2fffh--------mark open area>>>>>>use initial blank only
;----------------------------------------------------------------------------
lost_obj	equ	7fc800h			;(400h)
;----------------------------------------------------------------------------
perapera_obj	equ	7fcc00h			;(400h)
;----------------------------------------------------------------------------
killer_obj	equ	7fd580h
;----------------------------------------------------------------------------
;			7f9400h--7f9480h	(free)
;----------------------------------------------------------------------------
;****************************************************************************
;for player's mortion control	from 1000h---17ffh 
;				cont n=1000h+100n
;****************************************************************************
obj_flag	equ	010h	;low
kart_flag	equ	obj_flag
;obj_character	equ	012h
driver_number	equ	012h
					;character number
obj_attribute equ	014h
				;high	obj plet data
				;low
				;	OAM base address
obj_pos_xl	equ	016h
obj_pos_xh	equ	018h
obj_pos_yl	equ	01ah
obj_pos_yh	equ	01ch
obj_pos_zl	equ	01eh
obj_pos_zh	equ	020h
;
obj_velocity_x	equ	022h	
obj_velocity_y	equ	024h
obj_velocity_z	equ	026h
;
screenAH	equ	02ch
screenAV	equ	02eh
screenAP	equ	030h
screenBH	equ	032h
screenBV	equ	034h
screenBP	equ	036h
;----------------------------------------------------------------------------
mu_level	equ	028h		;level 00=grip
					;level 01=circuit road
					;level 02=sand road
					;level 03=dart road
					;level 04=ice road
					;level 05=slip status
					;level 06=drift button on
kart_area	equ	0c0h
kart_lap	equ	0c1h
old_area	equ	0dch		;1 frame pre set
;
engine_power	equ	0c2h		
;
kart_control	equ	0c4h		;kart control bit
					;like button status
engine_control	equ	kart_control	;before start
;
tire_timer	equ	0c6h
;
drive_status	equ	0c8h		
					;for enemy
					;00h=nomal mode
					;02h=kattobi mode
					;04h=waiting mode
kart_counter	equ	0cah		;kart conter for various use
					;falling animation
d_dash_counter	equ	0cah		
					;for drift dash counter!!!
mark_pos_x	equ	0cch		;force to back (position X)
mark_pos_y	equ	0ceh		;    ;
mark_direction	equ	0d0h
;
driver_point	equ	0f0h		;each driver's points
driver_time	equ	0f2h		;+00h=decimal timer
					;+02h=second timer
					;+04h=minute timer (0f2h--0f7h)
steering_level	equ	0deh		;level 01=nomal
;(for only my kart)			;      02=drift button
driver_priority equ	0dah		
;(for only enemy)
choropoo_timer	equ	0dah
;(for only my kart)
choropoo_counter equ	0feh
lap_counter	equ	0f8h		;lap count data
					;same as kart lap(00c1h)
					;but this buffer never decrece!!!
;
special_trigger	equ	0e0h		;special effect trigger
kart_status	equ	0e2h		;kart various status
					;b15=jump    flag
					;b14=spin flag
					;b13=spin direction
					;
					;b07=dash flag
					;b06=dash status(0=inc 1=dec)
spin_counter	equ	0e4h		;spin count(0-ffff)
rank_number	equ	0e6h		;rank data 01,02,03.....07,08
control_index	equ	0d2h		;00h=controller1 02h= ; 2
;					;0ffffh=non controller
official_control equ	0d4h
limmit_velocity	equ	0d6h		;max velo+coin effect
;----------------------------------------------------------------------------
event_index	equ	0a0h		;00h=nomal
					;02h=nomal jump
					;04h=falling (obake)
					;06h=falling (maguma)
					;08h=falling(water)
					;0ah=out of barns
					;0ch=move by force
					;0eh=kart lift down
move_direction	equ	0a2h
kart_direction	equ	0a4h		;use for player kart(camera)
					;use for enemy (target direction)
body_direction	equ	2ah
;----------------------------------------------------------------------------
drift_index	equ	0a6h
					;00h grip status
					;02h&04h--------drift level 01
					;06h&08h--------drift level 02
					;0ah&0ch--------drift level 03
					;0eh&10h--------spin 
					;12h&14h--------drift dash 
;********				;16h------------after crash status
					;18h------------spin jump
					;1ah------------spin crash
					;1ch------------corect drift
					;20h
drift_angle	equ	0a8h
drift_pose	equ	0aah
drift_counter	equ	0fah		;drift start counter(for mycart)
point_direction	equ	0fah		;target direction(for enemy)
dash_counter	 equ	0fch		;super dash counter  
;----------------------------------------------------------------------------
move_status	equ	0ach
					;00h nomall
					;02h jump status.........dummy
					;04h=falling (obake).....dont mode
					;06h=falling (maguma)........;
					;08h=falling(water)..........;
					;0ah=out of barns............;
					;0ch=move by force...........;
					;0eh=kart lift down..........;
					;10h=super dash
					;12h=ultra stutus
					;14h=spin status
 					;16h=after crash status
					;18h=drift dash
bg_data		equ	0aeh		;current position's sc data
resist_status	equ	0b0h		;00....0e=on resist 0ffh=nomal area
;----------------------------------------------------------------------------
vector_velocity	equ	0eah
vector_velocity_h equ	0eah
vector_velocity_l equ	0e8h
acceleration_l	equ	0ech
acceleration_h	equ	0eeh
;
steering_angle	equ	0b2h
max_velocity	equ	0b4h
max_steering	equ	0beh		
;----------------------------------------------------------------------------
vram_addressA	equ	0b6h		;obj trans vram data
vram_addressB	equ	0b8h		;obj trans vram data
;----------------------------------------------------------------------------
obj_paternA	equ	30h
					;obj rom address patern number
obj_old_paternA equ	0bah
					;pre obj patern
obj_paternB	equ	36h
					;obj rom address patern number
obj_old_paternB equ	0bch
					;pre obj patern
;---yajima--------------------------------------------------------------------
choropoo_flag	equ	60h
one_up_flag	equ	64h		;ffff=one up!!!
perapera_flag	equ	70h		;00=nomal 02=perapera
urtra_counter	equ	86h		;urtra status counter
thunder_timer	equ	84h
behind_distance equ	90h
foward_distance	equ	92h
behind_index	equ	94h
foward_index	equ	96h
;
;---yamamoto-----------------------------------------------------------------
Player_rank_flag	equ	190eh		;00 rank=1,2 or 3
						;01     =4,5,6,7 or 8
;*****************************************************************************
pers_buffer	equ	07e4000h	;pers data buffer
					; 7e4000h-7fffffh
;
screen_buffer	equ	07f0000h	;screen data buffer
					; 7f0000h-7f3fffh
;
drive_direction equ	07f4000h	;didection to target 
area_buffer	equ	07f5000h	;cource area data buffer
					; 7fd000h-7fdfffh
key_buffer	equ	07f6000h
;
direc_buffer	equ	07f9000h	;direction data
					; 7e3000h-7e3fffh
;
;-----------------------------------------------------------------------------
