
	;this version use flash as gfx source and is not bootable from sdcard	
	
; rom
;
;	$0000 0000	old
;	$0001 7f68	font colored	length $0000 2f00 words
;	$0001 ae68	bobs 		length $0001 6000 words / total 0x0004 5000 words
;

; sdram
;
;	$0000 0000 	frame buffer 0
;	$0001 4a78	frame buffer 1
;	$0002 94f0	rom mirror (star at $0001 7f68)  font colored
;	$0002 c3f0	rom mirror bobs
;
	
	nop
		
	;copy flash to sram (flash start at 196304 ($0002 fed0))
		
	movei	r0,$68	;source 
	movei	r1,$01
	moveih	r0,$7f
	moveih	r1,$e0	;p(0,0) = e001 7f68
		
	movei	r2,$f0	;destination 
	movei	r3,$02
	moveih	r2,$94
	moveih	r3,$d0	;p(0,0) = d002 94f0 ((360+16)*225*2) (2 frambuffers)
	
	movei	r5,extCopy8
	nop
	moveih	r5,>extCopy8
	
	gpci	r7,2	;next 4 + X
	jmpi	r5,0
	movei	r4,$ff	;delay slot (copy 0x22800 words -> $89ff+1 longs)	
	nop		;delay slot
	moveih	r4,$89	;delay slot
	nop		;delay slot
	
;***********************************************************************
;* real code
;***********************************************************************
	
	.incdir	"F:\git\goldmomo_endlos\assembler_files\ucore\"
	.include "spacePilot_core.s"