#
# MSX SC2 exporter
# A Multipaint internal script
#

XREM "SC2 Header"

XBYTE 254,0,0,255,55,0,0

XREM "Bitmap"

FOR Y=0 TO 23
	FOR X=0 TO 31
		FOR V=0 TO 7
			C=128
			L=0
			FOR B=0 TO 7
				P=V*256
				P=P+B
				M=X*8
				P=P+M
				M=Y*2048
				P=P+M
				P=P+1024
				O=PEEK P
				M=C*O
				L=L+M
				C=C/2
			NEXT B
			XBYTE L
		NEXT V
	NEXT X
NEXT Y

XREM "Order"

FOR I=0 TO 255
	XBYTE I
NEXT I

FOR I=0 TO 255
	XBYTE I
NEXT I

FOR I=0 TO 255
	XBYTE I
NEXT I

XREM "Padding"

FOR I=0 TO 1279
	XBYTE 0
NEXT I

XREM "Attributes"

FOR Y=0 TO 23
	FOR X=0 TO 31
		FOR V=0 TO 7
			P=Y*256
			P=P+X
			P=P+65536
			M=V*32
			P=P+M
			H=PEEK P
			P=P+6144
			L=PEEK P

			M=H*16
			A=M+L

			A=A

			XBYTE A
		NEXT V
	NEXT X
NEXT Y

# Write to file (14343 bytes)

SAVE

