Jump to content
IGNORED

How to use the fifth color in mode 1 with CC65


Recommended Posts

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.

Link to comment
Share on other sites

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 by danwinslow
Link to comment
Share on other sites

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 ... ;)

Link to comment
Share on other sites

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 :)
Link to comment
Share on other sites

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 by vitoco
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...