Jump to content


160B Alternative 12 colors?

2 replies to this topic

#1 asdronin OFFLINE  


    Space Invader

  • 26 posts

Posted Sun May 12, 2019 12:39 AM

Hi all,

I spent a lot of time dealing with colors when I started in the 7800Basic world (you know importing graphics wrongly having them show different palettes than I wanted etc), and still now I see many things that I dont manage to get fully, now that somehow I feel Im more or less prepared to make the first attempt on a game I have to ask this doubt that comes from my day 1, I see in table that 160B mode allows 12 colors, how is that so? I tried importing images with more than 3 colors, mainly 12 colors (I mean 3 + transparent and 12+1) and nothing seems to work, in fact I cant define a palette big enough to handle that and when sprite are pasted they require one palete, sorry if Im missing something very obvious.... what are these 12 colors that are theoritically allowed in this mode? can we import a image with 12 colors and use it as sprite? as said Im very sorry if my question sounds too simple, there are many many things that I cant manage to understand in this environment but of course Im eager to improve =).


Edit: Right now Im pasting 3 sprites one of top of another to achieve 9 color sprite that looks like I want but of course thats not the most accurate way if we can use 12 colors in one image

#2 SmittyB OFFLINE  



  • 373 posts

Posted Sun May 12, 2019 3:29 AM

When you import your graphics you'll have to specify in the incgraphic / incbanner parameters that it's intended to be drawn in 160B mode as the way the graphics data is structured in ROM is different for different modes. When you use plotsprite / plotbanner 7800BASIC will know to set it up as a 160B object.


As for the palettes, one of the drawbacks of having more colours is having a restricted choice of palettes. You can only specify palette 0 or 4 but 160B mode treats 0 as the first 4 palettes combined and 4 is the last 4 palettes combined. The reason that it's 12 colours and not 16 is because each of the individual 8 palettes is still 3 colours + background / transparency so you actually get 12 colours and 4 duplicate values for background / transparency.

Edited by SmittyB, Sun May 12, 2019 3:30 AM.

#3 asdronin OFFLINE  


    Space Invader

  • Topic Starter
  • 26 posts

Posted Sun May 12, 2019 5:22 PM

Thanks a lot SmittyB for the great explanation, I finally understood this and I have been going around this issue since I downloaded the 7800Basic, I get the feeling that its better to use 3 colors per sprite and maybe overlap 2 or 3 sprites than using one with 12 colors, at least I get more freedom I think like for instance I made a ship and I can overlap 3 sprites to make it 9 colors but Im not using more palettes as I would be needing other palettes for background tiles and other things later on, however of course Im wasting some resources as Im pasting more sprites than  I would need but so far it seems really fast. As said thanks a lot =)

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users