############################################################
#  Set up the DM37X's video registers for the Ampire display
############################################################


	video-init 5 16
	
	#DISPC_CONTROL
	w /w 0x48050440 0x00018109
	sleep 10
	#DISPC_SIZE_LCD
	w /w 0x4805047C 0x01df031f
	sleep 10
	#DISPC_GFX_SIZE
	w /w 0x4805048C 0x01df031f
	sleep 10
	#DISPC_TIMING_H
	w /w 0x48050464 0x0000007f
	sleep 10
	#DISPC_TIMING_V
	w /w 0x48050468 0x00000000
	sleep 10
	#DISPC_DIVISOR
	w /w 0x48050470 0x00010003
	sleep 10
	#DISPC_CONFIG
	w /w 0x48050444 0x00000000
	sleep 10
	#DISPC_POL_FREQ
	w /w 0x4805046C 0x00000000
	sleep 10
	#CM_CLKSEL_DSS:  
	w /w 0x48004E40 0x00001009
	sleep 10
	#Assign a name and resolution to the above timing settings
	video-add sonic 800 480

	#*****  Init the display *****#
	video-init sonic 16
	
	video-clear l
	bitmap /lboot/Launching.bmp 284,212 515,268
	bitmap /lboot/CplVersion.bmp 569,424 800,480
	video-on
############################################################
#  Load and exec the bin file 
############################################################


#echo "Loading main CPL boot script...\n"

cpl_start = 2816
cpl_size = 1280

part-add /dev/nand0 b $cpl_start $cpl_size
mount yaffs /dev/nand0b /cpl

video-clear l
video-off
source /cpl/cpl.losh

#echo "\n autoexec.losh:  info part /dev/nand0 \n"
#info part /dev/nand0

# Fin