Fabrizio Caruso Posted September 19, 2017 Share Posted September 19, 2017 Hi!My little multi-system 8-bit game supports the Atari computers (in both mode 0 and 1) and Atari 5200 console (in mode 1).https://github.com/Fabrizio-Caruso/CROSS-CHASE/releasesHow can I use the fifth color in mode 1 and do this with CC65?My game always shows only 4 colors. No matter which character code I select. I must be dowing something wrong. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 19, 2017 Share Posted September 19, 2017 Your COLOR2 ($2C6) is zero and so you'd show black on black when displaying values in the range $80->$BF Currently you get: ($2C4) = $28 = Orange for values $00->$3F ($2C5) = $0E = White for values $40->$7F ($2C7) = $46 = Purple for values $C0->$FF Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 19, 2017 Share Posted September 19, 2017 mode0 and mode1? antic modes? 5th color normally gets enabled in antic mode 4 e.g. with bit8 set, (+128) Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 19, 2017 Share Posted September 19, 2017 This is graphics mode 1 (Antic 6) found by using the debugger it in Altirra. Quote Link to comment Share on other sites More sharing options...
Fabrizio Caruso Posted September 19, 2017 Author Share Posted September 19, 2017 Wrathchild, indeed. I know how to get the those colors.As you can see I use them in my game. How do I get the fifth one?I am not at all an ATARI expert. I am writing a "universal" game for (ideally) 100 different computers/configurations. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted September 19, 2017 Share Posted September 19, 2017 (edited) In another thread: http://atariage.com/forums/topic/267084-understanding-and-using-graphics-mode-with-cc65/ tschak909 said: You really need to read the hardware manual regarding ANTIC modes 4 and 5. Seriously, go to atarimania.com, into the atari 800 books section. We'll be right here.But in case that's TL:DR:Basically, in ANTIC modes 4 and 5, bit 7 of a character determines whether or not the fifth color is used.-Thom The (only?) ways to get a 'fifth color' are all using the ANTIC char modes 4 and 5. It's a GPRIOR bit setting as I recall, but as advised you might want to check out the Atari system docs. Your quest to write for many computers using CC65 TDI is probably not going to work out very well. You should design your own version of a TDI-like interface and do special implementations for each computer. If you must stay in mode 1 then check out PMG overlays for more color. Edited September 19, 2017 by danwinslow Quote Link to comment Share on other sites More sharing options...
emkay Posted September 19, 2017 Share Posted September 19, 2017 Hi! My little multi-system 8-bit game supports the Atari computers (in both mode 0 and 1) and Atari 5200 console (in mode 1). https://github.com/Fabrizio-Caruso/CROSS-CHASE/releases How can I use the fifth color in mode 1 and do this with CC65? My game always shows only 4 colors. No matter which character code I select. I must be dowing something wrong. The background is the 1st color... Decimal Atascii 64 characters 0-63 1st color 64-127 2nd color 128-191 3rd color 192-255 4th color together 5 colors. ... taking a deep breath ... Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 19, 2017 Share Posted September 19, 2017 In the atari_mode1_graphics.h you don't need the ._color properties and so do not need to use '(void) textcolor (image->_color);' as you cannot "prepare" the colour of the object you want to draw. In the INIT_GRAPHICS method, use "_setcolor_low(n,COLOR_desired);" to initialise your chosen 5 colours. The colour of the object draw you have already seen is done through the "adjustment" to the char value, e.g. PLAYER_IMAGE._imageData = '*' - 160; hope that helps Quote Link to comment Share on other sites More sharing options...
danwinslow Posted September 19, 2017 Share Posted September 19, 2017 (edited) *deleted for dumbness* Edited September 19, 2017 by danwinslow Quote Link to comment Share on other sites More sharing options...
danwinslow Posted September 19, 2017 Share Posted September 19, 2017 The background is the 1st color... Decimal Atascii 64 characters 0-63 1st color 64-127 2nd color 128-191 3rd color 192-255 4th color together 5 colors. ... taking a deep breath ... Well, yeah, but I think he means five plus background? Quote Link to comment Share on other sites More sharing options...
Fabrizio Caruso Posted September 19, 2017 Author Share Posted September 19, 2017 Please forgive any stupid question I may ask.So the fifth color is the background color of all characters?Can't I have a specific background for a specific character? Quote Link to comment Share on other sites More sharing options...
sanny Posted September 19, 2017 Share Posted September 19, 2017 So the fifth color is the background color of all characters? Yes. Can't I have a specific background for a specific character? No. Quote Link to comment Share on other sites More sharing options...
emkay Posted September 19, 2017 Share Posted September 19, 2017 So the fifth color is the background color of all characters? Can't I have a specific background for a specific character? If you want to handle PM Graphics, it will give some additional colors... Quote Link to comment Share on other sites More sharing options...
vitoco Posted September 26, 2017 Share Posted September 26, 2017 (edited) You can get all 4 colors plus background if you change from graphics mode 1 (ANTIC mode 6) to graphics mode 12 (ANTIC mode 4) and write words instead of bytes in screen memory area, because each line will be 40 bytes long instead of 20. This way you could get multi color "sprites" with a redefined charset. Off course you'll need to include new fonts for the text line at the top or change just that line to ANTIC mode 6. I used this technique in my Decipede game written in BASIC language, but with ANTIC mode 5 instead of 4 for double height pixels like in graphics mode 2. Just check the source code in my home page, tenliners section. Edited September 26, 2017 by vitoco 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.