Synthpopalooza Posted February 3, 2013 Author Share Posted February 3, 2013 The recent New Year's Disc had a viewer I wrote, IPC viewer. The purpose of the viewer was to take the PCIN pictures I have done here, and condense them down into a file format which can be loaded and viewed at will on the Atari. Since then, I have written five different picture viewers, which will view the following new graphics formats: .IPC - ICE PCIN (Graphics 12+10 interlace, 159 x 192 pixels, no color palette changes in VBLANK, except for COLBAK, 35 colors) .IP2 - ICE PCIN+ (Graphics 12+10 interlace, 159 x 192 pixels, color palette changes on COLBAK and PF0-PF3 in VBLANK, 45 colors) .IMN - ICE MIN (Graphics 12+9 interlace, 160X192 pixels, 5 chroma x 16 lumas, or about 20 greyscale when making monochrome pictures) .ICN - ICE CIN (Graphics 12+11 interlace, 160x192 pixels, 5 luma x 16 chromas, or 80 colors) .DIN - DIN mode (Graphics 0+12 interlace, 320x192 pixels, 5 chroma x 2 lumas, 10 colors. 20 combined artifact colors possible) In the future, I will be making viewers for the following formats: .IRG (Super IRG, double Graphics 12 interlace, 160x192, no color palette changes in VBLANK, 15 colors) .IR2 (Super IRG 2, double Graphics 12 interlace, 160x192, PF0-PF3 color palette changes in VBLANK, 25 colors) .PC0 (PCIN 0 mode, Graphics 0 + 10 interlace, 320x192 pixels, 9 chroma x 2 lumas or 18 colors. 36 artifacted colors possible) .S9 (Super 9), .S10 (Super 10), .10P (Super 10+), and also HIP 0 and APAC 0 modes. Currently, only hi-res pictures can be loaded. The file formats (except for .DIN) have a provision for low-res (Antic 5) pictures, but the viewer does not implement them yet. I am also going to work on a converter which will automatically take .G2F data, from two projects, and convert to these formats. In this way it should be easy to make your own conversions. 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 3, 2013 Author Share Posted February 3, 2013 (edited) Here are the five viewers I have currently written .IPC viewer: This viewer was on the New Years Disc. It is for viewing ICE PCIN mode pictures (.IPC). This is Graphics 12+10 interlace, with no color palette changes. 35 colors are possible, at a resolution of 159x192. The ATR contains an autorun of the viewer. The ZIP file contains a number of .IPC files, including some which were not on the NYD. Copy these to your emulator's hard drive, or to a floppy. ipc viewer.atr IPC pictures.zip .IP2 viewer: This is for ICE PCIN+ pictures. PCIN + is like PCIN (Graphics 12+10 interlace) except that color palette changes are made every VBLANK to increase the color resolution to 45 colors, with a tradeoff of more flicker. ICE font files can be exported from this program, but they will not be readable in the current ICE CIN font editor, as the current version does not yet support PCIN+. Below is an ATR and a ZIP with some .IP2 files ip2 viewer.atr IP2 pictures.zip .IMN viewer This views ICE MIN (.IMN), which is a Graphics 12+9 interlace. In theory you can get 5 chroma x 16 luma, or 80 colors. However, to reduce flicker, you probably have closer to 25 usable colors in this mode. When used to view monochrome pictures, you have about 20 or 21 greyscales here. An ATR with the viewer, and a ZIP file with .IMN pictures are below. imn viewer.atr IMN pictures.zip .ICN viewer This is for ICE CIN (.ICN) pictures. Similar to the CIN bitmap mode, except you get 16 chroma x 5 luma, or 80 colors. I've noticed pictures in this mode tend to be more flickery and less defined than in the above modes. Another drawack is the lack of pure whites and greys in this mode, though this can be partially offset by blending colors from opposite sides of the color wheel (red-cyan, green-magenta, blue-yellow) Here's the ATR and ZIP file with example pictures. icn viewer.atr ICN pictures.zip .DIN viewer This is for DIN mode pictures. DIN is a Graphics 0 + 12 interlace, with appropriate color palette changes for PF1 and PF2 to keep the background constant. You get 5 chroma x 2 luma or 10 colors in this mode, but the number of colors increases to 20 if you take advantage of Graphics 0 artifact blending. ATR and ZIP files with pictures are below: din viewer.atr DIN pictures.zip Some notes: When loading a file, you NEED to specify the complete pathname (D:PIC.IPC or H:PIC.IPC for example) ICE font files (viewable in the ICE CIN font editor, or the ICE IRG editor if you are rendering a DIN font) can be rendered from these pictures. Inverse characters in these pictures will be off in the render, due to the CHACT shift the viewer uses. In the ICE font editor, you can select the character for editing, then select the GTIA mode (or Graphics 0) mask and do an INVERSE of the font mask to correct this. Only Hi-res pictures can be viewed here. I will be building low-res support in soon (except in DIN, which has no low-res mode), at the moment I am trying to work up a way to easily get low-res Antic 5 GTIA screens from G2F. It's tricky because the GTIA palette layout in Antic 5 is altered from when you use Antic 2. Maybe a function for the next .G2F? (hint, hint) Edited February 3, 2013 by Synthpopalooza 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 16, 2013 Author Share Posted February 16, 2013 Just to let you know ... The latest version of FAIL (First Atari Image Library) now has support for hi-res .IPC (ICE PCIN) pictures. It can be downloaded here: https://sourceforge.net/projects/fail/ Many thanks to the authors for including .IPC in this project. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 16, 2013 Author Share Posted February 16, 2013 Also, go here: http://fail.sourceforge.net/html5fail.html You can take most native Atari graphics formats (including .IPC), drop it into your browser window, and it will display the picture! this is cool. 1 Quote Link to comment Share on other sites More sharing options...
fox Posted February 21, 2013 Share Posted February 21, 2013 http://fail.sourceforge.net/html5fail.html got updated to support IP2, IMN, ICN and DIN. Synthpopalooza, did you get my email? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 21, 2013 Author Share Posted February 21, 2013 (edited) No I didn't ... last one I got from up was an update about February 15, but I will check again. The new FAIL does good on the new formats, except ... I am still seeing some checkerboarding on the IPC files. I think the reason this is happening, is because the IPC format (and also IP2) require the Antic 4 render to be shifted one pixel to the right to correct for the Graphics 10 pixel shift error (which happens in the HIP and RIP modes). Here's an example: It should look like this (Altirra screen capture in PAL, frame blending): If you will notice, the boots on space ace, the ship platform in the middle of the screen, and the girl's hair, all have checkerboarding. The checkerboarding is used in IPC whenever the PFx and background colors are blended together ... these colors get blended together on alternate frames and pixels, to reduce flicker. Therefore, these should be solid colors when blended, but when the Antic 4 render is not shifted right, you get checkerboarding artifacts. Hope this is of some help to you,. Edited February 21, 2013 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
fox Posted February 21, 2013 Share Posted February 21, 2013 Do you mean you do HSCROL for mode 4 in IPC and IP2? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 22, 2013 Author Share Posted February 22, 2013 Yes ... the screen is set up for horizontal scrolling, then you change the HSCROL register on the VBLANK. It should read 13 (one color clock to the right) for when the Antic 4 screen is active, and 12 (normal) for when the Graphics 10 screen is active. This makes the display line up properly. Quote Link to comment Share on other sites More sharing options...
fox Posted February 22, 2013 Share Posted February 22, 2013 Ok, corrected IPC and IP2 in http://fail.sourceforge.net/html5fail.html 2 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 22, 2013 Author Share Posted February 22, 2013 That's it. Much better, thanks. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 26, 2013 Author Share Posted February 26, 2013 Did some experimenting today with low-res PCIN pictures ... that is, PCIN using Antic 5 (Graphics 13) with Graphics 10 This is more difficult because using Antic 5 with Graphics 10 means that the palette layout is different than a normal Graphics 10 mode. You get all 9 colors but they are laid out differently due to a quirk with Antic 4/5. So where normally you would work with G2F files done in Antic 4 and Graphics 10, the Graphics 10 font file will need conversion to work with Antic 5. Specifically, PM3 replaces PM2 and PF3 replaces PF2 in inverse. So I wrote a TurboBASIC program which does the conversion: 10 DIM FN1$(16),FN2$(16),SCR$(16) 20 DIM CH$(16),CH2$(16) 30 DIM A4N$(16),A4I$(16),NORM$(7),INV$(7) 40 A4N$="" 50 A4I$="" 60 NORM$= 70 INV$=" 80 ? "SOURCE FONT: ";:INPUT #16,FN1$ 90 ? "DESTINATION FONT: ";:INPUT #16,FN2$ 100 ? "SCREEN OUTPUT FILE: ";:INPUT #16,SCR$ 110 OPEN #1,4,0,FN1$:OPEN #2,8,0,FN2$:OPEN #3,8,0,SCR$ 120 FOR I=1 TO 8 130 FOR J=0 TO 119 140 CH$="":INV=0:NORM=0:BOTH=0:ICHR=0:CH2$="" 150 FOR K=1 TO 8 160 GET #1,A:A1=A DIV 16:A2=A MOD 16 170 CH$(LEN(CH$)+1)=CHR$(A1) 180 CH$(LEN(CH$)+1)=CHR$(A2) 190 N1=INSTR(NORM$,CHR$(A1)):N2=INSTR(INV$,CHR$(A1)):IF N1 AND N2 THEN BOTH=BOTH+1:GOTO 220 200 IF N1 AND NOT N2 THEN NORM=NORM+1 210 IF N2 AND NOT N1 THEN INV=INV+1 220 NEXT K 230 IF INV=0 AND NORM=0 THEN EXEC TONORM 240 IF NORM>=INV THEN EXEC TONORM 250 IF INV>NORM THEN EXEC TOINV:ICHR=1 260 EXEC TOA4 270 FOR K=1 TO 8:N=(K*2)-1:PUT #2,ASC(CH2$(N,N))*16+ASC(CH2$(N+1,N+1)):NEXT K 280 PUT #3,J+128*(ICHR=1) 290 NEXT J 300 FOR J=120 TO 127:FOR JJ=1 TO 8:GET #1,A:PUT #2,0:NEXT JJ:NEXT J 310 NEXT I 320 CLOSE 330 END 340 PROC TONORM 350 FOR II=1 TO 8 360 A=ASC(CH$(II,II)) 370 IF A=3 THEN A=0:CH$(II,II)=CHR$(A) 380 IF A=7 THEN A=6:CH$(II,II)=CHR$(A) 390 NEXT II 400 ENDPROC 410 PROC TOINV 420 FOR II=1 TO 8 430 A=ASC(CH$(II,II)) 440 IF A=2 THEN A=8:CH$(II,II)=CHR$(A) 450 IF A=6 THEN A=7:CH$(II,II)=CHR$(A) 460 NEXT II 470 ENDPROC 480 PROC TOA4 490 FOR II=1 TO 16 500 IF ICHR THEN A=INSTR(A4I$,CH$(II,II))-1 510 IF NOT ICHR THEN A=INSTR(A4N$,CH$(II,II))-1 520 IF A<0 THEN A=0 530 CH2$(LEN(CH2$)+1)=CHR$(A) 540 NEXT II 550 ENDPROC Lines 40-70 use control chars which look like this: What the program does, is read 8 bytes from the font file, analyze the colors, determine whether it should be an inverse or normal char, substitute the appropriate colors to avoid inverse conflicts, then write the data to the output font and the screen char map. So, the steps to do PCIN lo-res are as follows: 1. Size your source picture to 320x96 pixels 2. Load into G2F, select Antic 4 at 40 bytes 3. Select 2x2 dither, sort colors, resize, and pick the best 4 colors. 4. Save All 5. Load your source into Atari Interlace Studio and select Graphics 10 6. Order your colors so that PF0-PF3 match the Antic 4 render, then save. 7. Load into G2F, select Graphics 10 at 40 bytes. 8. Save All 9. Run the above program, input your graphics 10 font file and your output filenames, Lines 370-380 and 440-450 are critical. They choose the color to substitute should an inverse and normal color appear in the same char cell. You can change these, but you want to select a substitute color which closely matches the one you are replacing, As a test, I did a low-res conversion of this picture: Here is the result (reading the top 1/2 of the bitmap only): SWEMP-TEST-antic5.obx SWEMP-TEST-antic5.asm Now that we can do GTIA mode conversions in low res, this means other modes (CIN, MIN, HIP, and others) are possible in low-res Antic 5. Next step will be to implement this into IPC viewer. It would be a welcome addition to G2F, to be able to natively render GTIA pictures using Antic 4/5. (hint hint Tebe) Quote Link to comment Share on other sites More sharing options...
Grevle Posted February 26, 2013 Share Posted February 26, 2013 Hello. i not able to get the wievers to work when using emulator altirra, i tried copied some image files to disk and also to put some on the h: device but im not able to load any image. i use like d:rio.din or h:rio.din but theres something im doing wrong since no image is loaded, when i try using the Directory feature of the viewer nothing comes up. Im probably doing something wrong here or there is some wrong setting in altirra. Quote Link to comment Share on other sites More sharing options...
Grevle Posted February 26, 2013 Share Posted February 26, 2013 The emulator was not properly set on the hardisk setting. Its working now Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 26, 2013 Author Share Posted February 26, 2013 Today I did a picture using MIN lo-res ... Graphics 12 and Graphics 9 using Antic 5. As with the other modes, the color layout for Graphics 9 using Antic 5 has been altered. Here is a table Color pattern: Normal color: Inverse color: 0000 0 0 0001 0 0 0010 1 1 0011 2 3 0100 0 0 0101 0 0 0110 1 1 0111 2 3 1000 4 4 1001 4 4 1010 5 5 1011 6 7 1100 8 12 1101 8 12 1110 9 13 1111 10 15 Entries in bold are colors which change with inverse characters. As you can see, you get 9 shades per char, 14 shades total in this mode. You lose out on shades 11 and 14. This makes converting hi-res Graphics 9 pictures into Graphics 13.9 tricky. An algorithm has to be used to sort the colors, eliminate all 11's and 14's, and determine whether the character will be inverse or normal. After the sorting algorithm, here is an example min-lo res picture. It looks very good after the conversion, I think: park-min-test.obx My next attempt will be lo-res HIP ... monochrome Graphics 9 + 10, using Antic 5. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted February 26, 2013 Share Posted February 26, 2013 Are you considering a PC program for doing these image conversions? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 27, 2013 Author Share Posted February 27, 2013 That would be ideal, though my PC programming skills are not yet up to par. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 28, 2013 Author Share Posted February 28, 2013 The HIP experiment was a bust ... it's hard to get the luminances in mode 13.10 and 13.9 to match up. Another successful experiment though ... CIN pictures in lo-res. CIN lo-res basically will let you display 60 colors, at Graphics 7 resolution. Here's the original: This is a perfect CIN picture, as there are lots of colors, and few whites. So I resized this into 320x96, exported a Graphics 11 and an Antic 4 render using G2F. Using CIN lo-res, as with MIN lo-res, requires the usage of ANTIC 5 for both renders, which means the Graphics 11 bitmap has to be converted into Graphics 11/Antic 5, a hardware mode I have named Graphics 13.11 Converting from Graphics 11 to Graphics 13.11 works like with Graphics 9. Here's a color chart: The above color chart is based off the NTSC palette, the PAL palette moves the colors one space right on the color wheel. As before, patterns 0011, 0111, 1100, 1101, 1110, and 1111 have different values for inverse characters. You get 9 colors per char cell, and 14 total available. Again, colors 11 and 14 are absent, so the color sorting algorithm has to first eliminate these and replace them with colors 10 (12 for inverse) and 15. The colors are counted in each character cell for dominance, and converted to inverse or normal values as required. This is the result: tears-cin-test.obx Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 28, 2013 Author Share Posted February 28, 2013 (edited) Next: The same picture in PCIN+ low res Antic 5 Like it's hi-res counterpart, PCIN+ allows for 45 colors onscreen at Graphics 7 resolution, alternating a normal Antic 5 screen (or Graphics 13) with a Graphics 10 setting (or Graphics 13.10). As before, a color sorting algorithm is needed, however the ordering of the Graphics 10 palette is required to ensure adequate substitute colors. In this case, I swapped the PM1-PM2-PM3 registers. The new ordering allows for COLPM2 (green) to swap with COLPF3 (dark blue) and COLPM3 (yellow) to swap with COLPF2 (orange) whenever there are any inverse conflicts in the Graphics 13.10 sorting algorithm. Remember, PM2 and PF2 cannot exist in the same color cell as their inverse counterparts PM3 and PF3 when using Graphics 13.10. Here is the result. tears-test-antic5-pcin2.obx You will notice right away the picture flickers less than in CIN mode. This, and the presence of solid white, is one of the primary advantages of PCIN+, even with the lowered color resolution. This picture was optimised for the NTSC palette. If you are using PAL, adjust the tint control for your monitor to compensate. Edited February 28, 2013 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted March 1, 2013 Author Share Posted March 1, 2013 (edited) By comparison, the same picture, just for fun, rendered in PC0: tears-pc0.obx This is basically a hi-res Graphics 0 (320 pixel) mode, but with Graphics 10 acting as the color RAM. To do this render, I had to take the original into GIMP, and desaturate it down to two colors. PMG overlays can possibly be used here to reduce flicker in some areas of the picture. The same picture could also be taken into a bitmap setting with Graphics 10 and 8, using scanline interlace, to reduce the flicker even further. The excellent artist who did the original painting has a deviantart website here: http://dokon.deviantart.com/ Edited March 1, 2013 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
Grevle Posted March 3, 2013 Share Posted March 3, 2013 Im impressed with the work on these graphics modes,it would be nice to see some of these modes coming to use perhaps as title screens for games or maybe a awesome adventure game of some sort. And also if there was a image editor for windows that could create images for these modes , That would be awesome.. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted March 4, 2013 Author Share Posted March 4, 2013 (edited) I had thought about putting it by the MadTeam boys about including support for IPC, IP2, ICN, IMN, the GTIA formats, and the two Super IRG formats, in Atari Interlace Studio ... or doing up my own native graphic editor on the Atari. The nearest thing we have to it, as of now, is doing each font set in ICE CIN editor. The only drawback is, if you are using low-res Antic 5, you can't do screenmap mixing ... i.e. mixing PF2 and PF3 or other forbidden color combos in the same character cell. These pictures would work very well in Graphics adventures, but I think it would require a special format that allows for character set optimization ... that is, repeating duplicate characters. Where you would normally use 8 fonts for a whole screen, this could be cut down to maybe about 5 or 6 ... or half that if you use low-res. For the ICN format, there is a partial solution, when doing your own art: Use Atari Interlace Studio in CIN mode (or your own native CIN graphics program on the Atari), then export both a Gr. 11 render and a MIC 4-color graphics 15 render. You can then easily take both of these into Graph2Font, then mess with the Graphics 15 render and change around some of the PF2's into PF3's to use 5 colors. The uncompressed font sets, graphics 15 color palette, and the Antic 4 inverse screenmap can then be either assembled into a .ICN picture file, or using my own source, into a .XEX executable. This would only be feasible for hi-res ICN though, as the low-res uses a different Graphics 11 layout. Edited March 4, 2013 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted March 5, 2013 Author Share Posted March 5, 2013 (edited) Two new viewer releases: .IRG Viewer This is for viewing Super IRG pictures. This is a doubled Antic 4/5 screen, with no color palette changes between screens. This allows for 15 colors onscreen at once. While less than the PCIN and CIN modes, the pictures are more sharply defined, and the picture flickers a lot less due to the checkerboard dithering that can be used here. Viewer is below, plus a ZIP file with sample pictures irg viewer.atr IRG pictures.zip .IR2 Viewer This is for Super IRG+ pictures. This is a modification of Super IRG that introduces color palette changes for PF0-PF3 between screens. This increases your color resolution to 25 colors, but with the tradeoff of more flicker. The ATR is below, along with a ZIP containing sample .IR2 pictures ir2 viewer.atr IR2 pictures.zip As with the other viewers, only hi-res is supported right now. Also, as before, ICE fonts (which can be loaded into the ICE IRG font editor) can be generated from these pictures, but as these pictures use screen-swapping, any characters which mix PF2 with PF3 in the same cell (that is, inverse with normal char cell) will not display properly in the ICE editor, which does not support this feature. Next step: GTIA modes. Edited March 5, 2013 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
fox Posted March 20, 2013 Share Posted March 20, 2013 Added IRG and IR2: http://fail.sourceforge.net/html5fail.html Quote Link to comment Share on other sites More sharing options...
Grevle Posted March 20, 2013 Share Posted March 20, 2013 This is what is so amazing about the Atari 8 bits. After all these years still new ways of using its graphic capabilities is being discovered, and with very good result i must say. Its interesting to think of what these new modes can be used for. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 18, 2013 Author Share Posted June 18, 2013 Been awhile, most of my time has been taken up doing the music for the Atari 7800 game "Bentley Bear: Crystal Quest" but I am still playing around with the ICE modes. As this year is the 50th anniversary of Doctor Who, I thought I'd post a conversion I did ... also added some POKEY music to it as well. Enjoy! This is in MIN mode, Graphics 12+9 with 5 chroma x 16 lumas drwho-logo-and-music.atr 1 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.