+Gemintronic Posted March 26, 2012 Share Posted March 26, 2012 (edited) So, I noticed I can change the first playfield row background color with COLUBK with these kernel settings enabled: set kernel_options pfcolors pfheights background Is there a way to change other playfield rows similar to this? rem Compiler options set smartbranching on set kernel_options pfcolors pfheights background set romsize 4k rem Declare constants const true = 1 const false = 0 const pfscore=1 scorecolor = $33 pfheights: 8 13 13 13 13 13 13 2 2 2 2 end pfcolors: $00 $E2 $E4 $E6 $E8 $EA $09 $00 $00 $00 $00 end playfield: ......X......................... ..............X................. ................................ ....................X........... ........X....................... ............X................... ..................X............. .X.X.XX...X.X.XX..XX...X..XXX.X. X..X.X.X.X..X.X.X.X.X.X.X..X..X. X..X.X.X.X..X.X.X.X.X.XXX..X..X. .X.X.X.X..X.X.X.X.X.X.X.X..X..X. end player0: %100010 %010100 %011000 %111100 %111111 %111100 %011000 %010100 %100010 end player1: %010001 %001010 %000110 %001111 %111111 %001111 %000110 %001010 %010001 end player0x = 4 player0y = 79 player1x = 148 player1y = 66 score = 123456 main gosub draw_event if joy0up && player0y > 11 then player0y = player0y - 1 if joy0down && player0y < 85 then player0y = player0y +1 if joy0left then player0x = player0x - 1 if joy0right then player0x = player0x +1 if joy1up && player1y > 11 then player1y = player1y - 1 if joy1down && player1y < 85 then player1y = player1y +1 goto main draw_event REFP0 = 0 COLUP0 = $47 NUSIZ0 = $30 COLUP1 = $AA COLUPF = $0E COLUBK = rand drawscreen return Edited March 26, 2012 by theloon Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted March 27, 2012 Share Posted March 27, 2012 (edited) I think Random Terrain's guide explains the bug regarding the top row's color and how to fix it. If you use pfcolors and pfheights together, you can't change the pfcolors and pfheights after you set them-- under normal circumstances. If I remember correctly, I wrote a demo program a couple of years ago that shows how to move them into RAM so you can change the pfcolors and pfheights on the fly. It's in one of the threads here... Edit: Found it... http://www.atariage.com/forums/topic/112423-pfcolors-and-pfheights-together-in-ram/ Edited March 27, 2012 by SeaGtGruff Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted March 27, 2012 Author Share Posted March 27, 2012 (edited) I think Random Terrain's guide explains the bug regarding the top row's color and how to fix it. If you use pfcolors and pfheights together, you can't change the pfcolors and pfheights after you set them-- under normal circumstances. If I remember correctly, I wrote a demo program a couple of years ago that shows how to move them into RAM so you can change the pfcolors and pfheights on the fly. It's in one of the threads here... Edit: Found it... http://www.atariage....ogether-in-ram/ Thanks for the reply man! If you're talking about the repeating color issue with the top row.. I know about (and experience frequently) that bug. What I didn't expect is that COLUBK actually changes the color on-the-fly for the top rows of my code above. I just hoped someone knew how to access the other playfields rows like that (with the standard kernel). You custom kernel modifications look mind bogglingly jawsome but I'd like to avoid using anything but the latest stable version of bB. UPDATE: I did a search on "top row" in the command refernce and found this indeed was already documented - not just the color bleeding onto other rows. Drat! I thought I found something new toprowch.bin Edited March 28, 2012 by theloon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.