Jump to content
rensoup

mode4 clash fixer tool

Recommended Posts

Here's a very simple tool that I wrote which fixes clashes for pictures that  be displayed in mode4. 

 

m4clash.thumb.png.ad6307e037dbbb3515e8b649081476bc.png

 

it basically replaces color 3 or 4 pixels with the closest matching color if there are color 3 and 4 pixels (depending on which one is most used ) inside a 4x8 tile.

 

Here's a test with a 5 color C64 pic:

 

gollum.png.709017b5e3f7946dd25436d7c62f0336.png

 

and here are the C64 and the Atari version side by side (the A8 version is darker because it goes through Altirra)

 

gollum_cmp.thumb.png.5f9532f2392c6552aaa02451bf832671.png

 

It only works with 5 color pictures (greyscale prefered as the color matching isn't great) and outputs TGAs (error & fixed).

It can also optionally output Atari data although it's not that useful as you'd probably want to apply other conversion processes on top of it.

 

It's nothing complex but someone might find it useful...  

 

m4cf.zip

 

 

 

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites
3 hours ago, rensoup said:

Here's a very simple tool that I wrote which fixes clashes for pictures that  be displayed in mode4. 

 

Nice. I'll check it out.

 

 

3 hours ago, rensoup said:

 

 

and here are the C64 and the Atari version side by side (the A8 version is darker because it goes through Altirra)

 

gollum_cmp.thumb.png.5f9532f2392c6552aaa02451bf832671.png

 

It's not darker "because it goes through Altirra) . In the palette of standard color modes, you cannot get the brightest color. It's only possible in GTIA9 to set the real white.

And, also, the C64 image is dithered to fit to the C64 "C" Brightness levels.  

Interesting to see that the "white" on the Atari image fits better, while the darker colors get too dark.  8 values on the Atari vs. 5 values on the C64. Changing the values and dithering would result in a better picture on the Atari.

 

Share this post


Link to post
Share on other sites
Posted (edited)

Wha?

 

C64 actually has 9 luma values (though I believe very early VIC-2 incarnations had somewhat less).  There are 5 levels of black/grey/white, unsure what equivalence they have on the Atari.  Generally their brightest is more so than ours so white might equate to "16 or 17" if that can be imagined.

Edited by Rybags

Share this post


Link to post
Share on other sites
4 hours ago, Rybags said:

Wha?

 

C64 actually has 9 luma values (though I believe very early VIC-2 incarnations had somewhat less).  There are 5 levels of black/grey/white, unsure what equivalence they have on the Atari.  Generally their brightest is more so than ours so white might equate to "16 or 17" if that can be imagined.

C64 II has 9 luma values. The original has about 5 . It was changed by the time.  That's where discussions always get chaotic. Also when it is about "SID" Music. All the revisions have their typical sounding difference, while that 8580 isn't a real SID, as is meant when people talk about SID music.  

Share this post


Link to post
Share on other sites
11 hours ago, emkay said:

t's not darker "because it goes through Altirra) . In the palette of standard color modes, you cannot get the brightest color. It's only possible in GTIA9 to set the real white.

And, also, the C64 image is dithered to fit to the C64 "C" Brightness levels.  

Interesting to see that the "white" on the Atari image fits better, while the darker colors get too dark.  8 values on the Atari vs. 5 values on the C64. Changing the values and dithering would result in a better picture on the Atari.

Didn't know about GTIA9 but I meant the C64 version might not be coming from an emulator, maybe the original was drawn on a PC.

Share this post


Link to post
Share on other sites
1 minute ago, rensoup said:

Didn't know about GTIA9 but I meant the C64 version might not be coming from an emulator, maybe the original was drawn on a PC.

Yes. The C64 has a lot drawing tools, just like Timanthes. 

Share this post


Link to post
Share on other sites

About the palette. 

 

Here is an old picture done by me in G2F. As there weren't colors changed in a DLI, all colors were just changable by setting the values. 

 

gol2.thumb.jpg.1fec6c2a82ae429c652109f1732db835.jpg

 

To have the real 8 values of brightness for all available colors is a benefit , inspite of the restrictions.  

 

 

 

Share this post


Link to post
Share on other sites
4 hours ago, MrFish said:

This is the C64 palette.

 

C64-palette.png.6c146f0b689896736597a9cc5c534dcd.png

 

Where's the rest of it?

  • Haha 4

Share this post


Link to post
Share on other sites
7 minutes ago, snicklin said:

Where's the rest of it?

 

Funny that the C64 has no yellow. It's in fact a bright (little brownish) green. 

  • Like 1

Share this post


Link to post
Share on other sites
20 minutes ago, emkay said:

Funny that the C64 has no yellow. It's in fact a bright (little brownish) green. 

 

Well, it doesn't end there. There's no blue and there's no true red either. Then there's the issue of having no Caucasian skin tone.

 

Altogether, some pretty glaring omissions.

 

It would have been a better design if the 16-color palette could have each entry chosen from a pool of 256.

 

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
17 hours ago, MrFish said:

This is the C64 palette.

 

C64-palette.png.6c146f0b689896736597a9cc5c534dcd.png

 

MrFish, is this a C64 Tetris game above?


Funny to see that they have no red either. But we have way more greens :)

 

Share this post


Link to post
Share on other sites

They're approximations.  Real yellow is brighter than that and I'm fairly sure they have a proper orange.

Share this post


Link to post
Share on other sites
6 minutes ago, DjayBee said:

On the box

 

https://us-east-1.linodeobjects.com/gunaxin/2016/01/c64_old_original_box-560x247.jpg

 

SCNR

 

Haha... yeah... on the same box that they have a proper red, yellow, and light blue. The fantasy world of advertising.

 

Didn't Atari also use screenshots from Atari 8-bit games when advertising 2600 games? :D

 

 

  • Haha 1

Share this post


Link to post
Share on other sites

To be fair, even with such a crap palette, the quality of some of the C64 pictures are mindblowing. Many are simply impossible to convert on the A8.

Share this post


Link to post
Share on other sites
20 hours ago, emkay said:

About the palette. 

 

Here is an old picture done by me in G2F. As there weren't colors changed in a DLI, all colors were just changable by setting the values. 

 

gol2.thumb.jpg.1fec6c2a82ae429c652109f1732db835.jpg

 

To have the real 8 values of brightness for all available colors is a benefit , inspite of the restrictions.  

 

 

 

Wondering how got those clashes fixed because when I load the original pic in G2F in fails quite badly (5th color and smart color enabled) ?

 

I guess the orange bits are PMGs with prior 0 ?

Share this post


Link to post
Share on other sites
37 minutes ago, rensoup said:

Wondering how got those clashes fixed because when I load the original pic in G2F in fails quite badly (5th color and smart color enabled) ?

 

I guess the orange bits are PMGs with prior 0 ?

The trick is that "Gollum" is build on 4 colors. The 5th color is PMg. The background is the 5th color of the Playfield. And some PMg for the additional color. 

Share this post


Link to post
Share on other sites
20 minutes ago, emkay said:

The trick is that "Gollum" is build on 4 colors. The 5th color is PMg. The background is the 5th color of the Playfield. And some PMg for the additional color. 

ah, didn't expect that...

Share this post


Link to post
Share on other sites

Here's a tricky one:

 

133965.png.4a809ae1f9b78445505ca1a5ee0f0982.png

 

 

 

And here's another one I found while browsing bitfellas.org 😃

 

143942.png.ed8bc8e8171645722d2bfb26e2c13a26.png

 

 

Share this post


Link to post
Share on other sites
14 minutes ago, rensoup said:

Here's a tricky one:

 

133965.png.4a809ae1f9b78445505ca1a5ee0f0982.png

 

 

 

And here's another one I found while browsing bitfellas.org 😃

 

143942.png.ed8bc8e8171645722d2bfb26e2c13a26.png

 

 

The "Duck" might be possible. But a picture that needs  that lot of tricks to get done, isn't a pic for G2F. The editor has too much bugs. Just like "you prepare everything" and one wrong move (not even a click) destroys the editing by changing the prepared values of everything.  Till today I didn't get the logics why TeBe did it that way.  

 

The POP picture could be an easy task. It uses only 11 colors and the border has a color. 

You cannot import a picture like that into G2F directly. A lot hand redraw is needed.

Even the gollum picture was done, changing the picture to 5 colors (grey) , and set the least used color to the background color . The 4 color import is error free then. Then I drew the missing color by editing the PMG. 

Share this post


Link to post
Share on other sites
1 hour ago, rensoup said:

To be fair, even with such a crap palette, the quality of some of the C64 pictures are mindblowing. Many are simply impossible to convert on the A8.

 

VICII has a higher color resolution by default. But they a re only mindblowing, if you think it is ;)

What the Atari is missing, isn't the color resolution. What's missing is the coders who take advantage of the color palette. ;)

 

Both gollum picuters can be displayed one after one on the Atari. But C64 cannot show one of them at all. 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, rensoup said:

Many are simply impossible to convert on the A8.

...and the interesting thing is, that this is vice-versa true, too. (Don't even have to take RastaConverter images for that...)

  • Like 2

Share this post


Link to post
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.

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