Re: A83: Re: Partial screen draws


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

Re: A83: Re: Partial screen draws




It's been a while since this was sent, but hey, the list is 
stagnating anyway...

Call me a control freak, but I happen to like to know *HOW* this 
works so that I can make my own routine if I need to...  not that I 
don't trust anyone, it's just that old saying, "Give a man a 
fish..., teach a man to fish..."

Also, quick question:  is there any way to do shading in ASM.  So, 
instead of drawing in a box using _ILINE, is there a routine to shade 
in a region quickly instead of drawing it line by line?

On 11 Jan 98 at 14:12, Harper Maddox wrote:

> 
> A routine for this wouldnt be all that difficult.  If you look at
> the .asm file outputted by pic83 you'll notice that the right part
> on the .db 's has mostly 0,0,0's
> 
> here is how a routine would work...
> 
> 
> ; To Use this routine properly you must clip off any 0,0,0's from
> the .db
> 
> ImgCtr = SAVESSCREEN
> ROWS = 2		;  number of bytes across /8    If it is a fraction round
> up... ie.  9/8 =2
> 
> LftImage:
>  ld hl,repback		; location to *grab* data from
>  ld de,plotsscreen	; start of graphbuffer
>  ld bc,ROWS*64	; this is number of times hl needs to be incremented
>  ld a,0			; start ImgCtr at 0 ld (imgctr),a
> ImgLoop1:
>  ld (de),(hl)		; not sure if its legal... if it isnt then do this:  
>  ld
> a,(hl) /  ld (de),a
>  inc hl
>  inc de
>  dec bc
>  ld a,c
>  AND B
>  cp 0
>  ret z			; quit if BC=0
>  ld a,(ImgCtr)
>  inc a
>  ld (ImgCtr),a
>  cp ROWS
>  jr nz,LftImage		; If ImgCtr /= rows goto Lftimage
>  push bc
>  ld b,12-ROWS		; times it will move around the graph buffer
> ImgLoop2:
>  inc de
>  djnz ImgLoop2
>  ld a,0
>  ld (ImgCtr),a
>  jr ImgLoop1
> 
> This should work...
> Reply back if it doesnt.
> -harper

Jonathan Wang

jwang@isb.bj.edu.cn
jonathan_wang@hotmail.com

Come visit my home page:
http://www.htmlinfo.home.ml.org/

Quote of the day:

     None who have always been free can understand the terrible
     fascinating power of the hope of freedom to those who are not free.
                              - Pearl S. Buck: American novelist


References: