;%111RRRR0 111LLLL0 ;#de..#fe

chmap_4x4=chmap_old
chdata_4x4=chdata_old

chmap_4x4_nl=chmap_4x4&#ff00+#7c ;#de7c ;6 bytes

c2p
c2p_4x4
;make c2p stack
;for drawing from top
	ld (c2p_4x4_sp),sp
	ld hl,chmap_4x4_nl
__=chmap_4x4+chmwid
	dup chmhgt-1
	ld (__),hl
	inc h
__=__+#100
	edup
	org $-1
	ld hl,c2p_4x4_q
	ld (__),hl
;jump to c2p
	ld bc,#00ff
	ld de,#55aa
	if C2PMIRROR
	ld l,0+(scrtop+(chmwid/2)-1)&#ff
	else
	ld l,scrtop&#ff
	endif
	ld a,scrtop/256
	ld sp,chmap_4x4
	ret
c2p_4x4_q
c2p_4x4_sp=$+1
	ld sp,0
	ret

	include "c2p_singlebyte_cls.asm"
