[A83] Re: Shading


[Prev][Next][Index][Thread]

[A83] Re: Shading




lol
used the same label twice =D
>
>
>>>You mean grayscale, right?  Thats (at least in 4-layer grayscale) where
>you
>>>have 4 shades of pixels: white, light gray, dark gray and black.  This is
>>>achievable by switching between to buffers, each one containing a
picture.
>>>You display the first buffer for 1/3 of the time, and the second buffer
>for
>>>2/3 of the time.  So if a pixel is off in both buffers, the pixel on the
>>>screen would be white.  If the pixel is on in the first one but off in
the
>>>second one, the pixel on the screen would be light gray (Since it is on
>for
>>>1/3 of the time but off for 2/3 of the time, you get the effect of it
>being
>>>1/3 the darkness of a black pixel).  If a pixel is off in the first
buffer
>>>but on in the second, it would be dark gray.  If a pixel is on in both
>>>buffers, it would be black.
>>>Thats my explanation, somebody can probably do better =)
>>
>>
>>That's pretty concise, except for this:  You need huge amounts of memory
>to 
>>store extra screens.  If you worte the plotscreen fro one, you still need 
>>another, most likely saferam1, and then a rountine to plot saferam1 to
the 
>>screen, as ionfastcopy only does plotscreen (I think . . .) 
>>
>Well, you would just need two 768 byte buffers to store each "side" of the
>picture.  You could do this easily with plotsscreen and savesscreen (for
>83+).  And as to needing another ionfastcopy routine to display the 2nd
>buffer, all you really need to do is change the pointer for HL that
>ionfastcopy uses i.e. 
>
>
>copy_buf_1:
>	ld	hl,plotsscreen-12-(-(12*64)+1)		; 10
>	jr	fastCopy
>copy_buf_2:
>	ld	hl,savescreen-12-(-(12*64)+1)		; 10
>fastCopy:
>	di
>	ld	a,$80				; 7
>	out	($10),a				; 11
>	ld	a,$20				; 7
>	ld	c,a				; 4
>	inc	hl				; 6 waste
>	dec	hl				; 6 waste
>fastCopyAgain:
>	ld	b,64				; 7
>	inc	c				; 4
>	ld	de,-(12*64)+1			; 10
>	out	($10),a				; 11
>	add	hl,de				; 11
>	ld	de,10				; 10
>fastCopyLoop:
>	add	hl,de				; 11
>	inc	hl				; 6 waste
>	inc	hl				; 6 waste
>	inc	de				; 6
>	ld	a,(hl)				; 7
>	out	($11),a				; 11
>	dec	de				; 6
>	djnz	fastCopyLoop			; 13/8
>	ld	a,c				; 4
>	cp	$2B+1				; 7
>	jr	nz,fastCopyAgain		; 10/1
>	ret					; 10
>
>
>_____________________________________________
>Free email with personality! Over 200 domains!
>http://www.MyOwnEmail.com
>
>
>
>

_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com