Jump to content

Photo

Can we change background color behind the score?


7 replies to this topic

#1 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 24,892 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Aug 29, 2010 8:35 AM

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, Wed Sep 8, 2010 2:03 AM.


#2 RevEng ONLINE  

RevEng

    River Patroller

  • 3,343 posts
  • bit player
  • Location:Canada

Posted Sun Aug 29, 2010 11:06 AM

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.

#3 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,892 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun Aug 29, 2010 11:38 AM

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.

#4 RevEng ONLINE  

RevEng

    River Patroller

  • 3,343 posts
  • bit player
  • Location:Canada

Posted Sun Aug 29, 2010 12:48 PM

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

#5 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 8,071 posts
  • The brightest ideas in the world are here to play.
  • Location:Salem, Oregon

Posted Wed Oct 6, 2010 6:41 PM

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?

Attached Files



#6 Omegamatrix OFFLINE  

Omegamatrix

    Quadrunner

  • 5,509 posts
  • Location:Canada

Posted Wed Oct 6, 2010 6:50 PM

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.

#7 atari2600land OFFLINE  

atari2600land

    Quadrunner

  • 8,071 posts
  • The brightest ideas in the world are here to play.
  • Location:Salem, Oregon

Posted Wed Oct 6, 2010 6:53 PM

OK, that did it. Sorry. :dunce:

#8 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 24,892 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Oct 6, 2010 7:10 PM

This has been on the bB page for a while, but I just added a direct link to it:

http://www.randomter...nds.html#scback




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users