Rybags Posted November 3, 2007 Share Posted November 3, 2007 Most of us are familiar with some of the extra software driven modes like APAC, HIP/TIP/RIP etc. But, how about modes based upon using GTIA GPRIOR settings in ANTIC modes like 4 (OS Gr. 12, multicolour character 40x24) etc.? Well, to work out just what goes on, we have to look deeper into the technical descriptions of ANTIC and GTIA. ANTIC sends graphics data to GTIA at double the system clock rate. It uses 3 bits of information on 3 pins (AN0, AN1 and AN2). These bits are decoded by GTIA, and used to generate the playfield. The high bit is simply used to tell GTIA to either display graphics, or to do the other stuff like syncing or preparing for graphics to be displayed. For the purpose of this discussion, we'll just look at values with AN2 set to "1", except for value "000" which means "display background" That leaves AN1 and AN0, which can assume one of 4 values. In the normal course of events (except GTIA modes and hires modes like GR.0 or the translation occurs: Pixel value (bin) AN2-AN0 value Resultant display 00 000 Background colour (COLBK) 01 100 COLPF0 10 101 COLPF1 11 110 COLPF2 11 111 COLPF3 (note: only applicable to multicolour charmodes) Anyway - that's all reasonable and simple, but what about if we use a GTIA mode, in this case the 16 colour, single luminence mode? It gets a little more complex. In GTIA modes, we have a case where two sets of data are taken and combined together. So, two alternate sets of AN1-AN0 data are combined: Pixel value (bin) AN2-AN0 pair values Resultant display 0000 000,000 COLBK 0001 000,100 COLBK 0010 000,101 Colour 1 0011 000,110 Colour 2 (or 3*) 0100 100,000 COLBK 0101 100,100 COLBK 0110 100,101 Colour 1 0111 100,110 Colour 2 (or 3*) 1000 101,000 Colour 4 1001 101,100 Colour 4 1010 101,101 Colour 5 1011 101,110 Colour 6 (or 7*) 1100 110,000 Colour 8 (or 12*) 1101 110,100 Colour 8 (or 12*) 1110 110,101 Colour 9 (or 13*) 1111 110,110 Colour 10 (or 15*) * = alternate colour available if high bit of character is set As you can see, you lose out somewhat in the colour department. The problem being that GTIA modes only combine what it sees on alternate transmissions on AN1, AN0. Therefore, background and Playfield 0 are treated the same, so we have some bit combinations made redundant. What is the use of this mode then? Well, it is useful in that you can use a kernal to alternate between GPRIOR = C0 and 00 hex. Then, you have a display which alternates between 80 pixels wide which you use to select your colour, and 160 pixels wide which you select one of four luminences (or 5 including chars with hi-bit set). Of course, we can do this more easily by just doing it the normal way, with Gr. 11 alternating with 15 - but this method has the advantage that it is in character mode, so a moving display (ie game) will be possible. 1 Quote Link to comment Share on other sites More sharing options...
JayoK Posted November 3, 2007 Share Posted November 3, 2007 Nice technical explanation - I really like that! Where did you get the technical specs of Antic and GTIA? Ta. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted November 3, 2007 Share Posted November 3, 2007 I leave that to Fox & Eru & Tebe & other polish coders who definitly might find such things useful? Quote Link to comment Share on other sites More sharing options...
eru Posted November 3, 2007 Share Posted November 3, 2007 What you describe is a text-mode version of CIN, known for like 10 years http://lepix.sourceforge.net/#cin Well, actually CIN is slightly different, as it interlaces two screens to avoid 'empty lines' visible where we use GTIA C0 mode. But the principle is the same. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted November 3, 2007 Share Posted November 3, 2007 What would the advantage be of using this instead of using GRAPHICS 0.9, 0.10, or 0.11 (which is what I call GRAPHICS 0 with GPRIOR set to GTIA modes 9, 10, or 11)? With those you get all 16 luminances, or all 9 register colors, or all 16 hues, so you don't lose out on the available colors. Michael Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 4, 2007 Author Share Posted November 4, 2007 The "advantage" of this mode is that it's character based (ie games) and has true 160 pixel resolution on alternate lines. I was actually preferring to recreate the mode where you get 160 pixels where you set GPRIOR =00 then 80 then 00 again to get the paletted 4 colour mode but for some reason couldn't get it to work properly, so I started playing around with this one instead. Quote Link to comment Share on other sites More sharing options...
+CharlieChaplin Posted November 4, 2007 Share Posted November 4, 2007 Hmm, so is there a) a difference in visible colors or b) in practical use when one combines Gr. 9 + Gr. 12 instead of Gr. 11 + Gr. 15 (CIN afaik)... ?!? If I remember correctly CIN uses Gr. 11 + Gr. 15 and thus produces 16 colors with 4 hues = 64 colors. How many colors are there for Gr. 9 + Gr. 12 ?!? And does this combination of gr. 9 + 12 use less CPU time than Gr. 11+15 ?!? -Andreas Koch Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 4, 2007 Author Share Posted November 4, 2007 It's visually practically the same as CIN (Gr. 11 interleaved with 15, with 15 using the 4 shades of white). But due to the way ANTIC talks to GTIA, you get a different mapping of colours than normal (refer to table in my first post). CPU time? Well, most systems that implement modes where GTIA's GPRIOR register is changed on a scanline basis use a single DLI which establishes a kernal for the duration of the display, ie - all of the cycles are used within the displayed portion. As I said before - the advantage of this mode is purely for games where character-based movement of objects is desired). Of course, the other advantage of using any mode which combines the attributes of Gr. 11 and 9 (or 15) is that Player-Missiles are still fully usable, unlike modes like HIP which can't use them properly due to Graphics 9 not allowing display of players. Quote Link to comment Share on other sites More sharing options...
Tezz Posted November 4, 2007 Share Posted November 4, 2007 What you describe is a text-mode version of CIN, known for like 10 years http://lepix.sourceforge.net/#cin Well, actually CIN is slightly different, as it interlaces two screens to avoid 'empty lines' visible where we use GTIA C0 mode. But the principle is the same. Hi Eru, are there any examples/demos of the IN8 & HR2 modes around? Quote Link to comment Share on other sites More sharing options...
eru Posted November 4, 2007 Share Posted November 4, 2007 (edited) What you describe is a text-mode version of CIN, known for like 10 years http://lepix.sourceforge.net/#cin Well, actually CIN is slightly different, as it interlaces two screens to avoid 'empty lines' visible where we use GTIA C0 mode. But the principle is the same. Hi Eru, are there any examples/demos of the IN8 & HR2 modes around? Well, IN8 is just an interlaced GR8 (320x200, 3 colors), as seen in NUMEN (intro and a woman with a snake in the demo). As for HR2 (320x200, 5 colors), I kind of stopped working on it a while ago, but just a few days ago I took a look at it again. I think it has a great potential for hi-res on Atari, but needs some more work. I have lots of conversions into HR2, but I really need to work on the conversion algorithm to make them look better. So, here go two pictures. First, by Boris Valleyo. BMP-original, D0 - no dithering, D3 - my bad bad dithering (I need to apply some 'real' stuff like Floyd-Steinberg): http://eru.nutki.com/a8/boris9901.bmp http://eru.nutki.com/a8/boris9901-D0.xex http://eru.nutki.com/a8/boris9901-D3.xex Second, by Royo (same naming): http://eru.nutki.com/a8/r7.BMP http://eru.nutki.com/a8/r7-D0.xex http://eru.nutki.com/a8/r7-D3.xex I wanted to work on it, and add hi-res to Lepix, but there are so many things happening, I just don't have time for everything And more people can use a nice game like Yoomp! than a new mode in a graphics program, right? EDIT: btw, if you watch interlaced pictures on an emulator, try to make sure your monitor refresh rate fits the emulator. On my Mac I have 60Hz refresh, and when I watch interlaced Atari in PAL (50Hz), it looks terrible. When it's NTSC (60Hz), it's a different world. Also, taking an interlaced screenshot (Atari800WinPlus has it) produces roughly what you would like to see. Edited November 4, 2007 by eru Quote Link to comment Share on other sites More sharing options...
Tezz Posted November 4, 2007 Share Posted November 4, 2007 As for HR2 (320x200, 5 colors), I kind of stopped working on it a while ago, but just a few days ago I took a look at it again. I think it has a great potential for hi-res on Atari, but needs some more work. I have lots of conversions into HR2, but I really need to work on the conversion algorithm to make them look better.I've not seen HR2 before, your early work is impresive. I agree it has great potential. Hopefully it will apear in Lepix soon And more people can use a nice game like Yoomp! than a new mode in a graphics program, right? Yes yes! Quote Link to comment Share on other sites More sharing options...
peteym5 Posted November 5, 2007 Share Posted November 5, 2007 Has anyone ever tried to use APAC mode and two character sets instead of 2 graphic 8 screens? That is graphics 9 & 11. (GPRIOR +64 & +192). I did some experimenting and a machine language DLI routine can easily run in the background to drive APAC mode over a part of the screen. I had a Turbobasic program randoming drawing characters on the screen. I can release the source code if anybody is interested. Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 5, 2007 Author Share Posted November 5, 2007 APAC in character mode is totally feasible, except: - to get full detail you'd need 8 character sets. So, it's more costly in RAM usage. - more DMA penalties in character mode means your kernal routine needs to be tightly written. I wanted to use the mode where you use GR.0, then have one scaline of colour mode (like Gr. 11) followed by a line where you wait a specific time (about 20 or so cycles after return from WSYNC) then change to GPRIOR=00, which gives the mode where PF0-PF3 determines the pixel colour, and there are 160 pixels width (like Gr. 15). Problem is that I get it running fine on a real machine, but the two versions of A800Win+ that I try it on don't give the same results. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted November 5, 2007 Share Posted November 5, 2007 The "advantage" of this mode is that it's character based (ie games) and has true 160 pixel resolution on alternate lines. Okay, I'm not trying to be a pest, I'm just trying to understand. Where does the 160-pixel resolution come from, if these are GTIA modes? As I understand it, the pixels in one of the GTIA modes are offset by 1 color clock from the other GTIA modes, so that when you mix them, the combined pixels produce a 160-pixel display, rather than an 80-pixel display. So are you saying that this is *not* the way it works when GTIA is used with GRAPHICS 0? Also, do the emulators correctly replicate this offset behavior? Michael Quote Link to comment Share on other sites More sharing options...
Rybags Posted November 5, 2007 Author Share Posted November 5, 2007 The mode I described in the first post is 160 across on alternating lines because it's Antic Mode 4 (Gr. 12). Modes which are based on Gr. 10 (GPRIOR=$80) have their pixels shifted one colour clock right, that's likely due to palette lookup delay. Emulators (well, the good ones) replicate most of the behaviour. But not all - however they are usually accurate enough to run virtually all games/demos as good as a real machine. The "combined pixels" 160 across is an illusion. Usually achieved by interlacing two screens and having the graphics modes swapping scanlines on each frame. Quote Link to comment Share on other sites More sharing options...
peteym5 Posted November 5, 2007 Share Posted November 5, 2007 What I did was alternate between 16 color and 16 luma with 2 different character sets. Ending up with pixel wide resolution. I was not looking to include antic 4 or the 9 color mode that is 1/2 pixel off. I tried not to do anything that resulted in noticeable flickering. I had not thought of a good game design that will take advantage of this yet. 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.