+atari2600land Posted August 27, 2006 Share Posted August 27, 2006 (edited) Can someone give me a sample code that will change the playfield color to different colors using batari BASIC 0.99b? I mean within the same screen, line 1 be one color, line 2 be a different one, etc. Edited August 27, 2006 by atari2600land Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/ Share on other sites More sharing options...
MausBoy Posted August 27, 2006 Share Posted August 27, 2006 I've asked the same thing, with no luck. It involves altering the kernel, something people are leaving to Batari, unfortunately. I mean, he's really good at it, but it's a disgusting amount of work for one person. I'd be thrilled with being able to split the background color into two seperate halves... Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1128238 Share on other sites More sharing options...
+atari2600land Posted August 28, 2006 Author Share Posted August 28, 2006 I thought there was a code for it, like pfcolor followed by color numbers or something, with an end statment. Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1128275 Share on other sites More sharing options...
SeaGtGruff Posted August 28, 2006 Share Posted August 28, 2006 Can someone give me a sample code that will change the playfield color to different colors using batari BASIC 0.99b? I mean within the same screen, line 1 be one color, line 2 be a different one, etc. Is this what you mean? The "set kernel_options pfcolors" line is crucial. The "pfcolors" statement sets the playfield color for each line (or row) of playfield pixels. However, the color of the first row doesn't come from the first "pfcolors" value, it either comes from the last value, or you can set "COLUPF" to the first value inside the loop before you call "drawscreen." You can use decimal values if you want; I just prefer using hex values for the colors. You must compile with DASM 2.20.07 or else the code won't compile, because DASM 2.20.10 has a bug. MR set kernel_options pfcolors COLUBK = $06 playfield: XXXXXX.XXXXXX..XXXXX.XXXXXX..... ..XX...XX.....XX.......XX....... ..XX...XXXX....XXXX....XX....... ..XX...XX.........XX...XX....... ..XX...XXXXXX.XXXXX....XX....... ................................ .....XXXXXX.XXXXXX..XXXXX.XXXXXX .......XX...XX.....XX.......XX.. .......XX...XXXX....XXXX....XX.. .......XX...XX.........XX...XX.. .......XX...XXXXXX.XXXXX....XX.. end pfcolors: $1A $18 $16 $14 $12 $10 $20 $22 $24 $26 $28 end loop COLUPF = $1A drawscreen goto loop test_pfcolors.bas test_pfcolors.bas.bin Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1128397 Share on other sites More sharing options...
+atari2600land Posted August 28, 2006 Author Share Posted August 28, 2006 Yes, this is what I mean. I use 2600IDE to compile. Will this work with every version of 2600IDE? Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1128412 Share on other sites More sharing options...
SeaGtGruff Posted August 28, 2006 Share Posted August 28, 2006 Yes, this is what I mean. I use 2600IDE to compile. Will this work with every version of 2600IDE? 2600IDE isn't a compiler, it's just an editor that can call a compiler and an emulator. When you compile through 2600IDE, there will be a line that says which version of DASM is being used (see below, down by the "bytes free" message). If it isn't 2.20.07, you'll get a lot of compile errors when you try to use many of bB 0.99's new features. DASM 2.20.07 is at http://www.atari2600.org/DASM/. MR > "C:\Atari2600\bB\2600bas.bat" C:\Atari2600\bB\Projects\test_pfcolors.bas C:\Atari2600\bB>cd Includes C:\Atari2600\bB\Includes>..\preprocess.exe 0<C:\Atari2600\bB\Projects\test_pfcolors.bas | ..\2600basic.exe 1>bB.asm 2600 Basic compilation complete. C:\Atari2600\bB\Includes>..\postprocess.exe 1>C:\Atari2600\bB\Projects\test_pfcolors.bas.asm C:\ATARI2~1\bB\Includes>..\dasm.exe C:\Atari2600\bB\Projects\test_pfcolors.bas.asm -f3 -oC:\Atari2600\bB\Projects\test_pfcolors.bas.bin DASM V2.20.07, Macro Assembler (C)1988-2003 bytes of ROM space left 2777 bytes of ROM space left Complete. > Terminated with exit code 0. Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1128481 Share on other sites More sharing options...
+atari2600land Posted August 30, 2006 Author Share Posted August 30, 2006 Why won't v. 2.07 compile the .bas file I attached at the bottom? It gives me this: and it says it doesn't know pfcolors. test2.bas Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1129446 Share on other sites More sharing options...
SeaGtGruff Posted August 30, 2006 Share Posted August 30, 2006 Why won't v. 2.07 compile the .bas file I attached at the bottom? It compiled for me with no problem. Are you sure you're using the 0.99c version of bB? MR Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1129459 Share on other sites More sharing options...
Zach Posted August 30, 2006 Share Posted August 30, 2006 I'd be thrilled with being able to split the background color into two seperate halves... Well, there is "score mode", although that affects the PF color rather than the BK color. Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1129461 Share on other sites More sharing options...
+atari2600land Posted August 30, 2006 Author Share Posted August 30, 2006 Why won't v. 2.07 compile the .bas file I attached at the bottom? It compiled for me with no problem. Are you sure you're using the 0.99c version of bB? MR I'm using 99b. There's a 99c? Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1129504 Share on other sites More sharing options...
SeaGtGruff Posted August 30, 2006 Share Posted August 30, 2006 (edited) Why won't v. 2.07 compile the .bas file I attached at the bottom? It compiled for me with no problem. Are you sure you're using the 0.99c version of bB? MR I'm using 99b. There's a 99c? 0.99c is the version that Batari hasn't posted yet in his blog, although he's emailed it to everyone who's asked him for a copy of it. I thought you had asked him to email it to you? Did you reinstall version 0.99b over 0.99c? I think 0.99c is probably buggier than 0.99b is, but 0.99c has all of the newest features, possibly including some things that aren't in 0.99b. If I'm not mistaken, 0.99b has the multisprite kernel, but it doesn't have the multicolor playfield option. MR Edited August 30, 2006 by SeaGtGruff Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1129586 Share on other sites More sharing options...
MausBoy Posted August 30, 2006 Share Posted August 30, 2006 Sorry, I was confused because I thought you were asking if there was a way to do it in thte older build of bB. Zach - I meant horizontally, not vertically. Sorry I wasn't clear on that. Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1129640 Share on other sites More sharing options...
SeaGtGruff Posted August 31, 2006 Share Posted August 31, 2006 Sorry, I was confused because I thought you were asking if there was a way to do it in thte older build of bB. Zach - I meant horizontally, not vertically. Sorry I wasn't clear on that. MausBoy, I just realized that you *can* change the background color in bB 0.99c, the same way you change the pfcolors. It took me a while to figure out how it works. I'm writing another session in the tutorial about the background, and I'll talk about it in there. Should be ready this weekend. MR Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1130107 Share on other sites More sharing options...
MausBoy Posted September 1, 2006 Share Posted September 1, 2006 Yeah it took me a couple tries to figure it out too, and it looks just plain ugly. It offsets every line by one pixel about 1/4th way in from the left. What I'm after is a way to split the background color into two seperate colors, and specify on which line the split occurs. And without losing the ability to specify multiple pfheight tables, which is what happens when you use the 'background' kernel option. Quote Link to comment https://forums.atariage.com/topic/92783-changing-playfield-color/#findComment-1130798 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.