;
;C-64 sprite plexer demo
;Author : Tim Rogers, 1988
;

;defines
maxsp		equ $20					;num sprs to handle
vicbank		equ $01					;vic bank to use 0..3
spb			equ $07f8+vicbank*$4000	;hardware spr def base
rpos		equ $00					;raster irq pos
maxy		equ $ff					;max sprite y-pos

;zero-page locations
stkzp0		equ $02					;holds current stkptr
stkzp1		equ $03					;holds plex stkptr
ptmp		equ $04					;plex tmp
rnd			equ $05					;random no.
as0			equ $06					;irq register storage
xs0			equ $07
ys0			equ $08
as1			equ $09
xs1			equ $0a
ys1			equ $0b
xspeed		equ $0c					;sprite movement control vars
yspeed		equ $0d
xdel		equ $0e
ydel		equ $0f
spx			equ $10					;sprx lo
sph			equ spx+maxsp			;sprx hi
spy			equ sph+maxsp			;spr y
spc			equ spy+maxsp			;spr cols
spd			equ spc+maxsp			;spr defs

			send 3,plexdemo.prg

			org	$0,$07ff				;physical origin in file, logical origin of code

filelogorg	equ *

			;PRG file load address
			dw $0801					;.PRG file load address
	
			;BASIC program data located at $0801 and contains a single line with a SYS call to start the assembly code
			dw nln						;link to next line
			dw 0						;line number
			db $9e						;token for BASIC SYS command
			db ((start/1000)%10)+"0"	;ASCII string parameter for BASIC SYS command (i.e. "2061" which is the address to call)
			db ((start/100)%10)+"0"
			db ((start/10)%10)+"0"
			db (start%10)+"0"
			db 0						;end of line
nln			dw 0						;link to next line (0 = no further lines)

			;Assembly code sits at 2061
start		sei					;irqs off
			ldx #$ff			;init stack ptr
			txs
			lda #$2f			;config cpu to have 64k ram
			ldx #$35
			sta $00
			stx $01
			jsr init			;init sprites
			cli					;irqs on

loop1		bit $d011			;wait for vblank to start
			bmi loop1
loop2		bit $d011			;wait for vblank to end
			bpl loop2
			jsr move			;update sprites
			jmp loop1			;loop forever

;NMI routine
nmi			rti

;Get random-ish number
rand		lda rnd
			adc $d012
			adc $d800
			adc $dc04
			sta rnd
			rts

;Init sprites
init		lda #nmi&255		;set NMI vector
			ldx #nmi/256
			sta $fffa
			stx $fffb
			lda #mirq&255		;set IRQ vector
			ldx #mirq/256
			sta $fffe
			stx $ffff
			lda #$1b			;scn on, 25 rows, vscr=3
			sta $d011
			lda #rpos			;Set raster IRQ line
			sta $d012
			lda #$7f			;disable other IRQs
			sta $dc0d
			lda $dc0d			;ack other IRQs
			ldx #$ff
			stx $d015			;sprites on
			stx $d019			;ack vic IRQs
			stx $d01c			;sprites mcol on
			inx
			stx $d020			;set border colour
			stx $d021			;set background colour
			inx
			stx $d01a			;raster IRQ enable
			stx $d025			;set spr extra col 1
			lda $dd02			;set VIC bank
			ora #$03
			sta $dd02
			lda $dd00
			and #$fc
			ora #3-vicbank
			sta $dd00
	
			ldx #$00
ia			lda #$00			;set colmem to black
			sta $d800,x
			sta $d900,x
			sta $da00,x
			sta $db00,x
			cpx #$80
			bcs ib
			sec					;init stack irq tab
			ror $0100,x
			cpx #maxsp
			bcs ib
			sta spx,x			;init spr x lo, x hi, y
			sta sph,x
			sta spy,x
			txa					;init spr defs
			adc #(spritedata&$3fff)/64
			sta spd,x
			txa					;init spr cols
			lsr a
			lsr a
			lsr a
			tay
			lda cols,y
			ora #$80			;!! IMPORTANT ALL COLOURS MUST HAVE BIT-7 SET !!
			sta spc,x
			txa					;init spr pos table indexs
			asl a
			asl a
			asl a
			sta tabxptrs,x
			sta tabyptrs,x
ib			inx
			bne ia
			dex
			stx xspeed			;init spr movement vars
			stx yspeed
			stx xdel
			stx ydel
			rts

cols		db $02,$05,$06,$07	;spr cols to use

;Move sprites
move		ldx #maxsp-1
ma			lda xspeed			;update spr positions
			clc
			adc tabxptrs,x
			sta tabxptrs,x
			tay
			lda xtabl,y
			sta spx,x
			lda xtabh,y
			sta sph,x
			lda yspeed
			clc
			adc tabyptrs,x
			sta tabyptrs,x
			tay
			lda ytab,y
			sta spy,x
			dex
			bpl ma

			dec xdel
			bne mb
			jsr rand			;set new spr x speed
			sta xdel
			jsr getspeed
			sta xspeed
	
mb			dec ydel
			bne mc
			jsr rand			;set new spr y speed
			sta ydel
			jsr getspeed
			sta yspeed
mc			rts

;get random speed
getspeed	jsr rand
			and #$07
			tax
			lda speeds,x
			rts

speeds		db -4,-3,-2,-1,1,2,3,4	;speeds to use

tabxptrs	ds maxsp,0				;spr x pos tab indexes
tabyptrs	ds maxsp,0				;spr y pos tab indexes

;
;the plexer
;
mirq		sta as0					;main irq
			stx xs0
			sty ys0
			dec $d019				;clear raster irq
			jsr maketab
			ldy ys0
			ldx xs0
			lda as0
			rti

maketab		tsx						;build irq tab
			stx stkzp0				;save current stkptr
			ldx #maxsp
ba			lda spy-1,x				;get spr y-pos
			beq bc					;0=unused
			lsr a					;/2 for 128 byte irqtab
			tay
zz			lda $0100,y				;put spr index into irq tab if possible
			bmi bb
			dey
			lda $0100,y
			bmi bb
			dey
			lda $0100,y
			bmi bb
			dey
			lda $0100,y
			bmi bb
			dey
			lda $0100,y
			bmi bb
			dey
			lda $0100,y
			bmi bb
			dey
			lda $0100,y
			bmi bb
			dey
			lda $0100,y
			bpl bc
bb			txa						;got in so store index
			sta $0100,y
bc			dex						;not in
			bne ba					;loop for all sprs
			stx $0100+maxy/2		;set end of irqtab
			dex
			txs						;restore stkptr to start of irqtab
			ldy #$07				;put on 1st 8 sprs
bd			pla						;get index
			bmi bd
			beq bf					;exit if at end of irqtab
			sty ptmp				;save y
			tax						;x=index
			tya						;y=y*2
			asl a
			tay
			lda spx-1,x				;set sprx-lo
			sta $d000,y
			lda spy-1,x				;y
			sta $d001,y
			ldy ptmp				;restore y
			lda spd-1,x				;def
			sta spb,y
			lda sph-1,x				;msb
			lsr a
			rol $d010
			lda spc-1,x				;col
			sta $d027,y
			pha						;delete spr from irqtab
			pla
			dey
			bpl bd
			lda #pirq&255			;more than 8 sprs to do
			ldx #pirq/256			;so set plex irq
			sta $fffe
			stx $ffff
			jmp pi0					;& enter plexer

bf			tya						;less than 8 sprs to do
			asl a
			tay
bg			sta $d001,y				;so clear remaining sprs
			asl $d010				;msb too
			dey
			dey
			bpl bg
			jmp exit				;& exit routine

pirq		sta as1					;sprite plex irq
			stx xs1
			sty ys1
			dec $d019				;clear raster irq
			jsr plex
			ldy ys1
			ldx xs1
			lda as1
			rti

plex		tsx						;plex sprites
			stx stkzp0				;save current stkptr
			ldx stkzp1				;restore irqtab stkptr
			txs
			
pa0			pla						;find next index
			bmi pa0
			beq pb1					;exit if at end of irqtab
			tax
			clc
pa1			lda $d012				;get current raster-21 in y
			sbc #$14
			tay
			cpy $d00f				;spr in use?
			bcc pb2					;yes, try next sprite down
			lda spy-1,x				;no, use it - set spr y-pos
			sta $d00f
			lda spx-1,x				;set spr x-pos lo
			sta $d00e
			lda spd-1,x				;set spr def
			sta spb+7
			lda sph-1,x				;set spr msb
			beq pa2
			lda #$80
			ora $d010
			bne pa3
pa2			lda #$7f
			and $d010
pa3			sta $d010
			lda spc-1,x				;!! set spr col - must have bit-7 set
			sta $d02e
			pha						;set bit-7 to delete spr from irqtab
			pla
			iny						;inc raster count as work just done

pb0			pla						;same for remaining sprites
			bmi pb0
pb1			beq pc1
			tax
pb2			cpy $d00d
			bcc pc2
			lda spy-1,x
			sta $d00d
			lda spx-1,x
			sta $d00c
			lda spd-1,x
			sta spb+6
			lda sph-1,x
			beq pb3
			lda #$40
			ora $d010
			bne pb4
pb3			lda #$bf
			and $d010
pb4			sta $d010
			lda spc-1,x
			sta $d02d
			pha
			pla
			iny

pc0			pla
			bmi pc0
pc1			beq pd1
			tax
pc2			cpy $d00b
			bcc pd2
			lda spy-1,x
			sta $d00b
			lda spx-1,x
			sta $d00a
			lda spd-1,x
			sta spb+5
			lda sph-1,x
			beq pc3
			lda #$20
			ora $d010
			bne pc4
pc3			lda #$df
			and $d010
pc4			sta $d010
			lda spc-1,x
			sta $d02c
			pha
			pla
			iny

pd0			pla
			bmi pd0
pd1			beq pe1
			tax
pd2			cpy $d009
			bcc pe2
			lda spy-1,x
			sta $d009
			lda spx-1,x
			sta $d008
			lda spd-1,x
			sta spb+4
			lda sph-1,x
			beq pd3
			lda #$10
			ora $d010
			bne pd4
pd3			lda #$ef
			and $d010
pd4			sta $d010
			lda spc-1,x
			sta $d02b
			pha
			pla
			iny

pe0			pla
			bmi pe0
pe1			beq pf1
			tax
pe2			cpy $d007
			bcc pf2
			lda spy-1,x
			sta $d007
			lda spx-1,x
			sta $d006
			lda spd-1,x
			sta spb+3
			lda sph-1,x
			beq pe3
			lda #$08
			ora $d010
			bne pe4
pe3			lda #$f7
			and $d010
pe4			sta $d010
			lda spc-1,x
			sta $d02a
			pha
			pla
			iny

pf0			pla
			bmi pf0
pf1			beq pg1
			tax
pf2			cpy $d005
			bcc pg2
			lda spy-1,x
			sta $d005
			lda spx-1,x
			sta $d004
			lda spd-1,x
			sta spb+2
			lda sph-1,x
			beq pf3
			lda #$04
			ora $d010
			bne pf4
pf3			lda #$fb
			and $d010
pf4			sta $d010
			lda spc-1,x
			sta $d029
			pha
			pla
			iny

pg0			pla
			bmi pg0
pg1			beq ph1
			tax
pg2			cpy $d003
			bcc ph2
			lda spy-1,x
			sta $d003
			lda spx-1,x
			sta $d002
			lda spd-1,x
			sta spb+1
			lda sph-1,x
			beq pg3
			lda #$02
			ora $d010
			bne pg4
pg3			lda #$fd
			and $d010
pg4			sta $d010
			lda spc-1,x
			sta $d028
			pha
			pla
			iny

ph0			pla
			bmi ph0
ph1			beq pend
			tax
ph2			cpy $d001
			bcc pi1					;can't display sprite
			lda spy-1,x
			sta $d001
			lda spx-1,x
			sta $d000
			lda spd-1,x
			sta spb
			lda sph-1,x
			beq ph3
			lda #$01
			ora $d010
			bne ph4
ph3			lda #$fe
			and $d010
ph4			sta $d010
			lda spc-1,x
			sta $d027
			pha
			pla

pi0			pla						;get next index
			bmi pi0
			beq pend				;exit if at end of irqtab
			tax
pi1			lda #$ff				;delete index from irqtab
			pha
			pla
			stx ptmp				;save x
			tsx						;get irqtab stkptr in a
			txa
			ldx ptmp				;restore x
			asl a					;*2
			sbc #$02
			cmp $d012				;raster at this pos already?
			bcc pi0					;past it - skip sprite
			bne nirq
pi2			lda $d012				;too near for irq so try to display this sprite?
			adc #$00
			cmp spy-1,x
			bcs pi0					;no - spr not displayed
			jmp pa1					;yes

pend		lda #mirq&255			;end of plexing
			ldx #mirq/256			;set main irq vec
			sta $fffe
			stx $ffff
			lda #rpos				;set raster irq pos
			sta $d012
			bpl exit

nirq		sta $d012				;distance to nxt spr enough for irq
			txa						;index back to irqtab
			pha
			tsx						;save irqtab stkptr
			stx stkzp1
exit		ldx stkzp0				;restore current stkptr
			txs
			rts						;exit plexer


;sprite pos tables
xtabl
 hex 403F3F3F3F3E3E3D3D3C3B3A39383736343331302E2C2A29272522201E1C1917
 hex 14120F0C09070401FEFBF8F4F1EEEBE7E4E1DDDAD6D3CFCCC8C5C1BEBAB6B3AF
 hex ACA8A4A19D9996928F8B8884817D7A7673706C6966635F5C595653504E4B4845
 hex 43403E3B39373532302E2D2B292726242321201F1E1D1C1B1A1A191918181818
 hex 181818181819191A1A1B1C1D1E1F202123242627292B2D2E30323537393B3E40
 hex 4345484B4E505356595C5F6366696C7073767A7D8184888B8F9296999DA1A4A8
 hex ABAFB3B6BABEC1C5C8CCCFD3D6DADDE1E4E7EBEEF1F4F8FBFE010407090C0F12
 hex 1417191C1E20222527292A2C2E30313334363738393A3B3C3D3D3E3E3F3F3F3F

xtabh
 hex 0101010101010101010101010101010101010101010101010101010101010101
 hex 0101010101010101000000000000000000000000000000000000000000000000
 hex 0000000000000000000000000000000000000000000000000000000000000000
 hex 0000000000000000000000000000000000000000000000000000000000000000
 hex 0000000000000000000000000000000000000000000000000000000000000000
 hex 0000000000000000000000000000000000000000000000000000000000000000
 hex 0000000000000000000000000000000000000000000000000001010101010101
 hex 0101010101010101010101010101010101010101010101010101010101010101

ytab
 hex 8B8D8F929496989A9C9FA1A3A5A7A9ABADAFB1B3B5B7B9BBBDBFC0C2C4C5C7C9
 hex CACCCDCFD0D2D3D4D5D7D8D9DADBDCDDDEDFDFE0E1E1E2E2E3E3E4E4E4E4E4E4
 hex E5E4E4E4E4E4E4E3E3E2E2E1E1E0DFDFDEDDDCDBDAD9D8D7D5D4D3D2D0CFCDCC
 hex CAC9C7C5C4C2C0BFBDBBB9B7B5B3B1AFADABA9A7A5A3A19F9C9A989694928F8D
 hex 8B89878482807E7C7A777573716F6D6B69676563615F5D5B5957565452514F4D
 hex 4C4A494746444342413F3E3D3C3B3A3938373736353534343333323232323232
 hex 3232323232323233333434353536373738393A3B3C3D3E3F414243444647494A
 hex 4C4D4F5152545657595B5D5F61636567696B6D6F717375777A7C7E8082848789

	org $4800-filelogorg,$4800

spritedata	;sprite font
	hex 000800002D0000BF4000BF4000BF4002
	hex FFD002FFD002FFD002FFD002F7D00BD2
	hex F40BD2F40BD2F40BD2F40BD2F42FFAFD
	hex 2FFFFD2FFFFD2F55BD2F40BD3540D5A6
	hex 2AAA002FFF402FFFD02FFFD02F56F42F
	hex 40B42F40B42F42F42FEBD02FFFD02FFF
	hex 402FFFD02F57D02F42F42F40B42F40B4
	hex 2F42F42FEBD02FFFD02FFF4035550006
	hex 02AAA00BFFF40BFFFD2FFFFD2FD57D2F
	hex 402D2F402D2F40352F40002F40002F40
	hex 002F40002F40002F402B2F402D2F402D
	hex 2FEABD2FFFFD0BFFFD0BFFF402555006
	hex 2A80002FEA002FFF802FFFD02FFFF42F
	hex 5FF42F47FD2F41BD2F40BD2F40BD2F40
	hex BD2F40BD2F40BD2F40BD2F42FD2F4BFD
	hex 2FEFF42FFFF42FFFD02FF540355000A6
	hex 2AAAAB2FFFFD2FFFFD2FFFFD2FFFFD2F
	hex 55552F40002F40002FEB002FFD002FFD
	hex 002FFD002F55002F40002F40002FEAAB
	hex 2FFFFD2FFFFD2FFFFD2FFFFD35555546
	hex 2AAAAB2FFFFD2FFFFD2FFFFD2FFFFD2F
	hex 55552F40002F40002FEB002FFD002FFD
	hex 002FFD002F55002F40002F40002F4000
	hex 2F40002F40002F40002F4000354000E6
	hex 00AA8002FFD00BFFF40BFFF42FD7FD2F
	hex 42FD2F40952F40002F40002F4AAB2F4B
	hex FD2F4BFD2F4BFD2F49FD2F40BD2F82FD
	hex 2FEBFD0BFFF40BFFF402FFD0005540F6
	hex 2AC0AB2F40BD2F40BD2F40BD2F40BD2F
	hex 40BD2F40BD2F40BD2FEABD2FFFFD2FFF
	hex FD2FFFFD2F55FD2F40BD2F40BD2F40BD
	hex 2F40BD2F40BD2F40BD2F40BD3540D5F6
	hex 2AAAAC2FFFF42FFFF42FFFF42FFFF435
	hex FD5400BD0000BD0000BD0000BD0000BD
	hex 0000BD0000BD0000BD0000BD002ABFAC
	hex 2FFFF42FFFF42FFFF42FFFF4355554F6
	hex 2AAAAC2FFFF42FFFF42FFFF42FFFF435
	hex 57F40002F40002F40002F40002F40002
	hex F40002F42AC2F42F42F42F42F42F42F4
	hex 2FEBF40BFFD00BFFD002FF40005500F6
	hex 2AC0AC2F42F42F42F42F4BF42F4BF42F
	hex EFF42FFFD02FFFD02FFF402FFF402FFD
	hex 002FFF402FFF402FFFD02FFFD02FEFF4
	hex 2F4BF42F4BF42F42F42F42F435405496
	hex 2AC0002F40002F40002F40002F40002F
	hex 40002F40002F40002F40002F40002F40
	hex 002F40002F40002F400B2F402D2F40BD
	hex 2FEAFD2FFFFD2FFFFD2FFFFD355555A6
	hex 2AC0AB2F40BD2FD2FD2FD2FD2FFBFD2F
	hex FFFD2FFFFD2FFFFD2F7FFD2F6EBD2F48
	hex BD2F40BD2F40BD2F40BD2F40BD2F40BD
	hex 2F40BD2F40BD2F40BD2F40BD3540D5F6
	hex 2A80AB2FD0BD2FD0BD2FD0BD2FF4BD2F
	hex F4BD2FF4BD2FFDBD2FFDBD2F7DBD2F7F
	hex BD2F6FFD2F4BFD2F4BFD2F4BFD2F42FD
	hex 2F42FD2F42FD2F40BD2F40BD3540D5F6
	hex 00AA8002FFD002FFD00BFFF40BFBF40B
	hex D2F42FD2FD2FD2FD2F40BD2F40BD2F40
	hex BD2F40BD2F40BD2FD2FD2FD2FD0BD2F4
	hex 0BFBF40BFFF402FFD002FFD0005540F6
	hex 2AAA802FFFD02FFFF42FFFF42F57FD2F
	hex 42FD2F40BD2F40BD2F40BD2F42FD2FAB
	hex F42FFFF42FFFD02FFF402F55002F4000
	hex 2F40002F40002F40002F4000354000F6
	hex 00AA8002FFD002FFD00BFFF40BFBF40B
	hex D2F42FD2FD2FD2FD2F40BD2F40BD2F40
	hex BD2F40BD2F40BD2FD27D2FD2DD0BDAF4
	hex 0BFBFD0BFEFD02FEFD02FFBD005515F6
	hex 2AAA802FFFD02FFFF42FFFF42F57FD2F
	hex 42FD2F40BD2F40BD2F40BD2F42FD2FAB
	hex F42FFFF42FFFD02FFF402FFF402FFFD0
	hex 2F6FF42F4BFD2F42FD2F40BD354015F6
	hex 00AA8002FFE40BFFFD0BFFFD2FF5F42F
	hex D0502FD0002FD0002FFA000BFF800BFF
	hex E002FFF40057FD0002FD0002FD0002FD
	hex 0AABF42FFFF42FFFD00BFF4001550006
	hex 2AAAAC2FFFF42FFFF42FFFF42FFFF42F
	hex FFF435FD5400BD0000BD0000BD0000BD
	hex 0000BD0000BD0000BD0000BD0000BD00
	hex 00BD0000BD0000BD0000BD0000D50006
	hex 2AC0AB2F40BD2F40BD2F40BD2F40BD2F
	hex 40BD2F40BD2F40BD2F40BD2F40BD2F40
	hex BD2F40BD2F40BD2F40BD2F40BD2FEAFD
	hex 2FFFFD2FFFFD2FFFFD0BFFF401555006
	hex 2AC0AB2F40BD2F40BD2F40BD2FD2FD0B
	hex D2F40BD2F40BD2F40BF7F40BF7F402FF
	hex D002FFD002FFD002FFD002FFD000BF40
	hex 00BF4000BF40002D00002D0000040006
	hex 2AC0AB2F40BD2F40BD2F40BD2F40BD2F
	hex 40BD2F40BD2F40BD2F40BD2F40BD2F48
	hex BD2F6EBD2F7FBD2FFFFD2FFFFD2FFFFD
	hex 2FF7FD2FD2FD2FD2FD2F40BD3540D506
	hex 2A002B2F40BD2F40BD2FD2FD2FD2FD2F
	hex FBFD0BFFF40BFFF402FFD002FFD000FF
	hex 4002FFD002FFD00BFFF40BFFF42FFBFD
	hex 2FD2FD2FD2FD2F40BD2F40BD35001506
	hex 2AC0AB2F40BD2F40BD2F40BD2F40BD2F
	hex 40BD2FEABD2FFFFD2FFFFD2FFFFD2FFF
	hex FD3555FD0000BD0000BD0000BD2AAABD
	hex 2FFFFD2FFFFD2FFFFD2FFFFD35555506
	hex 2AAAAB2FFFFD2FFFFD2FFFFD2FFFFD35
	hex 5FFD000BF4002FF4002FD000BFD000BF
	hex 4002FF4002FD000BFD000BF4002FFEAB
	hex 2FFFFD2FFFFD2FFFFD2FFFFD35555506
	hex 02AA800BFFD02FFFF42FFFF4BFD7FDBF
	hex 42FDBF42FDBF42FDBF42FDBF42FDBF42
	hex FDBF42FDBF42FDBF42FDBF42FDBF42FD
	hex BFEBFD2FFFF42FFFF40BFFD001554006
	hex 02AB0002FD0002FD0002FD0002FD0002
	hex FD0002FD0002FD0002FD0002FD0002FD
	hex 0002FD0002FD0002FD0002FD0002FD00
	hex 02FD0002FD0002FD0002FD0003550006
	hex 02AA800BFFD02FFFF42FFFF4BFD7FDBF
	hex 42FDBF42FDBF42FDD542F4000BF4002F
	hex D000BF4002FD000BF4002FD000BF4000
	hex BFAAABBFFFFDBFFFFDBFFFFDD5555506
	hex 02AA800BFFD02FFFF42FFFF4BFD7FDBF
	hex 42FDBF42FDBF42FDD542F4000BF4002F
	hex D0000BF4AAC2F4BF42FDBF42FDBF42FD
	hex BFEBFD2FFFF42FFFF40BFFD001554006
	hex 02AC000BF4000BF4000BF4002FD0002F
	hex D0002FD0002FDAB0BF6FD0BF6FD0BF6F
	hex D0BF6FF4BFFFFDBFFFFDBFFFFDD57FF4
	hex 002FD0002FD0002FD0002FD000355006
	hex AAAAABBFFFFDBFFFFDBFFFFDBF5555BF
	hex 4000BFAA80BFFFD0BFFFF4BFFFF4D557
	hex FD0002FD0002FDAAC2FDBF42FDBF42FD
	hex BFEBFD2FFFF42FFFF40BFFD001554006
	hex 000AB0002FD0002FD000BF4000BF4002
	hex FD0002FD000BFF400BFFD02FFFF42FD7
	hex F4BF42FDBF42FDBF42FDBF42FDBF42FD
	hex BFEBFD2FFFF42FFFF40BFFD001554006
	hex AAAAABBFFFFDBFFFFDBFFFFDD55FFD00
	hex 0BF4000BF4002FD0002FD0002FD000BF
	hex 4000BF4000BF4000BF4000BF4000BF40
	hex 00BF4000BF4000BF4000BF4000D54006
	hex 02AA800BFFD02FFFF42FFFF4BFD7FDBF
	hex 42FDBF42FDBF42FD2FEBF42FFFF40BFF
	hex D02FFFF42FD7F4BF42FDBF42FDBF42FD
	hex BFEBFD2FFFF42FFFF40BFFD001554006
	hex 02AA800BFFD02FFFF42FFFF4BFD7FDBF
	hex 42FDBF42FDBF42FDBF42FDBF42FD2FEB
	hex F42FFFF40BFFD002FFD000BF4000BF40
	hex 02FD0002FD000BF4000BF4000D5000A6
	hex 00000000000000000000000000000000
	hex 00000000000000000000000000000000
	hex 0000000000000000280000BD0002FF40
	hex 02FF4002FF4002FF4000BD00001400A6
	hex 02AA800BFFD02FFFF42FFFF4BF55FDBD
	hex FFBDB7FFEDB7FFEDB7EBEDB7EEBDB7EF
	hex FDB7ED7DB7D7EDB7FFEDB7FFEDBDFFBD
	hex BFAAFD2FFFF42FFFF40BFFD0015540F6
