Jump to content
IGNORED

Bitmap image conversions


Opry99er

Recommended Posts

I think I'll necro this old thread to note I've posted a large update to the converter:

 

-Added Half-Multicolor support (bitmap + multicolor flicker) - works!

-Added Multicolor support

-Added dual-multicolor support (multicolor + multicolor flicker) - works!

-Added F18A paletted bitmap -- NOT PROVEN

-Added F18A per-scanline paletted bitmap -- NOT PROVEN

-Added ColecoVision ROM sample output (regular bitmap only)

-Improve blue color matching

-Improve random file selection randomness

-Redesign GUI slightly to make mode selection more clear

 

http://www.harmlesslion.com/cgi-bin/onesoft.cgi?102

 

 

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

And another update, probably going to be it for a while:

 

-Moved configuration dialog to main dialog

-added some default dither pattern buttons, since there's room now

-Fixed size of output files for flicker

-Fixed TIFILES header

 

http://harmlesslion.com/software/convert9918

 

The GUI is a fair bit easier to use now, since you don't have to go back and forth between a separate dialog, and it doesn't automatically reload every time you click anything:

 

post-12959-0-61590500-1342418381_thumb.jpg

 

Also uploaded a YouTube video demonstrating 60 converted images in every one of the 6 available modes:

 

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

You've seen the video, now it is time to share the slideshow program I've been working on that demos all the modes Convert9918 can handle, with 60 images in each mode. It only runs on CF7 since I took advantage of the size of the CF card and automatically swap through the disk images. In addition to four modes on the 9918A (two normal and two flickered), it supports two F18A specific enhancements to bitmap.

 

Because of the large number of images, it is offered as a CF7 image backed up with TIDIR, you should restore it to a 32MB or larger card (actually only the first 18 disk volumes are used, so you could probably manage a 8MB card and just ignore the TIDIR error on restore, but I didn't try it.

 

Make sure volume 1 is mounted somewhere, probably DSK1, and run CF7SLIDE from Editor/Assembler option 5. From there it should be fairly straight forward. Press a key to select a slideshow option. Pictures show for 10 seconds, then the next one loads. When the group is done, it returns to the menu. There are 60 images in each group. You can also press 'space' to advance to the next image, or Back (FCTN-9) to return to menu, or Quit (FCTN-=) to exit.

 

1) for 9918A Bitmap - Standard 9918A bitmap mode (256x192), 12k images. Disk volumes 1-3.

2) for 9918 Multicolor - Standard 9918 Multicolor mode (64x48), 1.5k images. Disk volumes 4-6.

3) for 9918 dual-multicolor (flicker) - Two multicolor (64x48) screens flickered. 3k images. Disk volumes 7-9.

4) for 9918A half-multicolor (flicker) - Multicolor (64x48) and bitmap (256x192) screens flickered. 13.5k images. Disk volumes 10-12.

5) for F18A paletted bitmap - F18A only. If the detection fails, hold SHIFT to force it. Bitmap (256x192) with a custom 15-color palette. 12.03k images. Disk volumes 13-15.

6) for F18A scanline palette bitmap - F18A only. If the detection fails, hold SHIFT to force it. Bitmap (256x192) with a custom 15-color palette on every scanline. 18k images. Disk volumes 16-18.

7) for continuous random - runs a random slideshow of all valid images until you stop it.

 

Source included for Asm994a. Too big to upload here, and I don't intend it as a permanent offering, so http://harmlesslion.com/temp/Cf7SlideWithPics.zip

 

You can add your own images, if you want, but it's not really meant to be user configurable. But there are 20 images per disk volume, and 3 disk volumes per format, so you can just replace the existing images and reupload the volume to your CF7. The notes included should detail that, I think. :)

  • Like 3
Link to comment
Share on other sites

  • 1 month later...

You can add your own images, if you want, but it's not really meant to be user configurable.

 

Now it is!

 

That was my hardest program to debug because of this: http://www.atariage.com/forums/topic/197270-function-dsrlnk-error-someone-can-help/#entry2513874. I forgot that the disk controller use some VDP RAM at >3780... I didn't notice Tursi's comment in HalfMult.a99 in the Convert9918 package.

 

I spent many hours debugging because it worked with Classic99 and MESS but not with the hardware. I tried Funnelweb's DSRLNK, wrote one from stepping in the E/A utilities DSRLNK, tried the same program with E/A assembler and GCC's assembler, read DSR doc from Nouspikel's site, and so on.

 

But that was fun, and I learned a lot of things. ;)

 

http://youtu.be/T4mv67W-oFg

 

BMP_VIEWER.zip

  • Like 1
Link to comment
Share on other sites

Nice!

 

Yeah, the included DSRLNK in my program is actually the Editor/Assembler one too. My own version worked in Classic99 but not on hardware, and despite digging through notes and even the old Scratchpad loader project we did, I couldn't figure out what was wrong (and I needed to move on quickly). Still not sure what I was missing.

 

Nice work!

Link to comment
Share on other sites

  • 7 months later...
Would the ECM modes for tiles (specifically the 3bpp mode) not yield better results in most circumstance?

 

Probably, but they aren't bitmap mode anymore, which is what my tool converts for. Anything without a 2-color-in-8x1-pixels limitation would require a different algorithm.

Link to comment
Share on other sites

  • 8 months later...

I did another update last night to implement a dither called Atkinson's.. it spreads the error out a little further and discards it -- but it does so without the color loss of just dropping some of the data in Floyd-Steinberg. In most of the test images I ran, it looked a little better, but it has a tendancy to replace the finely dithered dots with larger patterns. They tend to look less messy to my eyes and so I made it the default, but I could see that there might be opinions (which is why you can still select all the old modes.) For our resolution and color limitations, though, I think I'm pleased with the results.

 

http://harmlesslion.com/software/convert9918

  • Like 1
Link to comment
Share on other sites

Playing around tonight instead of sleeping, a very small tweak to the default Atkinson dither resulted in the best of both worlds - fine dither pattern and the improved patterns of Atkinson's - it was so much nicer that I updated the program again. If you downloaded it in the last 24 hours, I'd recommend getting it again. :)

 

Just to compare the results:

 

post-12959-0-74416700-1386671343_thumb.png

 

On the left is Floyd-Steinberg, which was the old default. In particular you can see "steps" along the edge of the table and the top of the unplugged E/A cartridge.

 

On the right is the tuned Atkinson - the steppiness is greatly reduced in favor of the patterns -- which I also think tends to look a little less noisy. Part of the reduced noisiness is also discarding color information, this filter discards 37.5% of the error, but blindly doing that with Floyd-Steinberg didn't produce results quite as nice.

 

You can certainly experiment for yourself - that's why the fields are open, but I think the new default is a small step upwards. :)

 

http://harmlesslion.com/software/convert9918

  • Like 4
Link to comment
Share on other sites

  • 3 months later...

Another small step up - I changed the default color matching mode from RGB to YCrCb, and this worked well enough that I made it the default instead of the stretched RGB that I called Perceptual. Now that said - for many images the difference is very hard to see, but of the ones I looked at tonight, most of the ones where I had an opinion looked better under YCrCb matching than Perceptual, and it also removes another hack, which to me must be a better thing. (There are a few where Perceptual may still pop a bit nicer, but at the cost of less color accuracy).

 

Also spent a bit of time working on palette selection for the per-scanline paletted F18A mode. It's still streaky, but it is clearly much better. Still some work to do there though.

 

http://harmlesslion.com/software/convert9918

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Attacked this last night during a fit of insomnia, and finally starting to get good results out of the scanline palette mode for F18A. There's still a color selection problem that manifests in some images, but in about 85% of my test images now, it looks pretty good! Some samples below.

 

v160: http://harmlesslion.com/software/convert9918

 

post-12959-0-35407900-1431754988_thumb.jpgpost-12959-0-83965300-1431754999_thumb.jpgpost-12959-0-13424200-1431755006_thumb.jpgpost-12959-0-71748400-1431755010_thumb.jpgpost-12959-0-23448700-1431755016_thumb.jpg

 

Code for displaying the scanline palette image is included, as well as a description of how it works. It uses the F18A GPU to change the palette every scanline, and requires most of VRAM, though there is a tiny bit free that could conceivably be used for sprites. Because it runs on the GPU, it takes no 9900 CPU time to display (once loaded).

 

  • Like 4
Link to comment
Share on other sites

I can only add a mode for it if is has the 8x1 palette restriction, otherwise it's a different algorithm. I won't have access to my F18A till next year anyway.

 

It hasn't. Each pixel, which is 2x1 normal pixel, can have any of the 16 colors. It's relatively easy to convert an image to this mode in an ordinary image program, but you still need to convert the image to TI format. My F18A plasma demo is using this bitmap mode.

Link to comment
Share on other sites

 

It hasn't. Each pixel, which is 2x1 normal pixel, can have any of the 16 colors. It's relatively easy to convert an image to this mode in an ordinary image program, but you still need to convert the image to TI format. My F18A plasma demo is using this bitmap mode.

 

Yeah, if that existed before I started (when there was no F18A ;) ), the program probably wouldn't even exist. ;)

 

What's the challenge in converting it to a TI Format? Is it just getting the right header? I guess it would be trivial to slap together a quick program that would take a 16-color BMP, strip off the BMP header and drop in a TIFILES PROGRAM IMAGE header (assuming the resolution is valid). Hell, you could even keep the palette data. ;)

Link to comment
Share on other sites

  • 1 year later...

Updated my image converter again, it's nice to be back. ;)

 

-code cleanup, move all functions back into one to ease updates (#ifdefs to produce speed support)

-faster decode (20%)

-add true ordered dither, and modified true ordered dither which balances brightness change (but more likely to produce unpleasant color shift). Old ordered is now called 'pattern'.

-change palette back to Classic99 unscaled palette, looks better these days (only 2% difference though)

-add INI load/save (LOAD not tested 100%... the data comes in but not all tested to make it to GUI). Save includes the palette so you can in theory change the palette now. A [default_palette] entry will always contain the default values in case you need to revert (or just delete the ini).

-tab order is fixed

-allows saving result as PNG (paletted) - not sure if scanline palette F18A works so disabled for now.

-re-enabled the ColecoVision RLE cart to support the PNG entry, but it's still not fixed

 

The true ordered dither is interesting. There's no doubt it looks nicer on many images, although on many others I find it loses more detail than the error diffusion filters. I found the traditional ordered dither made the images brighter, which reduces the detail but also makes for a nice image often. For those that get too washed out, I included a second filter that centers on zero (instead of always being positive), which brightens less. The downside is on some images the color shift is unacceptable. At least it's a faster filter!

 

The ability to save images in a PC-readable format (I chose PNG) was a request, but since I've hacked similar in before, it's now available for real. Also an INI contains configuration. This isn't fully tested yet, but should let you restore in whatever settings you left it. My primary motivation, however, was to expose the internal palette, both so you can see what it is using, and so you can change it if desired. Not fully tested yet though.

 

http://harmlesslion.com/software/convert9918

  • Like 6
Link to comment
Share on other sites

Huh... crashes for me too. And yet I tested from the command line successfully... :)

 

.. and yep... when I changed the command line filename pointer, I missed one reference in the code that brings up the file dialog for manual saving. That makes sense. ;) Sorry for the inconvenience - 165 is online now.

 

You guys really should be changing the fill mode, though, so you don't get the black bars. You'll get better image conversions with the extra pixels available (and in the images in your screenshots, you won't lose anything important off the edges.) I use 'middle' for most things, but 'default' scales the whole image down to fit so nobody would ask why it cropped the edges. ;) (Top/left and bottom/right are the other two options, and align to the edges of the image instead of the center).

 

I can see Convert9918 getting a LOT of use if a program is ever made for the FlashROM 99 to utilize TI format images stored on the cartridges SD card. Anyone and his untrained wife would be able to make neat little presentations/screen saver compilations.

It already gets a lot of use. ;) Anyway, was documentation released on how to access the SD card from a running TI program? I could easily tweak up my slideshow program.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...