danwinslow Posted July 22, 2014 Share Posted July 22, 2014 Also known as 'how many colors can I get if I....' I'm looking to get back into a little game programming in assembler. I'd like to have a fairly high resolution, so something based on mode E maybe. I plan on having pixel addressable movement ( ie, smooth ) of a small number of software sprites, so the text modes are probably out. If I use graphics E and overlay player/missile, is it feasible to get a few more sprite colors that way? I'm not looking for anything super fantastic, just a few more colors, no flicker, and reasonable resolution. Thanks in advance for any suggestions. 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 22, 2014 Share Posted July 22, 2014 The possibilities are various depending on priority setting of the PMGs. Mode 4 actually gives 5 colours vs only 4 for Mode E, same resolution. With PRIOR set for multicolour Player mode I believe you can have 23 colour combinations all up, without resorting to DLIs or colour changing tricks. In Mode E that'd be reduced somewhat. Also the process is by ORing so you'd need to be careful with colour selections to begin with. Realistically though, you'd probably be better off just using colours you want rather than settling for ones that will work by that method. But still, you'd end up with a reasonable number of useful ones. The 23 colour combos... background =1 players =4 playfields =4 PL0 Ored PL1 / PL2 Ored PL3 =2 PF0 Or combos with PL0/1 = 3 PF1 Or combos with PL0/1 = 3 PF2 Or combos with PL2/3 = 3 PF3 Or combos with PL2/3 = 3 ... total = 23 1 Quote Link to comment Share on other sites More sharing options...
danwinslow Posted July 22, 2014 Author Share Posted July 22, 2014 Thanks, Rybags. I discounted the mode 4 option because I don't understand how to get smooth positioning of sprites...I guess you mess around with the char set data as well as the video ram? Seems kind of complicated. For the PM overlays, there could be issues in repositioning the PM bar for multiple sprites using the same 'color' when they are on the same line, right? Or can you set the pm bar to span the whole playfield width? Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 22, 2014 Share Posted July 22, 2014 For that many colours, it's different to underlay. With underlay you have the luxury of PM having lower priority to give masking by PF pixels. The limitation is there of course that you can only have so many colour-enhanced objects. More than 1 per line involving each Player is not realistic, you could use flicker method with it's unattractiveness. DLIs of course help with vertically seperated stuff. Char mode isn't that much harder. The save/restore operation is easier, the rendering part is a bit harder. Quote Link to comment Share on other sites More sharing options...
kenjennings Posted July 23, 2014 Share Posted July 23, 2014 Getting all 23 colors takes a bit of contrivance. Attached is a Basic XL program figuring this out. Unpack the zip and you get COLORS23.BXL Extra colors occur where there are Players. (or missiles) Since a single player can't color the entire width of the screen enhancing color is limited to where a player may be placed and how wide it is. (Times four players, times the number of horizontal position changes one is willing to code.) And since many of the colors are the result of OR'ing 2 or more other colors together the results are limited if the base colors are not chosen carefully. Near the end of the PRIOR section of Wikipedia's page on GTIA is a table showing the 23 combinations.. http://en.wikipedia.org/wiki/CTIA_and_GTIA#PRIOR_.24D01B_Write Color COLPM0 COLPM1 COLPF0 COLPF1 Color COLPM2 COLPM3 COLPF2 COLPF3 1 X 12 X 2 X 13 X 3 X X 14 X X 4 X 15 X 5 X X 16 X X 6 X X 17 X X 7 X X X 18 X X X 8 X 19 X 9 X X 20 X X 10 X X 21 X X 11 X X X 22 X X X Plus the background color is 23. COLORS23.zip 2 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 23, 2014 Share Posted July 23, 2014 (edited) You can also use Antic 4 as a bitmap: Set up character set DLI's, you will need 7 for a 40 column wide screen, changing fonts every three character lines. Then put sequentially ATASCII 0-119 to the screen, 8 times, to set up the bitmap. To plot your bitmap, the mode is set up much like Commodore 64 multicolor lowres: The screen is addressed one character cell at a time instead of in rows, and you POKE to the character set memory to plot pixels. To use 5th color PF3, just inverse the character at the position you want, it will change all PF2's in that character cell to PF3's. If you use softsprites that use PF2's or PF3's you will have to watch out for conflicts. I believe the Mighty Bomb jack port on the Atari uses this method to get 5 colors onscreen at once. Also, keep in mind there is the fifth player setting where the missiles are joined and they take on PF3's color. Maximum width of a player can be 32 color clocks, or eight Antic 4 character cells. If you add the corresponding missile, you get another two character cells to make 10 wide. Edited July 23, 2014 by Synthpopalooza 1 Quote Link to comment Share on other sites More sharing options...
danwinslow Posted July 23, 2014 Author Share Posted July 23, 2014 Brilliant advice, thanks all. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted July 23, 2014 Share Posted July 23, 2014 cool... Quote Link to comment Share on other sites More sharing options...
ac.tomo Posted July 25, 2014 Share Posted July 25, 2014 If you want more colours, higher resolution etc.. the "Graphics Modes" topic in this forum will give you some insights, have fun. 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.