Re: A82: Solytare


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

Re: A82: Solytare




Hmm.. I don't know.. speaking of which, would this work for Find_pixel on
the 83?
Someone gave me this, and I don't know how Find_Pixel works.. so i wonder...
                                                                            
                            -Ahmed

;--------------------------------------------------------------------
; The Eble-Yopp-Yopp-Eble-Eble-Eble-Yopp Fast FindPixel Routine :)
; 36 bytes / 121 t-states not counting ret or possible push/pop of BC
;--------------------------------------------------------------------
; Input:  D = y
;         E = x
; Output: HL= address of byte in video memory
;         A = bitmask (bit corresponding to pixel is set)
;         C is modified
;
; +-----------+
; |(0,0)      |  <- Screen layout
; |           |
; |   (95,63)|
; +-----------+
;
;--------------------------------------------------------------------
FIND_PIXEL:
        ld hl,FP_Bits
        ld a,e
        and $07         ; a = bit offset
        add a,l
        ld l,a
        adc a,h
        sub l
        ld h,a
        ld c,(hl)       ; c = bitmask for (hl)
;48 t-states up to this point
        ld hl,FP_RLD
        ld (hl),d
        ld a,e          ; a = x/8 (byte offset within row)
        rrca
        rrca
        rrca
        rld
        ld l,(hl)
        ld h,a          ; hl -> byte in vid mem
        ld a,c          ; now a = bitmask for (hl)
 ld de,plotsscreen  ; CHANGED FOR 83
 add hl,de
;121 t-states up to this point
        ret
FP_RLD:  .db $00
FP_Bits: .db $80,$40,$20,$10,$08,$04,$02,$01

                                                                            
                        -Ahmed
-----Original Message-----
From: Michael Pearce <mgp4007@omega.uta.edu>
To: assembly-82@lists.ticalc.org <assembly-82@lists.ticalc.org>
Date: Saturday, May 30, 1998 2:47 PM
Subject: Re: A82: Solytare


>
>Go for it!  But why doesn't someone try to make a different card
>game??
>
>-mike pearce
>
>On Sat, 30 May 1998 13:13:58 -0400, you wrote:
>
>>
>>
>>I am going to work on one, if it is allright w/you Micheal.. i was going
to
>>finish it then tell you, but oh well..
>>                                                                        -a
hm
>>ed
>>
>
>