Re: [stella] double-height 6-digit score display

Subject: Re: [stella] double-height 6-digit score display
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Fri, 9 Feb 2001 23:33:07 +0100
Andrew Davie wrote:

AD> I'm using this for Qb, but suddenly find myself real short of ROM.  Why
AD> doesn't that surprise anyone?

Ok, i just used my favourite illegal opcode lax and...:
         lda #7*2
         sta count1

mainloop lda count1   ;3
         lsr          ;2
         tay          ;2
         lda (ptr0),y ;5
         sta GRP0     ;3 = 15

        ; sta WSYNC    ;3 =  3
         bit $00

         lda (ptr1),y ;5
         sta GRP1     ;3
         lax (ptr5),y ;5        illegal opcode
         txs          ;2
         lda (ptr2),y ;5
         sta tmp      ;3
         lax (ptr3),y ;5        illegal opcode
         lda (ptr4),y ;5 = 33

         ldy tmp      ;3
         sty GRP0     ;3
         stx GRP1     ;3
         sta GRP0     ;3
         tsx          ;2
         stx GRP1     ;3 = 17

         dec count1   ;5
         bpl mainloop ;3 =  8

If you don't like illegal opcodes (Thrust uses them and
still there's nobody who has problems with them), you
have to find just one extra cycles and use the three
cycles from bit $00.

You could also use a table to create displays of any
size you want:

mainloop ldx count1   ;3
         ldy table,x  ;4

;table for triple height:
table    .byte 0,0,0,1,1,1,2,...

But this will cost you some extra ROM too.

Have fun!
Thomas



-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread