sh:	equ	75
sw:	equ	100

start:
	bsr	converttarga

	move.w	#0,-(sp)
	move.l	#fname,-(sp)
	move.w	#$3c,-(sp)
	trap	#1
	addq.l	#8,sp
	move.w	d0,handle

	move.l	#b1,-(sp)
	move.l	#15000,-(sp)
	move.w	handle,-(sp)
	move.w	#$40,-(sp)
	trap	#1
	add.l	#12,sp


	move.w	handle,-(sp)
	move.w	#$3e,-(sp)
	trap	#1
	addq.l	#4,sp

	clr.w	-(sp)
	trap	#1



converttarga:
*	move.l	screen1,a1
	lea	baby,a0
	add.l	#18,a0
	lea	b1,a1
	add.l	#15000,a1
	move	#sh,d0
	subq.w	#1,d0
	sub.l	#sw*2,a1
.dsloop:
	rept	sw
	move.b	1(a0),d1
	lsl.w	#8,d1
	lsl.w	#1,d1
	moveq	#0,d2
	move.b	(a0),d2
	move.l	d2,d3
	and.b	#%11100000,d2
	lsl.w	#1,d2
	and.b	#%00011111,d3
	or.b	d3,d2
	or.w	d2,d1

	addq.l	#2,a0
	move.w	d1,(a1)+
*	move.w	d1,(a2)+
	endr
	sub.l	#(sw*2)*2,a1
	dbf	d0,.dsloop
	rts

handle:	dc.w	0
fname:	dc.b	'BAby.raw',0
baby:
	incbin	'babys.tga'
b1:
	ds.b	15000
b2:
