Jump to content
IGNORED

DaDither - another one image converter


DecAns

Recommended Posts

I'm developing a program to convert images to various retro platform formats. I am currently in the process of adding TI-99/4A support. How it looks:

 

Spoiler

TI99.1.png

 

Spoiler

TI99.2.png

 

 

I only know about the TI-99/4A from a few articles on the internet and many questions I couldn't find an answer to. Hope someone can help.

1) Pixel aspect ratio? 1:1?

2) Palette. What are the exact RGB values of the palette colors? Different sources describe different values. The MSX related articles use some values, the program convert9918 uses different values, and Richard F. Drushel's article uses third values. What's better?

3) TIFILES format details. Now my program allows you to export the resulting image to TIFILES (file extensions .TIAP, .TIAC and .TIAM are used similarly to the program convert9918). But I want to fill the file header more fully. What are the valid characters in the Filename field? If I understand correctly, then file extensions are not used. Are there recommended postfixes for image filenames? I noticed that tiimagetool automatically combines files with postfixes _C and _P and shows a color image. Is this the standard?

4) Are there any other standards for graphic files, the conversion to which would be useful to add to the program?

5) F18A. F18A is the same as Yamaha V9938? Or is it an independent video processor? Can 15 or 16 colors be displayed on the screen at the same time?

6) V9938. V9938 has several additional graphics modes (Graphic 4 ... Graphic 7). Are they used in practice? Are there any standards for files containing such graphics?

Edited by DecAns
  • Like 5
Link to comment
Share on other sites

4 hours ago, DecAns said:

I noticed that tiimagetool automatically combines files with postfixes _C and _P and shows a color image. Is this the standard?

It's popular, anyway.  That's the TI Artist convention.  Which is the most prevalent image format for bitmap art, in the platform's library as a whole.  With the two files containing palette and pattern data respectively, of course.  Which can then be trivially loaded on original hardware or integrated into a project, since they just represent the contents of VDP in those respects. 

 

 

Link to comment
Share on other sites

If it helps any, here's the values used by the ADAMEm emulator, and they seem pretty accurate to my eye.

 

/* Several palettes */
byte Palettes[NR_PALETTES][16*3] =
{
 /* Coleco ADAM's TMS9918 palette */
 {
    0,  0,  0,    0,  0,  0,   71,183, 59,  124,207,111,
   93, 78,255,  128,114,255,  182, 98, 71,   93,200,237,
  215,107, 72,  251,143,108,  195,205, 65,  211,218,118,
   62,159, 47,  182,100,199,  204,204,204,  255,255,255
 },
 /* Default V9938 palette */
 {
    0,  0,  0,    0,  0,  0,   32,192, 32,   96,224, 96,
   32, 32,224,   64, 96,224,  160, 32, 32,   64,192,224,
  224, 32, 32,  224, 96, 96,  192,192, 32,  192,192,128,
   32,128, 32,  192, 64,160,  160,160,160,  224,224,224
 },
 /* TMS9918 Black & White palette */
 {
    0,  0,  0,    0,  0,  0,  136,136,136,  172,172,172,
  102,102,102,  134,134,134,  120,120,120,  172,172,172,
  136,136,136,  172,172,172,  187,187,187,  205,205,205,
  118,118,118,  135,135,135,  204,204,204,  255,255,255
 },
 /* V9938 Black & White palette */
 {
    0,  0,  0,    0,  0,  0,  144,144,144,  195,195,195,
   60, 60, 60,  115,115,115,   80, 80, 80,  178,178,178,
  102,102,102,  153,153,153,  198,198,198,  211,211,211,
  100,100,100,  129,129,129,  182,182,182,  255,255,255
 }
};

 

Probably not worth getting too terribly hung up on IMO, since remember TVs of the time had a tint/hue control that could be set to any number of positions by the end user.

  • Like 3
Link to comment
Share on other sites

7 hours ago, DecAns said:

I only know about the TI-99/4A from a few articles on the internet and many questions I couldn't find an answer to. Hope someone can help.

1) Pixel aspect ratio? 1:1?

2) Palette. What are the exact RGB values of the palette colors? Different sources describe different values. The MSX related articles use some values, the program convert9918 uses different values, and Richard F. Drushel's article uses third values. What's better?

3) TIFILES format details. Now my program allows you to export the resulting image to TIFILES (file extensions .TIAP, .TIAC and .TIAM are used similarly to the program convert9918). But I want to fill the file header more fully. What are the valid characters in the Filename field? If I understand correctly, then file extensions are not used. Are there recommended postfixes for image filenames? I noticed that tiimagetool automatically combines files with postfixes _C and _P and shows a color image. Is this the standard?

4) Are there any other standards for graphic files, the conversion to which would be useful to add to the program?

5) F18A. F18A is the same as Yamaha V9938? Or is it an independent video processor? Can 15 or 16 colors be displayed on the screen at the same time?

6) V9938. V9938 has several additional graphics modes (Graphic 4 ... Graphic 7). Are they used in practice? Are there any standards for files containing such graphics?

Your questions suggest you know about Convert9918, and that's my tool. ;)

 

1: image is 256x192 and intended to be displayed on a 4:3 monitor. So, roughly 1:1, yes.

 

2: There is no such thing as an exact RGB value for an analog palette. The colors are generated inside the VDP using analog taps, and according to the chip's designer were tweaked by hand after initial design so might not even exactly match the datasheet's description. As Geoff notes, every output television then had a 'hue' control set to a different position by the user. Classic99/Convert9918 uses values calculated from the datasheet. People can and have had grand arguments about how to interpret the values therein (search the forum to see), but it's ultimately always only going to come down to 'close enough'.

 

3a: TIFILES headers are 128 byte headers that contain the information from the file directory. If you're writing TI Artist files, the values in the header will always be the same and you can used a fixed copy of the header. That's all Convert9918 does. I don't know how many people use the versions with the headers - I don't myself but I meant it for people using the files inside Classic99.
3b: The TIAP, TIAC and TIAM file extensions are my own invention so I can use a photoshop filter to load the files in ThumbsPlus, which requires extensions. Nobody else uses them. ;) 
3c: The filename field is an extension and if you use it, you have defeated the purpose of using the header on the PC. The only value would be if you need characters that are not valid on the PC but are on the TI, of which there are now so few it's hardly worth it (?, *, etc). You are also artificially limiting the size of the filename and if the user should rename the file without using a tool that /also/ changes the embedded name, they may break the file.
3d: The TI filesystem itself does not use extensions, no, so _P and _C are the standard. I also use _M for my tools that can read the extended formats.

 

4: I think YAPP uses a different disk format, but I'm not familiar with it. There's also an RLE format for monochrome images that was popular for a time, but again I don't know the internal details. TI Artist is sort of the standard that won.

5: F18A is a unique add-on unrelated to other VDPs, at least as far as its own graphics capabilities go. It can do 64 colors at a time without tricks (though that's four separate palettes, not a direct mode). Convert9918A supports a scanline palette mode that changes the 16-color palette (via the GPU) every scanline to allow 4096 colors. It can do 16 colors though color 0 will show through as transparent... but you can still change the value of it. It allows this in the standard 9918A modes but also has a couple modes unique to it with different restrictions.

 

I can't help at all with the 9938/9958 though.

 

Edited by Tursi
  • Like 3
Link to comment
Share on other sites

2 hours ago, Tursi said:

People can and have had grand arguments about how to interpret the values therein (search the forum to see), but it's ultimately always only going to come down to 'close enough'.

 


If memory serves, I think one of the folks that recorded some of this ages ago did so using direct measurements from a live system and an oscilloscope. I’d bet money that there’s a reasonable amount of difference in color from one system and/or VDP to another.

Link to comment
Share on other sites

3 hours ago, Tursi said:

You are also artificially limiting the size of the filename and if the user should rename the file without using a tool that /also/ changes the embedded name, they may break the file.

Good point.

 

3 hours ago, Tursi said:

It can do 16 colors though color 0 will show through as transparent... but you can still change the value of it.

So I can use any 16 colors from 4096 to generate the image? Your docs.txt says: "Paletted Bitmap F18A - This defines a 15-color palette that matches the image, and reduces it to that palette." Do you use 15 colors instead of 16?

Link to comment
Share on other sites

59 minutes ago, DecAns said:

Good point.

 

So I can use any 16 colors from 4096 to generate the image? Your docs.txt says: "Paletted Bitmap F18A - This defines a 15-color palette that matches the image, and reduces it to that palette." Do you use 15 colors instead of 16?

Yes, I do. I wanted to be able to set the background color independent of the image, and the F18A's functions were still being defined, so I just went for safe. ;)

 

 

  • Like 1
Link to comment
Share on other sites

3 minutes ago, Nick99 said:

V9938 is saved in MYArt-format, it uses G6 (16 of 512 colors) and G7 (256 colors). There is also interlaced function to get hi-res, which is really nice to be able to use.

I do not know what format they used for the V9958. 

Is it possible to download samples of such files somewhere?

Link to comment
Share on other sites

8 hours ago, DecAns said:

What color will be displayed by default for zero index? If it's black, then can I assume that I can use a palette "fixed black + 15 random colors" and it will be safe?

By default its black, but it's a standard palette entry.

There's no standard tool to /load/ these images, and my viewer (which may? be the only one) reads the entire palette, so you can set it black and then not worry about other assumptions.

 

Link to comment
Share on other sites

In addition to the modes inherited from the 9918A, the F18A has the ability to place a bitmap layer on top of the tile layer(s). With the right configuration the bitmap layer can fill the entire screen, and in addition you can choose between normal pixels with 4 colors (2 bbp) or fat (2x1) pixels with 16 colors (4 bpp). The latter is the only general bitmap mode that the F18A supports with 16 colors. Other "modes" are like C64 fli modes where you have to change the colors while the image is drawn.

Link to comment
Share on other sites

So, the program can create the following images

 

Bitmap:

TiTest_Bitmap_BW.pngTiTest_Bitmap_Gray.pngTiTest_Bitmap_Color.pngTiTest_Bitmap_ColorGray.png

Bitmap color only:

TiTest_Bitmap64_BW.pngTiTest_Bitmap64_Gray.pngTiTest_Bitmap64_Color.pngTiTest_Bitmap64_ColorGray.png

Multicolor:

TiTest_MC_Color.png

Dual Multicolor:

TiTest_MC_Color_Dual.png

F18A Palette Bitmap:

TiTest_Bitmap_Pal_Gray.pngTiTest_Bitmap_Pal_Color.png

F18A Scanline Palette Bitmap:

TiTest_Scanline1.pngTiTest_Scanline2.pngTiTest_Scanline3.pngTiTest_Scanline4.png

 

The program creates raw files (.P, .C, .M) and TIFILES (.TIAP, .TIAC, .TIAM). The files are fully compatible with files created by the convert9918 program.

 

I did not implement the Half-Multicolor mode (I could not figure out how it works), I hope to return to it in the future. Unfortunately no one has provided samples of MyArt files, so the modes of V9938 are not implemented either.

 

Hope the program will be useful to someone.

Edited by DecAns
  • Like 9
Link to comment
Share on other sites

OK, I am attaching some files here along with some pictures using MAME with Geneve 9640 emulation.  The file MYARTLOAD comes from a source file for Myarc Advanced Basic for the Geneve that details the file format.  It is a DIS/VAR 80 file with a TIFILES header.

 

 

image.thumb.png.23a8dc65b0fe7e743ebc9efc093f86fa.png

image.thumb.png.143dd7b38b54fe43dc3c418bbf34e60b.png

 

image.thumb.png.12e0255e790fa27929b4247b96417aa1.png

 

HUNICORN HWOLF MYARTLOAD HDRAGON

  • Like 1
Link to comment
Share on other sites

I've always understood that these 3 pictures, along with the boot screen Swan, were created by Mikyung Kim.
 

She was a very talented professional digital artist. I've once seen her demo reel featuring cute animal animations for the 1988(?) Olympics, then  animated robots. I think also ACM SIGGRAPH material. (Probably created using Sun workstation and  full color Targa frame buffer. This was in the Image Processing Lab at Rensselaer. I met her one time there in 1989.) 

 

I'd like to find the  rendering  of a lobster that she created for the cover of an ACM SIGGRAPH program book. Might have been 1988. That would be a candidate for dithering! 

 

Mikyung Kim passed in 1994. Please don't go into the painful details here. 

 

 

 

  • Like 2
Link to comment
Share on other sites

And once again about TIFILES.

1) Do I have to fill in the fields "#Rec/sect", Rec length, #Level-3 records?
2) Is there a list of characters that are allowed to be used in the Finename field? 'A'-'Z', '0'-'1', '_', something else?

3) What are the benefits of saving to TIFILES format over a headerless file?

Link to comment
Share on other sites

MyArt Format specification ambiguity. There is Flag byte and we have different variants. Descriptions says:

 

Quote

Version / Flag byte

The flag byte in position 1 varies between different programs (MyArt, YAPP etc.).

Barry Boone's MyArt loader considers 0xFF as indication for the G6 mode.

According to the documentation of the XHi program (A. Hulpke), the Austrian MYLOAD tool uses bits 4-6 for the mode bits M5, M4, M3 of video register 0, i.e. for 512 columns (G6) it is expected to be xxxx1010, and for 256 columns (G7) it is xxxx1110.

For MyArt, values for the flag byte are 0x9E and 0xFA (G6 or G7), possibly as a version indicator.

What should I write in the flag byte?

 

Also I'm looking for sample YAPP and FRACTALS images. It doesn't have to be something highly artistic. If there are a couple of circles and rectangles, then that's fine with me.

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