Tursi Posted January 26, 2012 Share Posted January 26, 2012 (edited) Yes, I'm at it again!! But damn it, this time I think I've got it. http://www.youtube.com/watch?v=wBkrEvvfFKs I started this just before New Year's, and I'm nearly done with it now. I finally came up with a way to have my image converter create decent-looking screens that flicker between multicolor mode and bitmap mode to increase the apparent number of colors, and tonight I loaded it on hardware to see it work. And it does. Even nicer, there is room left for sprites. I should have done some as a demonstration. It uses most of VRAM though. Very little CPU though. All you do is set up a vertical interrupt callback (or poll for it), and during the blank you change VDP Registers 0 and 1 to switch between bitmap and multicolor modes. I don't have a CRT here to test it on, but in theory it should look best there (I have one at my office, though, I may try that just to see...) My two TVs actually responded differently. My big high-def TV didn't flicker at all - it tried to deinterlace the image! The results were not bad, except in some places it decided to draw separate lines rather than blend the colors. My little monitor had noticable flicker, so I used that in the video. The mechanism turned out to be much simpler than I expected. All I had to do was map the multicolor first to half the image's brightness, and then run my normal dither code on top of that (but taking into account the multicolor contribution). It looks pretty good on most images, not just cartoons, but it's late and this was the image I was testing with tonight. Because we already know that some flicker values may be unacceptable, I added a slider that lets you control how much flicker is acceptable in the result. The slider may need tuning, and I am not sure the best values. Right now it defaults to 95% and that's mostly there to prevent black+white flicker. As you tune the slider lower, the difference in colors should be less but the image will have fewer options and end up blockier. There's a new setting for error control. Previously I just added up the error on every pixel, but I noticed that up to three pixels can contribute an error value to a single new pixel. The actual correction for that pixel should be the average of all three of them, not the sum of all three of them. I think. That's the default mode now, but an option lets you go back to the old mode. I'm not certain the new mode is more correct but it IS less noisy. While I was at it, I completely rewrote the entire dithering engine, throwing out all the experimental code and hacks. As a result, the dithering (for both normal mode and half-multicolor mode) is now much better, with fewer artifacts around the borders and far less bleeding. In addition, all color work is now done internally in floating point to reduce rounding errors. I also fixed a couple of true bugs I found during all this which affected the dithering. Finally, just for demonstration purposes I've added an MSX image output, and I will probably add a ColecoVision one too. They can already use the files I output, but this just makes it easier for them. For TI we already have the XB example code, after all. I am not /quite/ ready to publish the converter - almost! But I didn't post entirely to tease. Here's the sample application from the video - I'd love to hear if it works on other people's machines. (DSK and raw OBJ file included. Editor/Assembler #3 file in both cases, plus source code for the viewer and my notes on the VDP layout). halfmult.zip (edit: there is a typo in readme.txt -- the file on WORK.DSK is "DSK1.TIPLAYER", there's no ".OBJ" part on the disk image.) Edited January 26, 2012 by Tursi 4 Quote Link to comment Share on other sites More sharing options...
kl99 Posted January 26, 2012 Share Posted January 26, 2012 looks interesting, I have to try it out on real machines.... Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted January 26, 2012 Share Posted January 26, 2012 Nice job, brony. I will copy that over to my CF7 and try it out late tonight when I get out of class. I still have a CRT TV, so I will post video. Quote Link to comment Share on other sites More sharing options...
Stuart Posted January 26, 2012 Share Posted January 26, 2012 Are you letting the viewer + image data source code out Tursi? I'll try it on my TM990 VDP card connected to a PC TV tuner card, but I'll need to alter the 9918 read/write/status hardware addresses ... Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 26, 2012 Author Share Posted January 26, 2012 Are you letting the viewer + image data source code out Tursi? I'll try it on my TM990 VDP card connected to a PC TV tuner card, but I'll need to alter the 9918 read/write/status hardware addresses ... I didn't bother to include the image data in the zip since I didn't expect anyone would want to rebuild this project in particular, but I can add them when i get home from work if you like. The viewer itself IS in the zip though. I imagine a TV Tuner card would provide interesting results, depending on how it handles the alternate frames. I need to take a picture of what my big TV does, I was pretty surprised at how it deinterlaced it. Either way, I expect to release the new version of Convert9918 tonight. Quote Link to comment Share on other sites More sharing options...
Willsy Posted January 26, 2012 Share Posted January 26, 2012 Ha! Neat! Talking of Convert9918, here's a picture of God circa 1985 playing a Schecter Custom Stratocaster. Converted with Convert9918. I just love this pic! Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 27, 2012 Author Share Posted January 27, 2012 (edited) Nice conversion! I put up the new version, but I'm way too sleepy to get any new demos up. So I'll just let you have a play with it directly. Here's the actual changelist: -Rewrote dither engine - many previous issues solved -Updated to new compiler -Added half-multicolor mode that works this time! -Added configuration of error accumulation -Added configuration of perceptual ratios -Supports MSX output I need to get some more samples up. Sleepy though. http://harmlesslion....are/convert9918 One thing I did note is that after fixing some of the rounding errors, blue gets selected in dark areas a lot more. I think the default perceptual ratio of 11% for blue may be too low now, but that's why it's adjustable, so we can look for better defaults. Also, with all the configuration options I mean to get saving the config in there, but it's not yet. Edited January 27, 2012 by Tursi Quote Link to comment Share on other sites More sharing options...
rocky007 Posted January 27, 2012 Share Posted January 27, 2012 it's really great tryed on Classic99, need to switch to overdrive to see correctly the effect, i'll try tomorrow also on real ti + crt Quote Link to comment Share on other sites More sharing options...
TEXAS_JOE Posted February 12, 2012 Share Posted February 12, 2012 I love this program! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.