Jump to content
IGNORED

Can we change background color behind the score?


Random Terrain

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

Link to comment
Share on other sites

  • 1 month later...

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

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...