Re: [cc65] Re: New 80 col switch API

From: Karri Kaksonen <karri1sipo.fi>
Date: 2009-09-07 10:23:20
Ullrich von Bassewitz wrote:
>
> Can we discuss this after the release? Since there is an implementation using
> ioctl(), I cannot see an urgent need for a change.
>
>   

You are right. I just thought that if you do some new functions for tgi 
then I could throw in the sprite concept also. But the current tgi_ioctl 
works perfectly and there is no need for changes. As a matter of fact it 
is not worth doing a change at all.

But if somebody implements a new videomode class then the Lynx could 
also use that and define two operating modes.

In the Lynx you are supposed to implement this functionality in every 
game. By pressing Pause + Opt 2 you toggle the videomode. Then you can 
just turn the Lynx around and operate the joypad with your right hand 
instead of using the left hand.

#define VIDEOMODE_NORMAL 0
#define VIDEOMODE_FLIPPED 1

VIDEOMODE:
; 0 = NORMAL, 1 = FLIPPED
        bne   @L0
        lda     __sprsys
        and     #$f7
        sta     __sprsys
        sta     SPRSYS

        lda     __viddma
        and     #$fd
        bra    @L1
@L0:
        lda     __sprsys
        ora     #8
        sta     __sprsys
        sta     SPRSYS

        lda     __viddma
        ora     #2
@L1:
        sta     __viddma
        sta     DISPCTL
        ldy     VIEWPAGEL
        ldx     VIEWPAGEH
        and     #2
        beq     @L2
        clc
        tya
        adc     #<8159
        tay
        txa
        adc     #>8159
        tax
@L2:
        sty     DISPADRL
        stx     DISPADRH
        lda     #TGI_ERR_OK
        sta     ERROR
        rts

--
Karri

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Sep 7 10:23:33 2009

This archive was generated by hypermail 2.1.8 : 2009-09-07 10:23:35 CEST