Jump to content
IGNORED

Doing pictures using Super IRG 2 and other ICE modes.


Recommended Posts

I feel the urge to experiment with the new ICE modes used in my editor ... specifically, I want to work out a way of converting GIF/JPG into Super IRG 2 ... that is, 160x192 pixels (128 across in narrow mode) with 16 colors per char and 23 colors onscreen at once.

 

I have no idea how to even begin to program an algorithm that can reduce a GIF/JPG to 23 colors that will work in Super IRG 2, there are a lot of variables ... firstly, how to select 8 component colors (plus the background) which will blend to make the 23, and also allowing that 7 of these 23 colors will only be usable in inverse (ATASCII>128). The idea is that PF0-PF3 get flipped every vblank to make the 23 colors, with the 7 component colors made off of PF3 usable only in inverse.

 

My best bet, until someone can write such an algorithm, is to find a PC program which can reduce any image to 23 colors, and try to transcribe the image by hand into my font editor, and also try to calculate by hand the best colors to use in ICE based on the colors in the original image. Gonna be a pain in the arse, but I want to try.

 

So, suggestions on which PC paint/image program to use would be appreciated.

 

If I get good results from this, I may also try other modes like the PCIN ones (Graphics 12+Graphics 10) and Super 10/10+ (45 to 80 colors at GTIA resolution), which rely very heavily on color indirection (i.e. setting color registers) and less on monochrome/chroma settings like in APAC, HIP, or CIN.

Link to comment
Share on other sites

ImageMagick seems to work, found this resource online:

 

http://www.imagemagi...agickStudio.cgi

 

Now the experiment: I managed to get this picture, reduced to 23 colors at 128x192 resolution (Antic 4 resolution in narrow mode):

 

post-23798-0-32937000-1317304809.png

 

Now the key is to get Super IRG 2 colors which closely match the 23 colors in this image so I can begin transcribing.

 

Here is a screenshot of a sample palette I am experimenting with, using the color tuner in my ICE editor for Super IRG 2:

 

post-23798-0-89913500-1317304989_thumb.png

 

Not entirely accurate, but as you can see in the font display I've transcribed the first few blocks of the image. The trick is, figuring out the inverse mapping. There are 7 of these 23 colors which can only be used in inverse. The color register mapping in this screenshot is like this:

 

0 - background

1 - 708a

2 - 708b

3 - 709a

4 - 709b

5 - 710a

6 - 710b

7 - 711a

8 - 711b

 

so registers 5 and 6 are for normal ATASCII only, 7 and 8 for inverse only. This means in the above image, on the second row of colors, colors #4, 8, 12, and 13 through 16 are inverse-only, and those same colors on the first row of colors are for non-inverse only, and cannot be used in the same 4x8 grid as the inverse colors. So it's really complicated! :) The only thing I can think of is a sorting alrogithm by frequency of use, or by distance, i.e. which colors do not appear in the same 4x8 block in any given location in an image.

 

What I had been doing was, load the fairy pic into Corel Photo House, and then look at the color palette there and try to match it up best as I can by messing with the Color Tuner in the ICE editor.

 

So the question now is, how do I order the colors in my image, according to frequency of usage, so I can better get an idea what the Super IRG 2 palette should be, and specifically which colors should be used for PF2 and PF3?

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

Synth try Atari Interlace Studio, you can download :

Atari Interlace Studio 1.zip

You can get those lots of colours images from P.C. and InterlaceStudio have those 16->... lots of colours in Flicker Bitmap Mode.

You can have in that ways image in 2or3PF0, 2or3PF1 and 2or3PF2.

It saves in .mic, .cin, .hip, .(...) but you can also export in .xex, .asm, .(...)

From here you can take the Charsets and then, by hand convert some of the PF2(s) into PF3(s).

 

 

But because it is '.mic' that, for some reason, was done to be always 160x192 in 2x1 ratio resolution.

 

 

Don't know if it works, but al least you can convert images into A8 colours, into A8 Gfxs. Modes and have Assembly listing or even Flicker .xex.

But there's also the possibility to use the simple 4colours PFs. A8 GR.15 Bitmap and save it in .mic to use on G2F or export into .xex and .asm.

 

 

Hope it helps in something.

Greets.

José Pereira.

Link to comment
Share on other sites

Photoshop does palette reduction just fine.

 

The way to overcome the PF2/PF3 exclusivity problem is to use the VSCROL trick to make shorter characters.

 

Pair up lots of 2 rows with VScrol bit set on the first. Scanlines 4-7 display on first row, scanlines 0-3 on second. So, the memory order is different and it's costing a bit of DLI time but you only put up with a 4*4 cell rather than a 4*8.

 

Equally, the trick could be used to make characters that are only 2 scanlines high, but in anything under 4, you have character bitmap data that doesn't get used so it starts costing with the wasted RAM.

Link to comment
Share on other sites

VSCROL is a good idea, but unfortunately it won't work for me in this setting.

 

The problem is, I haven't yet been able to optimise for redundant characters (like in G2F), so I am limited to 12 character lines of display in this mode. Using VSCROL will only reduce the number of scanlines in the display and shorten the display even further.

 

How it works is, I am having to use 4 ICE double fonts in Super IRG 2, and changing CHBAS (756) using a DLI every 4 character lines ... this is in narrow mode. I am also using a VBI to change 4 color registers (708-711) which leaves me enough for 4 character sets (since you can only flip 8 registers each VBI). CHBAS (for the top 4 lines) and the DLI pointers for each of the 3 remaining character sets also gets shifted every VBI. Each character set will take up 4 character lines on the display, if you display them sequentially.

 

Now if there were some way to generate optimised ICE fonts (like in G2F) this would save on a lot of memory, and allow for more lines of display. And I think the VSCROL trick would be more feasable. The other solution is to only flip 3 registers, and open up 4 more lines of character display. Or if I just used regular Super IRG with no color shifts, that would enable 32 character lines of display (8 fonts) which would be more than enough for the VSCROL trick. But again, the color resolution is reduced to 14 (not 23) and there is a lot of wasted RAM.

 

Good news is, if I use ANTIC 5 to display Super IRG 2 font pictures, 12 character lines of display will cover the whole screen. In antic 4, 12 character lines cover half the screen. Of course I could also load the entire display in memory, and maybe use a means of scrolling the picture up and down, so you would only see 12 lines at once but still see the entire picture.

Edited by Synthpopalooza
Link to comment
Share on other sites

It should work.

 

You don't need more character set memory - the character data is used half for the first line, other half on the next.

 

If you're in narrow mode, then you have much more time to do register changes. The trick is to not use WSYNC, use delay loops + NOP.

 

Also you only need to do the VSCROL change every second character line, you do it twice in succession in the single DLI.

Link to comment
Share on other sites

Ok another question I have ...

 

Are there any programs or utilities which can convert a picture (JPG, GIF, PNG) into a Graphics 10 bitmap? I know of Jeff Potter's APACVIEW which I have been using to make Graphics 9 and 11 bitmaps from GIF files, but I'd like something that will render Graphics 10 pics, because I want to do some experimenting in the PCIN (Gr. 12+10) modes. Ideally, I'd like it to be able to also reorder the Graphics 10 palette, so that the PF0-PF3 colors will match PF0-PF3 on the corresponding Gr. 12 pic, so as to reduce flickering.

Link to comment
Share on other sites

I've come up with a system to make Super IRG 2 font pics.

 

You will of course need Tebe's G2F to do this, and a good photo editor like Photoshop.

 

The limitations are of course that the pic will need to be narrow mode, and you can only display 16 lines of character.

 

First, load your pic into photoshop and resize it to 256 pixels wide, and also optionally to 128 pixels high if you want the entire image to fit the display. Save it

 

Load your saved pic into G2F, and when the window pops open on the bottom, tick "5th colors", "Dither 2x2" and "Sort Colors". Make sure the pic is in narrow mode (32 byte).

 

You get a listing of colors you can choose from, along with 708 through 712 ... select 5 colors from this list, 712 being your background.

 

Set your character set usage to "Standard", then edit char set. Go through the first 4 character sets and save them.

 

Go to edit colors and make a note of the color settings, I think you can also save the .COL file too. Save your G2F, then export a .SCR file

 

Reload your picture file and repeat these steps, except choose different colors (keep 712 the same). Again save font files, SCR file, G2F, color settings.

 

Attached is an ATR of a Space Ace pic I did. The program SPACEACE.TUR is a program which will open up the font files and the SCR file and display your picture. When using SCR files, its a matter of choosing which SCR file looks better. Sometimes you get nasty artifacting because of PF2-PF3 inverse conflicts.

 

Lines 1020-1027 load the font files into memory. Lines 1190-1201 are for color settings and character set pointers. Lines 2000-2010 load the SCR picture file.

 

How this works is you get an Antic 4 screen, and the program uses a combination VBI and DLI. The DLI changes the character set (CHBAS) every 4 character lines, and the VBI flips CHBAS, the DLI CHBAS pointers, and color registers 708-711 every VBI to simulate 23 colors. Due to limitations you can only get 16 character lines onscreen. This could be increased if some kind of algorithm to optimise character usage could be written. Reducing your color resolution by only flipping 3 color registers will increase your character display by 4 lines as well.

 

post-23798-0-96788600-1318099340_thumb.jpg

This is the original picture

 

post-23798-0-56222800-1318099299_thumb.png

A screenshot of the Super IRG 2 pic generated on the Atari

 

spaceace.atr

  • Like 1
Link to comment
Share on other sites

I've come up with a system to make Super IRG 2 font pics.

 

You will of course need Tebe's G2F to do this, and a good photo editor like Photoshop.

 

The limitations are of course that the pic will need to be narrow mode, and you can only display 16 lines of character.

 

First, load your pic into photoshop and resize it to 256 pixels wide, and also optionally to 128 pixels high if you want the entire image to fit the display. Save it

 

Load your saved pic into G2F, and when the window pops open on the bottom, tick "5th colors", "Dither 2x2" and "Sort Colors". Make sure the pic is in narrow mode (32 byte).

 

You get a listing of colors you can choose from, along with 708 through 712 ... select 5 colors from this list, 712 being your background.

 

Set your character set usage to "Standard", then edit char set. Go through the first 4 character sets and save them.

 

Go to edit colors and make a note of the color settings, I think you can also save the .COL file too. Save your G2F, then export a .SCR file

 

Reload your picture file and repeat these steps, except choose different colors (keep 712 the same). Again save font files, SCR file, G2F, color settings.

 

Attached is an ATR of a Space Ace pic I did. The program SPACEACE.TUR is a program which will open up the font files and the SCR file and display your picture. When using SCR files, its a matter of choosing which SCR file looks better. Sometimes you get nasty artifacting because of PF2-PF3 inverse conflicts.

 

Lines 1020-1027 load the font files into memory. Lines 1190-1201 are for color settings and character set pointers. Lines 2000-2010 load the SCR picture file.

 

How this works is you get an Antic 4 screen, and the program uses a combination VBI and DLI. The DLI changes the character set (CHBAS) every 4 character lines, and the VBI flips CHBAS, the DLI CHBAS pointers, and color registers 708-711 every VBI to simulate 23 colors. Due to limitations you can only get 16 character lines onscreen. This could be increased if some kind of algorithm to optimise character usage could be written. Reducing your color resolution by only flipping 3 color registers will increase your character display by 4 lines as well.

 

post-23798-0-96788600-1318099340_thumb.jpg

This is the original picture

 

post-23798-0-56222800-1318099299_thumb.png

A screenshot of the Super IRG 2 pic generated on the Atari

 

spaceace.atr

 

this is great tutorial.. i have ask if you can make video tutorial? and post it on vimeo/youtube? using some video screen capture program..

Link to comment
Share on other sites

Thanks ... I will consider doing a video tutorial for this, once I've figured out screen capturing and all that. This method still isn't perfect, you still get some artifacts from PF2-PF3 conflicts. You can get around this by doing a screen-display list flip (allowing for blending of PF2-PF3) but your character lines get decreased to 12 (3 character sets) ... what would be ideal is a way to optimise the paletting in the double font to avoid conflicts, but that's for a more experienced programmer than me :)

 

I've also worked up a way of doing Super CIN (Gr. 12+11 80 color) and Super MIN (Gr. 12+9 80 color or 20 shade) font pics as well, I'll post this next in the thread along with ATR's.

Link to comment
Share on other sites

Ok, here's a tutorial on how to do Super CIN ... this is Graphics 12 mixed with Graphics 0.11, which allows 80 colors at Antic 4 resolution.

 

For this example, I took a picture of the Sunsphere, in my hometown of Knoxville, TN, and converted it into a Super CIN font pic.

 

post-23798-0-74399400-1318467026_thumb.jpg

This is the original picture

 

post-23798-0-62438700-1318467146_thumb.png

The Super CIN pic

 

To do this, you need the following:

 

Graph2Font

Jeff Potter's APACView

ICE font editor, CIN Version

 

The limitations are, the pic has to be in narrow mode, and you can display 20 lines of character (5 fonts) per picture.

 

You will need to create first a Graphics 12 screen using Graph 2 font. First size your picture to 256x160 pixels in your favorite photo editor and save, then load into G2f. You want to select Greyscale and 5th colors. Choose standard for fonts, then save your font files. Also save a .SCR screen file

 

Next, load your original pic into your photo editor, copy it, then create a new pic at 320x192 pixels and paste your picture into the upper left corner. Save it.

 

Load this pic into Jeff Potter's APACView and save a Graphics 11 bitmap.

 

The Graphics 11 bitmap is then converted using a Turbobasic program I wrote called PIC2FONT.TUR

 

In G2F, do "show chars" to bring up an ATASCII representation of your .SCR file.

 

In ICE CIN, select Super CIN, and do CTRL-E to go to the Graphics 11 mask. Load each GR 11 font in turn, into mask #2.

 

Find which characters on your screen map are inversed, go to the appropriate char in the ICE editor, and when editing it, do "I" for inverse.

 

Save each font mask after you finish.

 

In the SUNSCIN.TUR file, you may want to play with the Gr. 12 color settings (708-711). I chose colors which I thought would match with the Graphics 0.11 colors so as to reduce flicker.

 

The program "SUNSCIN.TUR" displays the fonts and scr file. Simple enough :) I have also included PIC2FONT.TUR as well

 

Note that you only need one .SCR file, and there will be no conflicts with PF2-PF3 like in Super IRG 2, as Graphics 0.11 is a non Antic 4 mode, so inversing the characters in the ICE editor fixes all the conflicts.

 

Next time: Doing Super MIN pictures, which is easier. :)

 

sunscin.atr

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

Today, I will show how to do a font pic in Super MIN. This is Graphics 12 plus Graphics 0.9. This mode is actually a lot easier to set up than Super CIN, as you are only doing a display list flip and a flip of the GTIA register between normal, and Graphics 9. This leaves you space for 6 character sets, which in narrow mode gives you 24 lines of character, enough to cover the whole screen.

 

Super MIN gives you in theory 80 colors onscreen at once. In practice however, if you are doing monochrome pictures you really have about 24 level grey shading. This is somewhat less than in HIP mode but the picture will appear sharper than a HIP picture.

 

I have done three examples here:

 

post-23798-0-39602200-1318547905_thumb.png

This is a straight greyscale picture, 708-711 all set to monochrome.

D:SUNSMING.TUR on the attached .ATR

 

post-23798-0-41573500-1318547965_thumb.png

This example is shaded to orange-gold, a mixture of color hues 14, 1, and 2

D:SUNSMIN.TUR on the attached .ATR

 

post-23798-0-36379000-1318548036_thumb.png

Shades of blue, with some purple added to give a color tint to the picture.

D:SUNSMIN2.TUR on the attached .ATR

 

This example uses the same Graphics 12 fonts as the Super CIN example, so these are generated in the same manner, load the picture into G2F, resize for narrow mode, choose greyscale and 5th colors, and save fonts and a screen map. You will also want to note the color values for 708-711 and your background.

 

To generate your Graphics 9 font you again load and resize your pic into G2F, only select "1x4" on your pixel ratio, this puts G2F into Graphics 9. Also select "greyscale", then save your Graphics 9 fonts.

 

This example also uses the exact same .SCR map as in the Super CIN example. You will again need to do "Show Chars", then load the ICE Editor CIN version, and select Super MIN. Load your graphics 9 fonts into mask #2 and do CTRL-E until you see the Graphics 9 mask. Go through each character and do an Inverse ("I") on each one as indicated in your SCR map in G2F, then resave your font mask. This will correct any inverse conflicts in your picture.

 

Unlike other screen flip modes, no color registers are flipped in Super MIN, you are using only hardware color registers to control your color indirection. In this case, it is 708-711 plus 712 for your background, the same as in Antic 4, but 712 has to be an exact multiple of 16 ... a brightness of zero so that your Graphics 9 shades will be 16.

 

So, in the example programs, you will take your color values and plug them into your program at line 1201. You will then want to adjust the brightness of these to reduce the screen flicker. You can also play around with the color settings a bit if you want to add some color into your picture.

 

ATR is attached.

 

sunsmin.atr

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

I read about these converting quit a time and I like the techniques and I was very exited!

Before the ABBUC-Program ICE in mind I started some programming in WUDSN / Mads with interlaced graphics.

But this topic really hit me! Cool, but how much work to do for me to get it in a game I thought.

 

I wrote a little program to build a 120 tiles for a picture, so that they are optimized for the complete 40x25=1000 tiles. After that I read about g2f which i never heard of. But it showed me another way to do pictures: With multi character sets

So I tweaked a little bit with the source code and got some ideas how to do pictures automatically.

I uses the PAL-palette from Altirra und made a CIN-palette

 

post-31072-0-01140000-1319051132_thumb.png

 

After that I took some pictures an made them

1. Get or build a picture in 320x200

2. Sqeeze it to 160x200

3. Convert with GraphicsTileMaster with apropriate options

4. Save as stretched PNG in GraphicsTileMaster

 

Then I got this:

post-31072-0-84312300-1319051595_thumb.png

 

post-31072-0-01999600-1319051747_thumb.png

 

post-31072-0-26894400-1319052977_thumb.png

 

and one without dithering and HSB-priority:

post-31072-0-20087800-1319053334_thumb.png

 

and the same with dithering and more rgb priority:

post-31072-0-14620400-1319053335_thumb.png

 

original image was:

post-31072-0-76518600-1319053593_thumb.png

 

This maybe not the best possible picture but it is generated very fast by a program, so it is possible to do a lot of graphics an a short time.

So if anyone is planning to do an adventure or something like that ...

 

I have no program export yet. Does anyone have a code for WUDSN/Mads-Assembler and one for Turbo Basic to show the tile-picture in CIN-Mode that I can take as source for an exporter?

 

The reducing of the color-tiles resolution horizontal is missing in the examples, but I will do that if someone is interested.

 

I will do a setup for a first version of GraphicsTileMaster if you want (for Win/PC).

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

They look sufficiently detailed and colourful for video transcoding. I'd love to see some full-screen colour vids running off IDE Plus 2.0 at 10fps!

I can do the converter. If anyone has a format description for me I will do it. I can´t do the player because I have no IDE-Interface. I have Sio2SD in my XL and Altirra.

 

Memory for every frame is 1000 bytes for the tile characters, 1 font every 3 lines (of 8 rows) means two times 6 fonts for 24*6 rows (looks like cinemascope).

that is about 2*6 fontsets * 120 tiles/fontset * 8 bytes/tile and 880 bytes for 24*40 characters is about 12k per frame.

If IDE loading is fast enough for that ... Maybe there is not enough memory for double buffering, so synchonizing can be very tricky.

But I like the Idea of video on 8 Bit too

Link to comment
Share on other sites

I must admit I haven't read up on the mode's design so my suggestion wasn't really informed. ;) However, throughput is in the 64KB/s region, so we'd be looking at more like 5fps. One way or another, it would be an interesting challenge. I guess it could be tested on SIO equipment and run full-pelt on the IDE setup. What about if the vertical resolution was halved (or is that not possible... or even desirable?).

 

Without wanting to stray into contentious territory, I was highly impressed by some recent C64 videos I saw (I forget the mode name) which appeared to use a lot of interlacing and dithering (although at 320x200). It would be cool to see something in a similar vein on the A8.

Link to comment
Share on other sites

I made a setup, but I´m not sure if it works for you. It needs .Net 4.0 and some Devexpress-Libs. Could anyone try this out please?

Unfortunately i am not allowed to attach a rar with a setup. I can understand that.

Send me a message if you are interested.

Link to comment
Share on other sites

I don't know if this will be of any help, but I can tell you a bit about the Super CIN mode using font pictures.

 

In normal 40 byte mode, you get 5 character sets at 3 lines each, with a Display List interrupt changing the character set every 3 lines. This lets you display 15 character lines. If you culd work out an algorithm for optimising characters this could increase. In narrow mode this increases to 20 lines. There is also the matter of inverse characters, which will let you use the 5th color. So you actually have 16x5 or 80 colors, just that PF2 and PF3 can't be in the same character cell.

 

Hope this helps

Link to comment
Share on other sites

I made a setup, but I´m not sure if it works for you. It needs .Net 4.0 and some Devexpress-Libs. Could anyone try this out please?

Unfortunately i am not allowed to attach a rar with a setup. I can understand that.

Send me a message if you are interested.

ZIP files are allowed so just rename you rar file 'filename.rar.zip' and then downloader can change erase the zip extention and use the orignal rar file archive.

Link to comment
Share on other sites

I must admit I haven't read up on the mode's design so my suggestion wasn't really informed. ;) However, throughput is in the 64KB/s region, so we'd be looking at more like 5fps. One way or another, it would be an interesting challenge. I guess it could be tested on SIO equipment and run full-pelt on the IDE setup. What about if the vertical resolution was halved (or is that not possible... or even desirable?).

 

It is possible to use this in Antic 5 ... this is actually a mode I named CIN 12/13

 

The tradeoff is, it requires using Antic 5 with the GTIA set to 11, this reduces the number of colors used to 14, and they are paletted differently depending on normal or inverse characters. For font pictures you would need to do screen flipping to avoid inverse conflicts. Good news is you have enough character sets to cover the whole screen.

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