Yoruk Posted July 10, 2021 Share Posted July 10, 2021 Hello there, Is there a way to update/change COLUBK at mid-screen ? I'm looking for a way to split my screen in two colors (horizontally !!), without using the playfield. Something like this : Maybe by using a small assembly routine inside my game loop ? Thanks ! Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/ Share on other sites More sharing options...
+Karl G Posted July 10, 2021 Share Posted July 10, 2021 Adding the code to the game loop will not have an effect. Mid-screen changes like that need to be part of the kernel code, and bB code runs during overscan. What you want is the background kernel option to allow you to do this. 1 Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4860839 Share on other sites More sharing options...
Yoruk Posted July 11, 2021 Author Share Posted July 11, 2021 Thanks for the tip, but I didn't manage to make it work. So if I understand correctly, by setting up the background kernel option it allows me to use the playfield color table to paint the background instead of the playfield blocks. So I added : set kernel multisprite set kernel_options pfcolors no_blank_lines background and pfcolors: $0E $0E $0E $0E $0E $B6 $B6 $B6 $F4 $F4 $C4 $0E end before my main loop. But there is an error during the assembly : --- Unresolved Symbol List pfcolortable 0000 ???? (R ) 2561 bytes of ROM space left So maybe I'm not filling the data in the good array...? Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4861224 Share on other sites More sharing options...
+Random Terrain Posted July 11, 2021 Share Posted July 11, 2021 The kernel options are for the standard kernel only. They will not work with the DPC+ kernel or the multisprite kernel. https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#kernelopchart Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4861302 Share on other sites More sharing options...
+Karl G Posted July 11, 2021 Share Posted July 11, 2021 I mistakenly assumed you were using the standard kernel. Both the standard kernel and DPC+ have a way of changing the background color mid-screen, but the multisprite kernel does not. Also, you would use "bkcolors" instead of "pfcolors" to define them. Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4861327 Share on other sites More sharing options...
Yoruk Posted July 17, 2021 Author Share Posted July 17, 2021 Aouch sorry for being not accurate enough in my description. My main constraint is to have the multi-sprite kernel. I'll have only one sprite on a scanline at a time, so it should work. So in this case my only chance to have my two colors background is with a standard playfield ? They say that the PF is mirrored (no so problems here), and that I must use the "playfield" command to draw my background. But I don't know if there is color limitations ? I'm not yet familiar with the pfheight variable, I'll try that... Thanks ! Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4865525 Share on other sites More sharing options...
+Karl G Posted July 17, 2021 Share Posted July 17, 2021 The Multisprite kernel is a special case, and it has its own limitations. It doesn't have any kernel options like the standard kernel does. If you wanted to set COLUBK to one color, and COLUPF to another color, then that would be one way to have two different colors on the screen like you were wanting, but I don't know if you were planning on using the playfield for anything else. Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4865544 Share on other sites More sharing options...
Yoruk Posted July 17, 2021 Author Share Posted July 17, 2021 Many thanks ! It should work perfectly. ? No, I'll not use the PF for anything else than pure drawing (no collisions checks....). Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4865554 Share on other sites More sharing options...
+Gemintronic Posted July 24, 2021 Share Posted July 24, 2021 There is a modified multi sprite kernel that supports a multi colored background used in this flappy bird demo: It has its quirks. One of which is that your player sprites can cause the background color to spill over to other rows depending on the y position. So, you have to program around that and it usually involves very chunky vertical movement (to skip lines that would cause the background color to bleed). Also, one background theme per game. You could *probably* get around that by making a multi kernel game using RevEngs multi kernel framework. Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4870064 Share on other sites More sharing options...
Yoruk Posted July 26, 2021 Author Share Posted July 26, 2021 Ill study that, thanks !! Quote Link to comment https://forums.atariage.com/topic/322730-bb-changing-background-color-on-the-fly/#findComment-4871146 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.