Jump to content
IGNORED

Doing pictures using Super IRG 2 and other ICE modes.


Recommended Posts

Brand new experiment!

 

Mode M0 (called MIN 0 in the ICE CIN editor) is a blending of Graphics 0 with Graphics 9. Done properly, this yields 32 shades at roughly 320 pixel resolution.

 

This is not without problems, as you are having to blend the pixels at a 4 to 1 ratio.

 

This is a picture rendered in this mode. The Graphics 0 render was taken into GIMP, and reduced to two-bit (white black) mode, and dithered using Floyd Steinberg. The picture is then blended with a Graphics 9 render.

 

This picture is approximately 32 shades, though the Floyd Steinberg dither on Graphics 0 blurs the picture a bit. When viewed on a TV or RGB monitor, there will be artifacts introduced to the picture through the Graphics 0 render. It looks better when viewed in the emulator or on an S-video system.

 

Other GTIA modes (Graphics 11 and 10) should also look good when blended with Graphics 0 renders done in this manner.

 

post-23798-0-22578000-1372574645_thumb.png bridge - m0.atr

Edited by Synthpopalooza
Link to comment
Share on other sites

A Floyd-Steinberg dithering experiment, only now using the ICE PC0 mode.

 

This mode, which I have shown earlier, is a blending of Graphics 0 and Graphics 10. You get about 18 colors here at 320 pixel resolution, with the necessity of altering the PF1 and PF2 registers every VBLANK to maintain the display, as well as doing HSCROL tricks to make sure the display lines up properly.

 

This is the original picture:

 

post-23798-0-00080000-1372608909_thumb.png

 

To render this properly requires two phases. First, for the Graphics 10 render, I had to take the picture into GIMP, and posterize it so that the color variance would show up well in the 9 colors of Graphics 10. For the graphics 0 render, I used GIMP again, and this time I reduced the picture to two colors and use Floyd Steinberg dithering. I also had to invert the picture, a necessary step for G2F to display the render correctly.

 

This is the result. Again, it looks better on a monitor equipped to display 320 pixel graphics without artifacting ... hi-res artifacts will muddy the picture a bit.

 

post-23798-0-77691500-1372608917_thumb.png rainbow glasses - pc0.atr

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

One more PC0 picture.

 

The original:

 

post-23798-0-92712400-1372610950_thumb.png

 

PC0 render:

 

post-23798-0-25637200-1372610926_thumb.png rainbow eye - pc0.atr

 

This time, I made a more even balance of the greyscales (there are 4) and the remaining 5 colors for the rainbow texture in the eye. The blend is really much better and shows off more what is possible. This time the Graphics 10 render was done in AIS, while the Graphics 0 render is still in GIMP using Floyd Steinberg

Link to comment
Share on other sites

One more ...

 

This time, I used C0 mode (or CIN 0 as it is called in the ICE editor) ... this time it is a blending of Graphics 0 with Graphics 11 (16-chroma) mode. One difference here, is that Graphics 11 has only black and 15 other chromas, so unlike PC0, C0 pictures do not lend themselves well to pictures depending on whites and greys.

 

The original:

 

post-23798-0-99083000-1372612898_thumb.png

 

C0 render:

 

post-23798-0-42601200-1372612880_thumb.png rainbow roses - c0.atr

 

As before, the Graphics 0 render was done in GIMP using Floyd Steinberg dithering, but this time I put the PF settings to mid grey to better blend with the graphics 11 render.

Edited by Synthpopalooza
Link to comment
Share on other sites

Floyd Stinberg dithering also works well when using the DIN mode ... by blending Graphics 0 hi-resolution with Antic 4 (Graphics 12). This method tends to work best when you have source images that have a very limited number of source colors.

 

As always, the source image should be resized to 320x192 first. Make sure G2F is in normal mode, 2x2 pixels. For the Antic 4 render, you load the image into G2F, tick the Hresize, Sort Colors, and 2x2 dither options. You will also want to play around with the color settings until you get an image that looks nice. Check "Standard" under options, then click the icon on the top right to save .FNT and .SCR maps

 

For the Graphics 0 render, you load the resized image into GIMP, select Image: Mode: Indexed, and choose a binary palette with Floyd Steinberg dithering. Then after the dither, select Colors: Value Invert to render a negative image, this is necessary so that G2F will process the image correctly. In G2F select normal width, 1x1 pixels, and import the picture. Then export .SCR and .FNT files

 

Here are two pictures I did, themed for the 4th of July. :)

 

post-23798-0-45796200-1372873690_thumb.png post-23798-0-82376400-1372873709_thumb.png us flag - din.atr

 

post-23798-0-44875800-1372873726_thumb.png post-23798-0-64958000-1372873739_thumb.png statue of liberty - din.atr

  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...

My techniques are improving. PCIN and PC0 are, to me, the best two ICE modes for converting most pictures. I've tried some new techniques, with super results.

 

Here's the original picture.

 

post-23798-0-75546600-1375683917_thumb.jpg

 

I load this picture into GIMP, to start with.

 

My first step is of course to posterize this picture down to the Atari 128 colors. What I do is resize the picture to 160x192 (Graphics 12 resolution), then posterize using Floyd-Steinberg dithering. This makes the picture look less washed out. Then reduce the image to 5 colors. This is what you get:

 

post-23798-0-28817800-1375683953_thumb.png

 

For the Graphics 10 render, same as above but resizing the picture to 80x192 (Graphics 10 resolution) and reducing the image to 9 colors. The result:

 

post-23798-0-06261000-1375683978_thumb.png

 

For Graphics 0, the original picture is converted to 1-bit (2 color) mode using Floyd-Steinberg dithering. The result:

 

post-23798-0-20180900-1375683999_thumb.png

 

The image is negatived, because I had to do a value invert. This is necessary because of the funny way Graphics 0 handles the colors.

 

For the PCIN render, both the resultant images are loaded into G2F, resized, then the color palette has to be rearranged in Graphics 10 so that all the PF0-PF3 and BAK colors match the Graphics 12 render.

 

Here are the resultant pictures, plus executables.

 

post-23798-0-71489400-1375684028_thumb.png dolphins-pcin.obx dolphins-pcin.asm

 

post-23798-0-86504300-1375684049_thumb.png dolphins-pc0.obx dolphins-pc0.asm

 

The flicker on these is really not bad at all on NTSC. I'd be interested in seeing what results are gotten on a PAL Atari. The PC0 render will look better on an Atari without artifacting (S-video or other high res connection).

 

I really can't choose which one I like better. The PCIN has better coloring, but the PC0 render looks nice because of the high resolution.

  • Like 2
Link to comment
Share on other sites

  • 6 months later...

Did some hacking around in MADS, with some code that 1NG gave me awhile back, when he was doing an implementation of the ICE CIN mode ...

 

I now have MADS assembly code for generating .XEX from any hi-resolution .IPC (ICE PCIN Graphics 12+10) picture file.

 

It should be easy to modify this code to work with the other ICE picture file formats. the source code reads the font data for both screens, the color register data (9 colors), and also the Antic 4 screen map. Only one screen map is needed, a flip of the CHACT register to kill inverse on the Graphics 10 side completes the display.

 

Source code and .xex are below. Now you can display .IPC pictures in your own programs. :) Next step is to automate the creation of .IPC files from source G2F font data, screenmaps, and color data. Currently I have to do these by hand. Tedious work.

 

This is a picture from earlier in this thread, converted from Commodore 64

 

post-23798-0-00962600-1393658449_thumb.png

pilgrims2.asm

pilgrims2.obx

 

Edited by Synthpopalooza
  • Like 2
Link to comment
Share on other sites

  • 3 months later...

OK, here's an interesting demo: 1024 colors per scanline in Graphics 9.

 

How?

 

Well, the Super 9 mode in and of itself blends two Graphics 9 screens while changing the COLBAK register, making for 256 duotone shades. This much we know ...

 

However ... there is a quirk in Graphics 9, so that when you set the GTIA to combine the four PMG missiles into a single player, they all take on the color in PF3 (711). They ALSO blend with the playfield in Graphics 9 ...

 

So, if we also flip PF3 with two different values than what we are using for BAK, we then get two palettes of 256 colors onscreen (512). Cool. :)

 

But where am I getting 1024? Well, it seems, that if you add the HPOS registers for some of the missiles into the mix, and have them switch position each vblank, it essentially creates two flickering missiles. So when the switch on alternate frames, you are getting one of the colors for COLBAK, blending with PF3 on alternate frames. This gets you two extra 256 color palettes, making for a total of 1024 colors onscreen at once!

 

I have done a palette test demo below. A sample ICE font is printed to the screen. I have set the GTIA register to Graphics 9 with 5th player enabled, and all missiles set to maximum width. The first two missiles are set to flip horizontal positions while the last two remain stationary. You can see the extra colors generated in bands down the screen.

 

Combining this with DLI's to change the horizontal position of missiles down the screen, means that extra colors can be added to Super 9 screens virtually anywhere on the screen, with a limitation of coverage of 8 GTIA pixels per color band per horizontal line.

 

This is of course, full frame flicker, but on a modern LCD screen, I am told, there is no flicker.

 

Screenshot and demo is below. Run the program D:SUPER9.TUR

 

Next step: Try to incorporate this into an actual Super 9 picture. This will be tricky as there are lots of possible color combinations to choose from.

 

post-23798-0-71803700-1404107122_thumb.png super 9 1024 colors demo.atr

Link to comment
Share on other sites

Did a little more work tonight, and we now have MADS .asm code for taking .IMN (ICE MIN Graphics 12+9) picture files, and converting into .XEX executables. As with the .IPC code a few posts above, it reads the font, screen, and color data from the appropriate places in the file. There is only one screen map, so a setting on CHACT kills inverse when the screen flips to Graphics 9.

 

Here is source code, plus executable and source .IMN file, in a zip file. A study of the ASM code should show how the .IMN file is structured. To compile your own, just replace "whales.imn" with your own .IMN filename.

 

post-23798-0-79855800-1404288221_thumb.pngwhales3.zip

 

Still to work on, is a TurboBASIC program to automate the conversion process from G2F files into .IPC, .IMN, and the other ICE picture formats currently working. For PCIN files, I have worked out that I will need .FNT files from both Graphics 10 and 12 renders, a .COL file from the Graphics 12 render, a .PMG file from the Graphics 10 render, and the Graphics 12 .SCR screenmap. It seems that the .PMG file stores the first four PMG colors, repeating each one 256 times. Similar with the .COL file for the PF registers. This will prove helpful!

  • Like 1
Link to comment
Share on other sites

Until I can get my IPC maker automated, I will give you my own TurboBASIC tool for making IPC files from G2F files. It is not totally automated, it will require entering in some data by hand.

 

So, basically, here are the steps to convert any picture to .IPC

 

First, find a source file. For IPC you maybe want a picture that uses about 35 to 40 colors. Anime screenshots, and Commodore 64 pictures seem to work well, as do Atari ST or Amiga pictures.

 

Next step, is to load the picture into your favorite picture editor, and scale it to 320x192 pixels, and save as a PNG to avoid color loss.

 

You will need to generate a Graphics 10 and a Graphics 12 render.

 

For Graphics 12, first select 2x1 pixels in G2F, and normal width.

 

Load the picture into G2F. On the box that comes up on the bottom, tick 5th colors, sort colors, and 2x2 dither. You may need to play around with the colors until you get a nice looking render.

 

post-23798-0-28545900-1404291153_thumb.png

 

Then do Options: Standard to make this into a standard .SCR render without optimizing. Save the G2F, choose a filename using "12" (I chose PILG12.G2F).

 

Click the "Save All" button to generate PILG12.SCR and PILG12.FNT files, these are what you will need for the TurboBASIC render program.

 

Next step is Graphics 10. There are two ways to do this, you can either load the picture into the GIMP, and use the indexing function to reduce the picture to 9 colors from the Atari palette, or you can load the picture into tebe's Atari Interlace Studio, choose Graphics 10, and play around with the colors until you get something that looks nice, then save a .G10 file. Remember, you want to have the same PF colors for this picture as you have in the Graphics 10 render.

 

post-23798-0-26034000-1404291195_thumb.png

 

Fire up another instance of G2F, select 9C, 4x1 pixels, normal width, and load the picture you just created. For this step, it is helpful to have the other G2F with the Graphics 12 render open, for comparison.

 

post-23798-0-84913600-1404291406_thumb.png

 

Now, go into Image: Change colors. A dialog box with all the colors in the picture comes up. You want to swap colors, so that COLOR0 to COLOR3 match the same colors in the Graphics 12 register. The same colors (or close) should be used in both renders for the PF registers. It will be helpful to go into the other Graphics 12 G2F render and do Edit: Colors to bring up the palette display so that you can be sure they match up.

 

Next, arrange the BG color through swapping, so that PM0 (background) matches the background color in the Graphics 12 render.

 

Once this is all done, as before, go to Options: Standard to make a standard SCR file. Save the G2F (here I chose PILG10.G2F). Save All, to make PILG10.FNT and PILG10.SCR files

 

You have the files you need, but keep both G2F instances open. Copy these files onto the folder you use for Altirra's H: device

 

Boot with the .ATR attached to this post and LOAD "D:IPCMAKER.TUR".

ipc maker.atr

 

 

 

These are the lines you will need to edit:

1019 OPEN #2,4,0,"H:FILE10.FNT":OPEN #1,4,0,"H:FILE12.FNT" 

... of course replace these with your .FNT files. The first one should be the PILG10.FNT render, the second should be PILG12.FNT

2001 OPEN #1,4,0,"H:FILE12.SCR":BGET #1,DPEEK(88),40*24:CLOSE #1
2002 OPEN #1,4,0,"H:FILE10.SCR":BGET #1,ADR(S$),40*24:CLOSE #1

The screen files go in here. Put the PILG12.SCR filename in line 2001, and the PILG10.SCR filename in line 2002

1200 POKE 1068,CB41:POKE 1069,CB42:POKE 1070,54:POKE 1071,0:POKE 1072,CB51:POKE 1073,CB52
1201 POKE 1074,CB61:POKE 1075,CB62:POKE 1076,CB71:POKE 1077,CB72
1202 POKE 705,160:POKE 706,38:POKE 707,58:POKE 708,62:POKE 709,40:POKE 710,2:POKE 711,14:POKE 704,54

This is where it gets tricky. You are going to need to go back to your G2F Graphics 10 render, do EDIT:Edit Colors, and click into each color bar to get the appropriate value to enter into the lines above.

 

 

post-23798-0-30829200-1404291678_thumb.png

 

 

If you are converting this to a NTSC machine, you will need to step your chromas up by one when figuring values (add 16 to your value) unless it is monochrome. This is easily done by clicking into the color below your current one on the G2F "SELECT COL*" dialog.

 

In line 1200, you will be putting the Background color (PM0) into register 1070, and Graphics 10 color #9 (BAK) into register 1071

In line 1202, put in the rest of the colors normally.

5000 OPEN #1,8,0,"H:FILENAME.IPC"

This is of course your output filename. Change this to whatever you want, with an .IPC extender. You can use D: if you want to write this to an .ATR

 

Once this is done, run your program. This will take awhile, so you will want to engage the Warp Speed on your emulator while it runs. It will load all the files, and then do an automatic dithering of the PF0-PF3 and BAK registers where they blend on both renders. It is this process which takes the most time. When it is finished, you will see disk access as the IPC file is being written to your H: device (or your floppy if you so chose). Once this finishes, you can hit F5 (RESET) to exit the program.

 

The dithering routine begins at line 3000. You can place a GOTO 5000 before this if you want to skip this routine.

 

The resulting IPC file can now be viewed in IPC viewer, or using the .asm code a couple of posts above, converted into .XEX:

 

post-23798-0-76108900-1404291871_thumb.png

 

I have also done programs for converting G2F's into most of the hi-res ICE formats, tho the steps will vary somewhat depending on which mode you use. These programs are mostly a modification of this one. A future step will be the total automation of this process, where the color data is read automatically from .PMG or .COL files generated in G2F.

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

Today, the same process as above, for MIN mode (.IMN) pictures.

 

These are remarkably easier to deal with than PCIN mode, for two reasons: First, no color registers have to be swapped, and you only have the PF and BAK registers (5 in total) to worry about. Second, is that no fancy tricks have to be done with HSCROL to get the graphics to line up properly, unlike PCIN, which has the Graphics 10 pixel shift quirk.

 

This mode is recommended for monochrome pictures, or for photographic quality pictures which have lots of shading, but only have about 5 chromas in them.

 

For this example, I will be using this picture from earlier in the thread:

 

eye-brow.png

 

(ignore the text at the bottom, it is in the original picture)

 

So, what is needed, again, is to load the picture in your favorite picture editor, crop out the text at the bottom, resize to 320x192 and export a PNG file.

 

Now, since we are doing MIN, we need a Graphics 12 render and a Graphics 9 render.

 

As before with Graphics 12 PCIN, you can either load the picture into G2F, or into the GIMP and reduce it to 5 greyscale before loading the picture into G2F. You may need to try both methods, but you are looking for a source picture that has good contrast with a minimum of PF2/PF3 conflicts.

 

post-23798-0-57971600-1404362757_thumb.png

 

As before, choose 2x1 pixels, and normal width. When you load the picture into G2F, in the dialog box, select greyscale, 5th colors, and 2x2 dithering. As this is a monochrome picture, you will need to play with both the "Sort Colors" setting, and the different color settings, until you come across something which looks decent.

 

One important note: It is CRUCIAL that you have the G2F so that the background color 0 is on BAK. If it is on PF0 or PF1, then you will need to swap the registers. If it is on PF2 or PF3, you cannot use that render, because swapping one of these with the BAk register will make ugly PF2/PF3 artifacts. In this case, you may need to either play with "Sort Colors", or re-render the picture in GIMP using more greyscales until you can get a G2F that allows you to place the background color on "BAK".

 

When you are happy with the result, do "Options: Standard" to turn off optimization, and save the G2F using an appropriate filename (I used "eye12.g2f"). Then, as before, SAVE ALL to write EYE12.SCR and EYE12.FNT. Keep this G2F window open.

 

Now for the Graphics 9 render. This is VERY easy. Select 4x1, normal width, and 16G settings, then load the picture.

 

post-23798-0-17100400-1404362769_thumb.png

 

In the dialog box that comes up, simply select "greyscale".

 

Then, Options: Standard, and save the G2F using a filename like EYE9.G2F. Do SAVE ALL to make EYE9.SCR and EYE9.FNT

 

Below is an ATR for IMN Maker. Boot this and RUN D:IMNMAKER.TUR

 

Here are the lines you will need to modify:

1018 OPEN #1,4,0,"H:FILE12.SCR":BGET #1,ADR(S1$),40*24:CLOSE #1
1019 OPEN #1,4,0,"H:FILE9.SCR":BGET #1,ADR(S2$),40*24:CLOSE #1
1020 OPEN #1,4,0,"H:FILE12.FNT":BGET #1,CHBAS,1024
1021 OPEN #2,4,0,"H:FILE9.FNT":BGET #2,CHBAS+1024,1024

Replace with EYE12.SCR, EYE9.SCR, EYE12.FNT, and EYE9.FNT respectively.

 

Next:

1202 POKE 708,10:POKE 709,14:POKE 710,4:POKE 711,8:POKE 712,0

As before, go back to the EYE12 g2f, and do EDIT:EDIT COLORS to bring up the color palette box:

 

post-23798-0-20341100-1404362778_thumb.png

 

You will need to go through, and copy the color settings into line 1202 where they go.

 

The next bit is tricky. Like in PCIN, you can dither the colors to reduce flicker, if you are making a monochrome render. How this works is, pairs of pixels in the Graphics 12 render can interchange when they mix with the same shade pixels in Graphics 9. This makes a checkerboard pattern (like in PCIN and Super IRG) that reduces flicker. This method ONLY works for monochrome MIN renders.

 

Here is the line you need to modify:

 

post-23798-0-56200700-1404361960_thumb.png

 

There are three variables here. The first one, G12$, contains the atascii representation of the pixel settings for each color. In this case, color patterns 0000 (background), 0101 (pf0), 1010 (pf1), 1111 (pf2 or pf3 when inversed). Leave this alone.

 

The changes we want to make are to the two instances of G10$ in line 4035. The first instance is for when PF2 is in use, and the second (after the IF-THEN statement) for when PF3 (inverse) is active. Like before, this contains the ATASCII representation of the pixel settings in graphics 9 that correspond with the color register in Graphics 12. In this case:

 

* The first character is always zero (heart) because the background in MIN is always of zero luminance.

* The second character is ATASCII 10. This is because the Graphics 12 render uses a luminance of 10 for Color 0 (PF0).

* The third character should be ATASCII 14, because again, in the Graphics 12 G2F, Color 1 (PF1) is 14

* The fourth character is ATASCII 4, as the corresponding value for Color 2 (PF2) is 4.

* The second instance of G10$ for inverse characters (after the IF-THEN statement) is the same as the first, except that you are changing the last character

to ATASCII 8, because PF3 in the Graphics 12 render is a value of 8.

 

If you want to skip this part of the program, put in a GOTO 5000 statement before line 3000. This should be skipped if you are doing a color MIN render.

 

The last line to modify, as before, is line 5000, with the filename you want to save to. Be sure to use a .IMN extender.

 

Make sure all the SCR and FNT files have been copied to your H: device, then run the program. Set your emulator to Warp Speed, as the computing of dither pairs takes awhile. When the disc access lights up again, your IMN file has been written. The FNT and SCR files have all been included on the ATR for you to examine.

post-23798-0-74045500-1404364442_thumb.pngeye min picture and code.zip

 

 

It can now be viewed in IMN viewer, or converted to .XEX using the asm code in the previous post. The ZIP file contains EYE.IMN, the XEX file, the ASM source, and also the two source G2F's that were used to make this picture.

 

A color counting algorithm shows that this picture has about 20-21 greyscale. While less than HIP mode pictures, the picture is more sharply defined.

(EDIT: GIMP reckons this picture has 42 greyscale. I don't know how accurate this is, I can count about 20 in this picture)

 

Again, a future verson of this program will automate this process. The only other external file needed will be a .COL file for the graphics 12 render, which has the color data for the 5 color registers.

 

For future posts, I will show the process for .ICN (CIN mode 70 colors), .IRG (Super IRG 15 colors) and .IR2 (Super IRG+ 25 colors).

Edited by Synthpopalooza
Link to comment
Share on other sites

A few more MIN pictures, made using the method above, along with source G2F's, XEX and ASM.

 

post-23798-0-76909600-1404367443_thumb.png rocks and stream.zip

 

post-23798-0-86472100-1404367451_thumb.png 57 chevy.zip

 

post-23798-0-80308800-1404367464_thumb.png mount rushmore.zip

 

The Mount Rushmore picture is not monochrome, and uses no dithering.

 

The dithering effect is really shown well on the 57 chevy picture. The dithering occurs in the clouds and on the door of the chevy car, which helps reduce the flicker considerably.

 

There are some artifact squares in the renders, which arise from PF2/PF3 conflicts. One can be seen in the clouds of the 57 chevy render, and some are visible in the stream picture, in the bottom center, middle of the stream.

 

It also seems I left IMN maker off the last post (oops). Here it is: imn maker.atr

 

 

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

Now, for CIN mode pictures.

 

The ICE CIN mode allows for 80 colors (16 chroma x 5 luma). It is excellent for pictures that require a lot of chromas, but it has the disadvantage of more flicker, plus it is difficult to get greys and whites in this mode, though not impossible.

 

post-23798-0-48829600-1404457494_thumb.png

 

To start, pick a picture (like this one) and resize it to 320x192 pixels

 

post-23798-0-34447500-1404457533_thumb.png

 

Next, load the picture into G2F. As before, you want 2x1 pixels and normal width. On the popup dialog, you will tick 5th Colors, HRESIZE, 2x2 dither, and Greyscale. You will need to play around with the color selection and color sorting, until you get a nice monochrome picture with black as the background. Like with MIN, it is crucial that you have black as your background. You may need to reorder your colors as before using Image:Change colors.

 

Again, choose Options:standard, save a G2F (I used rbow12.g2f) then save all to do fnt and scr files.

 

post-23798-0-21058700-1404457515_thumb.png

 

For Graphics 11, you must first generate a Graphics 11 bitmap. I use AIS, load the picture, use .CIN setting, then export a .g11 file. You will then need to go into windows explorer and rename your .g11 file as .dat, as this is the only way G2F can load a Graphics 11 bitmap

 

In G2F, select 16C, 4x1 pixels, normal width and load the .dat file.

 

From here, Options:Standard, save the G2F (I used rbow11.g2f) and SAVE ALL to do fnt and scr files

 

Copy your FNT and SCR files to the H: device, then LOAD D:ICNMAKER.TUR from this atr:

icn maker.atr

 

As before, lines 1018-1021 will be replaced with your font and scr filenames.

 

Line 5000 will be the .ICN that you will save.

 

In line 1202. you will as before, go back to the Graphics 11 G2F, do EDIT:Edit colors, and copy over the values for PF0 to PF3

 

There is one problem: When doing whites, the .g11 render puts in a magenta to substitute for the white. This makes the white have a purplish tinge to it in the final .ICN render. To fix this, you want to find the register that has 14 (in this case PF1, 709) and put a bright green in its place (206). When blending colors opposite the color wheel like magenta-green, you get greys and whites. You may need to do this for the other color registers to ensure you get all your whites and greys.

 

Finally, run the program. The result is a .ICN file which can then be converted to .XEX or viewed in ICN viewer.

 

post-23798-0-32810700-1404457415_thumb.png rainbow2 source files.zip

 

The above zip file contains the .ICN, .XEX, .ASM source, and .G2F source files.

Edited by Synthpopalooza
Link to comment
Share on other sites

Now, to do pictures in ICE PCIN+ mode. For the example, we will use the famous box art from the Atari game Star Raiders:

 

post-23798-0-03212000-1404879978_thumb.png

This mode is a variant on PCIN, but with one crucial difference: The playfield registers PF0 through PF3 (708 through 711) are altered every VBLANK along with the fonts and display list. The purpose is to increase color resolution from PCIN, you get 45 possible colors here. The tradeoff is that the picture may flicker more, because you can't dither colors anymore where the PF registers pair up. This is also a mode which is at present unsupported in the ICE font editors, though this will change in the future.

 

The first step is of course to take the source picture into your favorite editor, and resize the picture down to 320x192.

 

post-23798-0-36360000-1404878584_thumb.png

The best way to do these pictures is to make a Graphics 10 g2f (just like you do with PCIN mode) and a monochrome Graphics 12 g2f (like you do in CIN mode) from the source picture. As with CIN, you want your Graphics 12 register set so that the background color on both pictures is identical. This keeps you from having a flickering background or border.

 

post-23798-0-69063300-1404878566_thumb.png

In the Graphics 10 render, it is not required here to make sure that the PF registers match up, as they change. You basically want the Gr. 10 render to be the color overlay while the Graphics 12 one is the monochrome, and provides the high resolution.

As with the others, you will save each G2F by doing options:standard, then save the G2F. For the two files, I used STRAID10.G2F and STRAID12.G2F. Then you SAVE ALL as before to make .scr and .fnt files, and put these on H: device

This is the .ATR for IP2 Maker. Boot and LOAD D:IP2MAKER.TUR

 

ip2 maker.atr

These are the lines which you change:

1019 OPEN #2,4,0,"H:STRAID10.FNT":OPEN #1,4,0,"H:STRAID12.FNT"

2001 OPEN #1,4,0,"H:STRAID12.SCR":BGET #1,ADR(SCR$),40*24:CLOSE #1
2002 OPEN #1,4,0,"H:STRAID10.SCR":BGET #1,DPEEK(88),40*24:CLOSE #1

In these lines, you of course will use the appropriate filenames for the .FNT and .SCR files you made

1200 POKE 1068,CB41:POKE 1069,CB42:POKE 1070,0:POKE 1071,52:POKE 1072,CB51:POKE 1073,CB52

The locations of interest in this line are 1070 and 1071. 1070 represents the BAK register for the Graphics 12 render, and it should be set to the picture's background color (which is zero). 1071 represents the Graphics 10 9th color, and should be set as above, to the BAK register color from the Graphics 10 render (here, 52).

1202 POKE 705,82:POKE 706,112:POKE 707,148:POKE 1079,2:POKE 1081,6:POKE 1083,10:POKE 1085,38
1203 POKE 704,0:POKE 1078,2:POKE 1080,14:POKE 1082,6:POKE 1084,8

In line 1202, of course, set the PM registers to the appropriate corresponding colors from the Graphics 10 G2F render as before.

 

The other registers of interest are 1078 through 1085. These represent the instances of PF0-PF3 (708 to 711) that are flipped in this mode. To clarify, the even numbered registers will reference the Graphics 12 render, the odd numbered registers will reference the Graphics 10 render.

 

So, firstly, you will want to put the monochrome settings from the Graphics 12 render, in order 708 to 711, into registers 1078, 1080, 1082, and 1084.

Then, put the corresponding color settings from the Graphics 10 render, in order 708 to 711, into registers 1079, 1081, 1083, and 1085.

5000 OPEN #1,8,0,"H:SRAIDERS.IP2"

This is of course the output .IP2 file you wish to save.

 

Once this is done, run the program. You now have an .IP2 file that can then be converted using the assembly code in the zip file below.

 

post-23798-0-82466200-1404879523_thumb.png star raiders xex and source files.zip

 

It's a bit trickier to render these pictures in PCIN+ than in PCIN, and they will flicker a bit more, but will give you more colors to work with.

  • Like 1
Link to comment
Share on other sites

A new experiment ... I have a new technique for doing pictures using the Super 10+ mode. This is probably the most complex of the ICE modes, in that 7 of the 9 Graphics 10 color registers (705 through 711) are altered each VBLANK, to increase the color resolution of the mode to 80 colors using 80x192 resolution. A similar technique is apparently being used in the upcoming RPC games release Centron 3D, albeit using a monochrome plus color Graphics 10 screen to get 72 colors at 80x48 resolution. Or so the theory goes. ;)

 

As an example, here is a source picture for conversion:

 

post-23798-0-94605200-1404880587_thumb.jpg

 

This is a good candidate for conversion, as it has a reasonable number of colors, and the colors are very near to each other on the color wheel.

 

This is a very tricky mode to convert pictures for, because of the sheer number of color combinations possible. Sometimes, though, it is possible to narrow these down by hand. What I did here, was run ICE GTIA editor in Altirra, and design my own color palette. Here is a screenshot of the palette I used for this picture (from ICE editor):

 

post-23798-0-14702700-1404880721_thumb.png

 

What I did was to use the source colors of red, green, blue, and yellow. For each of the registers, I alternated the colors as follows:

 

VBLANK 1 registers (705 through 710): Reds and Blues

VBLANK 2 registers (705 through 710): Greens and Yellows

 

In both cases, I stepped up the luminance slightly as I went along.

 

For the last two flickering color registers (711a and 711b), I chose to reuse green and blue at their highest luminance setting, but this time I put blue on the VBLANK 2 instance, and green on the VBLANK 1. By alternating, I am able to gain a few extra chroma settings and widen out the color palette

 

In Super 10+, it is sometimes good practice to leave the last register 712 as a solid non-flicker color. This is sometimes useful if you wish to have PMG's on top of the screen for instance, and you want to softcode 712 as your background. Here, however, I made 712 solid white to use as the color of the moon in this picture.

 

I then took a screenshot of the resultant palette in Altirra (making sure Frame Blending is on) and saved it.

 

 

Next, load the screenshot in your favorite editors, and crop the screenshot until all you have is the 80 color palette as shown below:

 

post-23798-0-91992600-1404881460_thumb.png

 

Save this, then load GIMP.

 

In Gimp, you will load the color palette image, then go to Windows: Dockable Dialogs: Palettes, and you will then get a palette box as shown:

 

post-23798-0-53856400-1404881717_thumb.png

 

Right click in the palette box and choose Import Palette. This dialog comes up:

 

post-23798-0-98709900-1404881830_thumb.png

 

You will select "Image" which should show the image you have loaded. You will see the 80 color palette shown on the right. Choose a name for the palette, like Super 10+ 80 colors. Then click OK. The palette you created from ICE editor is now loaded into GIMP.

 

Next, load your picture into GIMP, and do Image: Mode: Indexed. Convert the picture to the 80 color ICE palette you saved. This is the result:

 

post-23798-0-04857400-1404882352_thumb.png

 

Export this as a PNG (I called it stream 80c.png).

 

Next step involves .AIS, and you will need to do this step twice. First, load the 80C render you just saved from GIMP. You will get this dialog:

 

post-23798-0-47955200-1404882679_thumb.png

 

For this, I chose to use the greens and yellows in this render. I also put in a black for the picture. AIS here insisted on putting a purple as the 704 color, so I had to live with it. The next step is to save a .g10 file

 

I then closed, reloaded AIS, then did a .g10 file using reds and blues:

 

post-23798-0-83284700-1404883066_thumb.png

 

I saved a second .g10 file. I then loaded each .g10 file in turn, into G2F, adjusting the color palette so that, in both renders, 704 (PM0) is black and 721 (BAK) is white. Then do Options: Standard, save each g2f, and SAVE ALL to get screen and fnt files.

 

The ATR below shows the result. I had to do some final tweaks to the colors to get them exactly right, but the results I think are very good.

 

post-23798-0-07600700-1404883242_thumb.png stream super 10+.atr

 

What would be ideal, is a means to take any picture, and automatically reduce it to the most optimal ICE 80-color palette. This would possibly lead to a picture closer to the original render.

 

A future possibility is to also convert these font files to .ICE files to load into ICE editor, where further edits could be made to smooth out the colors and get the picture even closer to the original render.

 

This method could possibly work for the Super 10 and Super 9 modes as well. Super 10 would be the simplest as you only have 45 colors and 1 component 9 color palette to worry with.

 

Next step for these modes, is to make viewer programs aid picture file formats for the Super 10, 10+, 9, APAC, and HIP GTIA modes, followed by asm code to convert these to .xex ... A future possibility is to also convert these font files to .ICE Super 10+ files to load into ICE GTIA editor, where further edits could be made to smooth out the colors and get the picture even closer to the original render.

Edited by Synthpopalooza
Link to comment
Share on other sites

An addendum: here is the ideal picture conversion of the previous example for Super 10+, made using the 80 color ICE font pallete. I did this up in GIMP, by resizing the picture to 80x192 and reducing it to the 80 colors in the Super 10+ palette:

 

post-23798-0-54939600-1404891305_thumb.png

 

Currently no means yet exist to exactly translate this to Super 10+, but with accurate color translation, this is how the ideal conversion would look on a real Atari in Super 10+. Of course, there is always loading up ICE editor and designing the screen by hand using the color settings I documented above. Tedious work ... or maybe someone needs to make an interlace version of G2F that works with ICE modes. :) Or alternatively, this mode would be an excellent candidate for addition to Tebe's Atari Interlace Studio perhaps.

Edited by Synthpopalooza
Link to comment
Share on other sites

A bit of further work towards a better method of rendering Super 10+ pictures ... it may be possible to take the picture above (which has already been reduced to the 80 ICE Super 10+ colors), render it as a windows .BMP, at 80x192, and use that information to convert to a Super 10+ natively on the Atari. The color palette is stored already in a 256 color (16 bit) palette in this format, and the bitmap data should translate to the 8-bit format easily, as I believe the pixels are in 16 bit format.

 

Firstly, I am going to attempt to convert the picture above by hand, piel by pixel, using ICE GTIA editor. It will require looking up each of the 80 colors in a table, editing each characterpixel by pixel, and editing a total of 8 ICE fonts. Not an easy task by any means, but I have made up a lookup chart of the 80 color ICE palette used in the above GIMP render which should help:

 

post-23798-0-51432400-1404971406_thumb.png

 

The grid numbers represent the Graphics 10 color number, where color 0 is 704 (background) and color 8 is 712 (9th color). 7 of the registers will change each VBLANK instance, but 712 and 704 remain constant. In this instance, the background is black, and color 9-9 (solid white) is a non-flicker color. This is of course just one possible palette for Super 10+. Due to the VBLANK changes on 7 color registers, you actually have an extended blended palette of about 8,300 colors possible to choose from in Super 10+ to fill in your 80 color palette. A lot of subtle color gradients can be made.

 

As you can see above, a great color range can be had in the example palette, so I converted a couple of more pictures in GIMP to 80x192, using the same 80 color ICE Super 10+ palette:

 

post-23798-0-72360200-1404971437_thumb.png post-23798-0-51033800-1404971461_thumb.png

 

 

This is how the pictures should appear on a real Atari, if the conversion is done accurately. A further study of the Windows BMP format may yield further clues.

Edited by Synthpopalooza
  • Like 2
Link to comment
Share on other sites

The other project I am working on, is a means of natively converting Commodore 64 bitmaps to PCIN mode. Previously I had worked up a PCIN palette chart for displaying the C=64 palette:

 

post-23798-0-04715700-1404978744_thumb.png

 

 

Due to the fact that the GTIA mode 10 overlays mode 12 in the PCIN mode two pixels at a time, the Commodore 64 bitmap similarly has to be converted two pixels at a time. The method proposed, is to make a conversion lookup chart for all 256 possible pixel pairs, and replace them with the appropriate Graphics 10 pixels and Graphics 12 pixel pairs, as shown below:

 

post-23798-0-90056500-1404978790_thumb.png

 

For each color index, the top rectangle is the Graphics 10 GTIA pixel, while the bottom two boxes are the corresponding left and right Graphics 12 character pixels that are underlaid. For this table, PF0 is red, PF1 is yellow, and PF2 is grey. The 9 color groups in PCIN are on the right side of the chart.

 

This chart assumes we are only using normal non-inverse ATASCII<128 characters. If we throw Inverse into the mix, that opens up the teal color (PF3) in graphics 12, which may be able to get some color combinations closer to C=64. This means an averaging algorithm will be needed where there are PF2-PF3 conflicts, to determine if that character should be inversed.

 

The conversion should be straightforward, because like the character-based PCIN mode bitmaps, C=64 bitmaps are also organized one 4x8 character cell at a time, instead of in rows like normal Atari bitmaps.

  • Like 1
Link to comment
Share on other sites

Some further mockups using GIMP and the Super 10+ palette. Again, if done correctly, these are how the pictures will look on a real Atari, albeit with some flicker.

 

post-23798-0-01997400-1405233700_thumb.png post-23798-0-49947200-1405233715_thumb.png post-23798-0-74012400-1405233731_thumb.png

post-23798-0-17410600-1405233791_thumb.png post-23798-0-52085200-1405233811_thumb.png post-23798-0-58636800-1405233876_thumb.png

post-23798-0-21782900-1405233926_thumb.png post-23798-0-56734500-1405234038_thumb.png

 

I've also done a table of hex RGB values from this palette, sorted by their position in the ICE palette. It may be possible to read these from the PC bitmap and reorganize them for the ICE render, and generate two Graphics 10 bitmaps for rendering as a ICE Super 10 picture. Next task.

  • Like 1
Link to comment
Share on other sites

I've had some moderate success with the C64 koala converter.

 

I've attached an .atr here:

 

c64 viewer.atr

 

RUN "D:C64VIEW.TUR"

 

When you run it on the emulator, it is advised to turn on Warp Speed as this will take a LONG while.

 

How this works: The program reads the c64 colormaps, then the bitmap one pixel at a time, and chooses the appropriate matching colors from the lookup table I posted a couple of posts up:

 

post-23798-0-55772900-1405503349_thumb.png

 

The colors on the left column represent the left pixel of a two pixel combination, and the colors on the top row are the right pixel. In each square is the corresponding graphics 10 color, and two graphics 12 pixels, these are also both represented in binary.

 

The conversion, for some reason, shifts the bitmap down a scanline on every character line. I have not yet been able to fix this.

 

It should, however, work with any .koa file from your Commodore 64. There is also a tool called ConGo which can generate .koa files for you to test out.

http://www.editorix.org/congo/congo5full.exe

 

To substitute your own .koa, change lines 11010 and 11060 in the program.

 

Here is a sample picture I converted:

 

post-23798-0-88446500-1405503125_thumb.png C64 original

 

post-23798-0-42069800-1405503150_thumb.png PCIN conversion

 

Some caveats: No inverse characters are used here. With the usage of inverse characters, this opens up PF3 (teal) for blending, which may be able to get some colors closer to the c64 original. An extra lookup table will be needed for inverse combinations.

 

Still needs a lot more work.

Edited by Synthpopalooza
Link to comment
Share on other sites

SUCCESS.

 

Seems I've solved the problem I was having with C64VIEW.TUR ... the .koa format has two extra bytes at the beginning, I am assuming these are the bg color and the border color.

 

Improvements:

 

* Picture is now correct, no striping

* Picture will now self-dither for anti-flicker in areas where the PF and BAK colors mix together.

* Picture is automatically converted to .IPC, for view in IPC viewer or conversion to .XEX

 

Here's the new .ATR... LOAD "D:C64VIEW.TUR"

c64 viewer.atr

 

Lines you need to alter:

11010 and 11060 should have the filename of the .koa you want to load and convert. For best results, put the files in your H: device

5000 should have the output .IPC filename

 

Then, run the program, turn on Warp Speed and Frame Blending in your emulator.

 

The conversion is straightforward because the native C64 multicolor mode, like the PCIN mode here, reads the bitmap data in character cells, one 4x8 character cell at a time.

 

Still to do: Support for PF3 (teal) inverse characters, these will improve the color quality of the conversion.

 

As no inverse characters are used, it is even possible to do these pictures in bitmap format with some reshuffling ... i.e. alternate between Antic F and E, and switch the GTIA every scanline between 0 (Graphics 15 no GTIA settings) and 128 (Graphics 10), as in the bitmap CIN mode. You would need to shift the bitmap data for Graphics 15 to the right one color clock to correct for the Graphics 10 pixel shift. Also the bitmap data will need to be linear, not character-wise as in the ICE PCIN font based mode I used here.

 

Here are some sample conversions, in .xex format:

 

post-23798-0-04068900-1405579502_thumb.png ab.obx

 

post-23798-0-05340700-1405579514_thumb.png astrnaut.obx

 

post-23798-0-40949100-1405579525_thumb.png houkag64.obx

 

post-23798-0-25079900-1405579538_thumb.png hourglas.obx

 

post-23798-0-83887200-1405579548_thumb.png oldwest.obx

 

post-23798-0-34644900-1405579566_thumb.png planet.obx

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

And for your pleasure, some more C64 conversions. I think my conversion table needs some work, it seems flesh tones (bright orange particularly) are not converting very well. Also, these may be issues which will improve when I add in the inverse (PF3) lookup table.

 

Listed below is the original C64, followed by the PCIN conversion, and the .xex

 

post-23798-0-09675500-1405832602_thumb.gif post-23798-0-67898500-1405832627_thumb.png dropzone.obx

 

post-23798-0-42751700-1405832649_thumb.gif post-23798-0-01384800-1405832669_thumb.png dworld.obx

 

post-23798-0-07093800-1405832696_thumb.gif post-23798-0-15642500-1405832713_thumb.png dredd64.obx

 

post-23798-0-58871700-1405832748_thumb.gif post-23798-0-89547400-1405832762_thumb.png ikp.obx

 

post-23798-0-14647800-1405832849_thumb.gif post-23798-0-40109200-1405832857_thumb.png quinch.obx

 

post-23798-0-99977300-1405832909_thumb.gif post-23798-0-79323000-1405832917_thumb.png nato.obx

 

post-23798-0-65554900-1405833006_thumb.gif post-23798-0-87627400-1405832974_thumb.png mega.obx

 

post-23798-0-00144600-1405833037_thumb.gif post-23798-0-54846600-1405833052_thumb.png leviatha.obx

 

post-23798-0-57855600-1405833079_thumb.gif post-23798-0-44733600-1405833092_thumb.png savage.obx

 

post-23798-0-23770200-1405833110_thumb.gif post-23798-0-77709500-1405833121_thumb.png fortune.obx

 

post-23798-0-25516700-1405833134_thumb.gif post-23798-0-64530000-1405833147_thumb.png trantor.obx

 

 

 

  • Like 2
Link to comment
Share on other sites

Slight tweak made to the viewer. I increased the luminance of the PF1 color group (grey) to 10, and the luminance of the PM2 color group (purple-magenta) up 2 steps. This seems to have fixed the flesh tone issues.

 

There are still some problem pictures, such as this one:

 

post-23798-0-40044100-1405885909_thumb.png post-23798-0-05900300-1405885919_thumb.png animal.obx

 

As you can see, there are a lot of black holes in the picture, some of the color pairs seem to have not converted out properly. This bears a lot of scrutiny, but it seems to happen only in very complex pictures like this one.

 

There is also this render:

 

post-23798-0-14255100-1405886034_thumb.gif post-23798-0-98083900-1405886047_thumb.png elefli.obx

 

The green came out too dull in this render. Again, this is a problem which can be fixed with the addition of PF3 blending (teal + green).

 

There is also this render of the Robocop title screen:

 

post-23798-0-39099100-1405886141_thumb.jpg post-23798-0-31060800-1405886150_thumb.png robocop.obx

 

In this case, the text on the left with the copyright info is illegible. This might require taking the picture into IPC viewer, exporting ICE files, and editing each font set in ICE CIN font editor to make the text readable.

 

Lastly, there is this conversion of the Prince of Persia title screen:

 

post-23798-0-92221900-1405886861_thumb.png post-23798-0-53841800-1405886929_thumb.png persia.obx

 

It seems that the gradation of the sky from purple to orange didn't quite come off like I thought it would. This may require more tinkering with the color conversion table.

 

Here is the updated C64 viewer with color corrections: c64 viewer.atr

 

And also some more conversions. The quality is improving. :)

 

post-23798-0-09082200-1405886586_thumb.jpg post-23798-0-43731900-1405886595_thumb.png chinese.obx

 

post-23798-0-03366800-1405886688_thumb.png post-23798-0-76419000-1405886704_thumb.png commando.obx

 

post-23798-0-78350700-1405886724_thumb.png post-23798-0-08862200-1405886741_thumb.png concubis.obx

 

post-23798-0-14805700-1405886781_thumb.png post-23798-0-71049300-1405886795_thumb.png creators.obx

 

post-23798-0-67696100-1405886821_thumb.png post-23798-0-17343200-1405886842_thumb.png ninja1.obx

 

 

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Seems I figured out the problems with those pictures which had black holes in them: The problem is, those were FLI's, not normal C64 multicolor mode.

 

Ok, C64 newbie that I am, what in the heck is an .FLI? Answer below ...

 

Normally in Commodore 64 low res multicolor you are limited to 4 colors per character cell. FLI is an extended format which allows for all 16 C64 colors in the same char cell. When I tried to convert to koalapad, the ConGo converter put black holes into the picture where there were color conflicts.

 

So what will be needed is a native converter from .FLI to the ICE PCIN mode, my next task on this project.

 

Meanwhile, I was able to do a slightly better version of the animal realm picture. There are still some black holes in the picture though, but it looks better. Hopefully a native conversion from .FLI will eliminate this problem.

 

post-23798-0-14096000-1405901014_thumb.png animal2.asm

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