Jump to content
IGNORED

Doing pictures using Super IRG 2 and other ICE modes.


Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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.

 

post-23798-0-59379300-1359859301_thumb.png post-23798-0-12323200-1359859324_thumb.png post-23798-0-86252700-1359859375_thumb.png post-23798-0-44438700-1359859415_thumb.png

 

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+.

 

post-23798-0-30989100-1359859571_thumb.png post-23798-0-56337600-1359859601_thumb.png post-23798-0-16680800-1359859630_thumb.png post-23798-0-23047500-1359859699_thumb.png

 

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.

 

post-23798-0-05539100-1359859877_thumb.png post-23798-0-98632100-1359859893_thumb.png post-23798-0-99348700-1359859937_thumb.png post-23798-0-83643000-1359859968_thumb.png

 

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)

 

post-23798-0-16314900-1359860090_thumb.png post-23798-0-14395500-1359860117_thumb.png post-23798-0-75729900-1359860260_thumb.png post-23798-0-57206000-1359860276_thumb.png

 

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.

 

post-23798-0-33042000-1359860575_thumb.png post-23798-0-37339300-1359860589_thumb.png post-23798-0-03247000-1359860599_thumb.png post-23798-0-51628400-1359860610_thumb.png

 

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 by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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:

 

post-23798-0-13778900-1361474400_thumb.png

 

It should look like this (Altirra screen capture in PAL, frame blending):

 

post-23798-0-90655400-1361474688_thumb.png

 

 

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

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:

 

post-23798-0-06321000-1361843940.png

 

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:

 

post-23798-0-55124400-1361844014_thumb.png

 

Here is the result (reading the top 1/2 of the bitmap only):

 

post-23798-0-07625100-1361844204_thumb.png 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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

 

post-23798-0-15123000-1361909712_thumb.png park-min-test.obx

 

My next attempt will be lo-res HIP ... monochrome Graphics 9 + 10, using Antic 5.

Link to comment
Share on other sites

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:

 

post-23798-0-69070500-1362091217_thumb.jpg

 

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:

 

post-23798-0-11850300-1362091093_thumb.png

 

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:

 

post-23798-0-90003500-1362091137_thumb.png tears-cin-test.obx

Link to comment
Share on other sites

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.

 

post-23798-0-05239900-1362095678_thumb.png 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 by Synthpopalooza
Link to comment
Share on other sites

By comparison, the same picture, just for fun, rendered in PC0:

 

post-23798-0-42271100-1362099241_thumb.png 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 by Synthpopalooza
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Two new viewer releases:

 

.IRG Viewer

 

post-23798-0-50467100-1362461414_thumb.png post-23798-0-86539000-1362461437_thumb.png post-23798-0-50593500-1362461491_thumb.png post-23798-0-32359000-1362461524_thumb.png

 

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

 

post-23798-0-92476300-1362461379_thumb.png post-23798-0-38761600-1362461397_thumb.png post-23798-0-68759300-1362461471_thumb.png post-23798-0-60839700-1362461507_thumb.png

 

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

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 2 months later...

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

 

post-23798-0-27251200-1371527898_thumb.png drwho-logo-and-music.atr

  • Like 1
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...