Re: A86: grayscale


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

Re: A86: grayscale




In a message dated 4/6/00 8:20:33 PM Eastern Daylight Time, Cybeross@aol.com 
writes:

>     I am making a program that uses grayscale, and I am using Dux Gregis's 
>  grayscale routine. Does anyone have any idea why GET_KEY won't work if you 
>  are using grayscale? Also can anyone recommend a good grayscale routine 
that 
> 
>  won't have this problem?

In order to have _getcsc (the 86 alias for GET_KEY) work, a grayscale routine 
must finish by running the regular interrupt.  Here's a great im 2 grayscale 
routine from diamonds (originally from bomberbloke) which not only allows 
_getcsc but also fixes down-left:

screen_dark = $fc00
screen_light = $f800  ;or wherever you want

int_start:
    exx
    ex af,af'
    in a,(3)
    bit 3,a
    jr z,no_down_left_bug
    and %11111110
    out (3),a
no_down_left_bug:
    bit 1,a
    jr z,no_swap
    ld hl,grayscale_counter
    inc (hl)
    ld a,(hl)
    cp 3
    ld a,(screen_dark/256)-$80
    jr c,set_video_port
    ld a,(screen_light/256)-$80
    ld (hl),0
set_video_port:
    out (0),a
no_swap:
    jp $3a
int_end:

grayscale_counter: .db 0



----
Jonah Cohen
<ComAsYuAre@aol.com>
http://members.xoom.com/JonahCohen/