Jump to content
Sign in to follow this  
Random Terrain

Can we change background color behind the score?

Recommended Posts

If we use pfcolors and background, we can change the background color strip behind the score, but that's not helpful if you want to use pfcolors to color rows of playfield pixels.

 

Is there any way to 'hack' bB so that only the strip where the score is can have a different background color from the rest of the screen and have it still be compatible with pfcolors?

 

 

Thanks.

Edited by Random Terrain

Share this post


Link to post
Share on other sites

Try adding this to your last bank...

 

       asm
minikernel
       sta WSYNC
       lda scback
       sta COLUBK
       rts
end

 

Then in your bB code...

      rem to set a constant score background color do this...
      const scback=#$28

      rem to assign a variable to the score background color do this...
      dim scback=z
      scback=$28

 

The margin of color above the score is a bit larger than the margin below, due to the bB score setup, but I believe it's the best you can do without modifying the score assembly itself.

  • Like 1

Share this post


Link to post
Share on other sites

Try adding this to your last bank...

 

       asm
minikernel
       sta WSYNC
       lda scback
       sta COLUBK
       rts
end

 

Then in your bB code...

      rem to set a constant score background color do this...
      const scback=$28

      rem to assign a variable to the score background color do this...
      dim scback=z
      scback=$28

 

The margin of color above the score is a bit larger than the margin below, due to the bB score setup, but I believe it's the best you can do without modifying the score assembly itself.

It works great as long as I use COLUBK in the main loop to tell the program what color the rest of the background should be. The margin difference isn't a big deal. I'm just glad that I can have a different background color down there.

 

Thanks.

Share this post


Link to post
Share on other sites

...It works great as long as I use COLUBK in the main loop to tell the program what color the rest of the background should be...

Good point! I had that in my quick proof-of-concept, but I forgot to mention it in my post.

 

And you're welcome!

Share this post


Link to post
Share on other sites

I tried this and I got this as the result:

2600basic_variable_redefs.h (5): error: EQU: Value mismatch.

 

old value: $00f0 new value: $00cc

 

default.bas.asm (1228): error: Illegal Addressing mode 'sta #scback'.

 

bytes of ROM space left

 

2600basic_variable_redefs.h (3): error: EQU: Value mismatch.

 

old value: $00cc new value: $00f0

 

2600basic_variable_redefs.h (5): error: EQU: Value mismatch.

 

old value: $00f0 new value: $00cc

 

--> cycle74_HMCLR f07b

 

default.bas.asm (1228): error: Illegal Addressing mode 'sta #scback'.

 

2600 Basic compilation Failed!

What the heck am I doing wrong here?

 

aardvarx.bas

Share this post


Link to post
Share on other sites

What the heck am I doing wrong here?

 

You're using scback as both a constant and a variable. Look at RT's post again. You're supposed to choose one or the other, but not both.

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...