Vincehood Posted January 17, 2017 Share Posted January 17, 2017 Hello, I can´t figure out how to set the color for the whole backtab with IntyBasic. When using the default title screen, the background remains green. In the examples I have looked at, it is black. Thanks /Vincent Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted January 17, 2017 Share Posted January 17, 2017 Hello, I can´t figure out how to set the color for the whole backtab with IntyBasic. When using the default title screen, the background remains green. In the examples I have looked at, it is black. Thanks /Vincent The sample title screen sets the screen mode to something called "Color Stack." You want to check other threads in this forum explaining what that is. To change the background colour, you change the color of the first cell in the 4-colour Stack, and clear the screen. The default title screen code sets the stack to green to follow the classic Mattel look. Other examples may set the colour mode differently. You may want to look at the source code of the Title.bas created in your project to see how it uses the SCREEN command to set the screen mode and the color Stack colours. It should be fully documented. Alternatively, you may want to change the screen mode to Foreground/Background, which gives you more flexibility on the background colours of each background cell. In this mode, the background colour is part of each cell's attribute word, so clearing the screen will automatically make it all black (color 0). Please refer to the IntyBASIC manual for information on how to change the colours of the Color Stack or switch screen modes. dZ. Quote Link to comment Share on other sites More sharing options...
Kiwi Posted January 17, 2017 Share Posted January 17, 2017 wait mode 0,0,0,0,0 Will set the mode to color stack mode, mode 0. The following numbers after that are the 4 color stack values, the number 0 is black, while the value for dark green is 4. Make sure that wait is before setting mode or uploading values to the colorstack register. Quote Link to comment Share on other sites More sharing options...
Vincehood Posted January 17, 2017 Author Share Posted January 17, 2017 Thanks! Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 20, 2017 Share Posted January 20, 2017 wait mode 0,0,0,0,0 Will set the mode to color stack mode, mode 0. The following numbers after that are the 4 color stack values, the number 0 is black, while the value for dark green is 4. Make sure that wait is before setting mode or uploading values to the colorstack register. Or you could just use the much more readable CS_XXXX constants found in constants.bas e.g. CS_BLACK, CS_DARKGREEN, etc. As a side note, its always better to do the wait command after the mode command to ensure that you are in the correct video mode before writing data into BACKTAB. Thats because the video mode only changes during the next VBLANK period. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted January 20, 2017 Share Posted January 20, 2017 Or you could just use the much more readable CS_XXXX constants found in constants.bas e.g. CS_BLACK, CS_DARKGREEN, etc. As a side note, its always better to do the wait command after the mode command to ensure that you are in the correct video mode before writing data into BACKTAB. Thats because the video mode only changes during the next VBLANK period. To add to this, I believe that mode changes are "buffered," so you should be able to call MODE at any point and then WAIT for it to kick in and do the rest, like GroovyBee suggested. -dZ. 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.