Re: A83: Fading routine
[Prev][Next][Index][Thread]
Re: A83: Fading routine
This routine included loads a picture to the graph buffer and
then fade it from black to normal, it could easily be changed to fade
some other way.
/Stefan
On Tue, 26 Jan 1999 BJTkid@aol.com wrote:
>
> hello, I am making my first assembly game and I was wondering if it was
> possible to change the contrast on the screen smoothly down and up, so I could
> have smooth transitions in between screens, I have tried several things and I
> was wondering if anyone could tell me how...
>
> -Learning Beginner
>
>
;undocumented ram adress stores current contrast
;value needs to be modified like this
; add a,18h
; or C0h
curcont EQU 8008h
;documented ports
lcdinstport EQU 10h
;documented romcalls
_lcd_busy EQU 4066h
_GRBUFCPY_V EQU 5164h
ld a,FFh ;a value that'll make the display dark
call _lcd_busy
out (lcdinstport),a
ld hl,pic
ld de,PLOTSSCREEN
ld bc,YOUR PICTURE
ldir
call _GRBUFCPY_V
ld a,(curcont)
add a,18h
or 0C0h
ld b,a
ld a,FFh
fadeloop:
cp b
jr z,CONTINUE
dec a
call _lcd_busy
out (lcdinstport),a
push af
push bc
call _GRBUFCPY_V
call _GRBUFCPY_V
call _GRBUFCPY_V ;Only delays, on needed
call _GRBUFCPY_V
call _GRBUFCPY_V
pop bc
pop af
jr fadeloop
References: