Jump to content
IGNORED

Help with six digit score


Recommended Posts

So I have the following code:

        lda (DigitThousands),y     
        sta GRP0                    
        lda (DigitHundreds),y       
        tax                         
        lda (DigitTens),y          
        sta Temp2               
        lda (DigitOnes),y     
        ldy Temp2                   
        stx GRP1                   
        sty GRP0                   
        sta GRP1                   
        sta GRP0                   

This is okay for a four digit score, but I would like a six-digit score. What do I do to make this a six-digit score?

Link to comment
Share on other sites

Here's a chunk of code that contains the draw loop and the necessary TIA register setup (set sprite 3-copy mode, and center the display) for a 6 digit score (48 pixel wide) display.

 

It uses 14 bytes of RAM, 12 for the score digit graphics pointers and 2 temporary variables for the draw loop (one as a counter, the other as a temporary data store).

 

I've put comments on the graphics pointer variables (scorePtr1 .. scorePtr6) indicating which score digit they correspond to.

 

score48pix.asm

 

Hope this helps.

  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...