Jump to content
Sign in to follow this  
Gemintronic

First row gets last row color

Recommended Posts

For some reason the first row get the last rows colors.

 

 

 set smartbranching on
set romsize 4k
set kernel_options pfheights pfcolors

COLUBK = $00
scorecolor = $0E

pfheights:
4
26
16
26
4
2
2
2
2
2
2 
end

pfcolors:
$33
$33
$33
$33
$33
$33
$8E
$8E
$8E
$8E
$8E
end

playfield:
XXXXXXXXXXXXX....XXXXXXXXXXXXXXX
X..............................X
................................
X..............................X
XXXXXXXXXXXXX....XXXXXXXXXXXXXXX
................................
XX..XXX.XXX..XX.XXX.XXX.XX..XXX.
X.X.X.X..X..X....X..X.X.X.X.X...
XXX.X.X..X...X...X..X.X.X.X.XX..
X...X.X..X....X..X..X.X.X.X.X...
X...XXX.XXX.XX..XXX.XXX.X.X.XXX.
end

main
drawscreen
goto main

post-13304-128300944271_thumb.jpg

Edited by theloon

Share this post


Link to post
Share on other sites

If you throw in a 12th line on the pfcolors definition, it should change that first row to that color. It has to do with the fact that there are 96 rows for the playfield, even though bB only uses 88. At least I think that is how it goes. Try using no_blank_lines and see if that changes it as well. If you look at the bug thread, you can see us talking about it. It may apply to that as well. Hope this helps.

 

Cliff

Share this post


Link to post
Share on other sites

Another fix for this was mentioned here

 

That won't work as that wasn't for the playfield, it was for the background using the background kernel option. If you do that for a normal playfield, it won't change the playfield color, it will make the entire background the color of COLUBK. The first line will still be wrong.

 

Cliff

Share this post


Link to post
Share on other sites

If you throw in a 12th line on the pfcolors definition, it should change that first row to that color. It has to do with the fact that there are 96 rows for the playfield, even though bB only uses 88. At least I think that is how it goes. Try using no_blank_lines and see if that changes it as well. If you look at the bug thread, you can see us talking about it. It may apply to that as well. Hope this helps.

 

Cliff

 

Hey! Thanks for the help! PAC-MAN-RED too as that topic was educational as well.

 

The workaround seems to be adding an extra line to the top of the playfield data and adding a corresponding pfheights. Adding a pfcolors line doesn't seem to efffect it.

 

I still consider this color wrap-around issue a bug (albeit with workarounds). Just have to watch out for it in the future :)

Edited by theloon

Share this post


Link to post
Share on other sites

Hey! Thanks for the help! PAC-MAN-RED too as that topic was educational as well.

 

The workaround seems to be adding an extra line to the top of the playfield data and adding a corresponding pfheights. Adding a pfcolors line doesn't seem to efffect it.

 

I still consider this color wrap-around issue a bug (albeit with workarounds). Just have to watch out for it in the future :)

 

You are right. I remembered having to add a line to one of them, I just couldn't remember which one =) Should have wrote something up. Glad you got it fixed though.

 

Cliff

Edited by Cliff Friedel

Share this post


Link to post
Share on other sites

Another fix for this was mentioned here

That's the simplest fix when used in the foreground. Put COLUPF in your main loop and have it be the color of your top row. Problem solved.

Edited by Random Terrain

Share this post


Link to post
Share on other sites

Another fix for this was mentioned here

 

That won't work as that wasn't for the playfield, it was for the background using the background kernel option. If you do that for a normal playfield, it won't change the playfield color, it will make the entire background the color of COLUBK. The first line will still be wrong.

 

Cliff

 

It was a caffeine deficient morning stupor. :sleep: New rule: Coffee first, than answer questions. :D

Share this post


Link to post
Share on other sites

I just updated the pfcolors section:

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#kernop_pfcolors

 

 

You may need to refresh the page or clear your cache to see the changes.

Updated that section one more time:

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#kernop_pfcolors

 

Does that handle everything or did I forget something?

Share this post


Link to post
Share on other sites

Looks good to me... although picture examples along with the code would be awesome, but a lot more work too. It would be just like the forums, and to save some work, users could contribute their code snippets and pictures. Just thinking... :)

Edited by PAC-MAN-RED

Share this post


Link to post
Share on other sites

I think that all you need to do is put your pfcolors definition in the game loop. If it's outside of the game loop, the top line will not be updated every frame. If you want it outside the game loop, setting COLUPF manually works as mentioned above.

Share this post


Link to post
Share on other sites

I think that all you need to do is put your pfcolors definition in the game loop. If it's outside of the game loop, the top line will not be updated every frame. If you want it outside the game loop, setting COLUPF manually works as mentioned above.

Thanks. I'll update the page again.

Share this post


Link to post
Share on other sites

I think that all you need to do is put your pfcolors definition in the game loop. If it's outside of the game loop, the top line will not be updated every frame. If you want it outside the game loop, setting COLUPF manually works as mentioned above.

I was playing with test code and that works for the playfield, but putting it in the main loop doesn't seem to work when you use background. It does work if you use no_blank_lines with background, though.

Edited by Random Terrain

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