Jump to content
IGNORED

Mode 15 PAL Blending?


Recommended Posts

Hey PopMilo, very interesting demo!

I know it's an old thread, but did you make the edit tools and asm code available for this mode?

Cheers, Tony

Yes it's old but not neglected ;)

 

Here is one recent experiment:

post-14652-0-51811900-1507114401.png

 

Source:

mixgraphicmodes.asm

 

Executable:

mixgraphicmodes.xex

 

Binary for image:

rvr.bin

 

So only thing missing for you to experiment with is python converter... I have a gui version that's kinda easy to work with, but one important part still need manual value editing in source - color mapping from 16 color pc bitmap image to PalBlending 16 "colors". When I figure that out I'll upload exe or source in python, what ever people want to use...

 

ps. If anyone has ideas on how best to handle color mapping automatically or semi-auto please feel free to write !

  • Like 6
Link to comment
Share on other sites

Great Stuff Popmilo!!! I really look forward to getting that Python script, source will be great!

 

By the way, I have been experimenting with CIN graphics previously, and encountered an issue with interrupts.

(http://atariage.com/forums/topic/270603-problems-with-cin-graphics-in-cc65/?p=3859751)

 

Let me explain the background: I made a racing game for C64 in CC65, and now I am porting to Atari.

However, when using interlaced GFX modes, setting up the interlace interrupts kill the CC65 interrupts (like keyboard, timers...).

 

Would you know how I can keep the CC65 interrupts running??

Link to comment
Share on other sites

Let me explain the background: I made a racing game for C64 in CC65, and now I am porting to Atari.

However, when using interlaced GFX modes, setting up the interlace interrupts kill the CC65 interrupts (like keyboard, timers...).

 

Would you know how I can keep the CC65 interrupts running??

 

If Atari-MGM.zip is the code your are talking about, it's obvious.

 

You are disabling the ROM and put your own NMI routine to the CPU NMI vector. Your routine doesn't do anything for keyboard, timers, etc. How do you expect them to still work?

Link to comment
Share on other sites

 

If Atari-MGM.zip is the code your are talking about, it's obvious.

 

You are disabling the ROM and put your own NMI routine to the CPU NMI vector. Your routine doesn't do anything for keyboard, timers, etc. How do you expect them to still work?

Dear Sanny,

I suspected something like that, but I am not familiar with the ATARI registry.

The NMI vector is linked to the VBI_Handler, is there a way I can relocate this Handler somewhere else?

 

P.S: Attached is my latest version of the code.

Atari-MGM.zip

Link to comment
Share on other sites

Yes it's old but not neglected ;)

 

Here is one recent experiment:

attachicon.gifrvr.png

 

Source:

attachicon.gifmixgraphicmodes.asm

 

Executable:

attachicon.gifmixgraphicmodes.xex

 

Binary for image:

attachicon.gifrvr.bin

 

So only thing missing for you to experiment with is python converter... I have a gui version that's kinda easy to work with, but one important part still need manual value editing in source - color mapping from 16 color pc bitmap image to PalBlending 16 "colors". When I figure that out I'll upload exe or source in python, what ever people want to use...

 

ps. If anyone has ideas on how best to handle color mapping automatically or semi-auto please feel free to write !

I should mention: your xex file works correctly in Altirra, but not on my actual 130XE. It produces a garbled screen and high pitch sound.

  • Like 1
Link to comment
Share on other sites

Yes it's old but not neglected ;)

...

 

So only thing missing for you to experiment with is python converter... I have a gui version that's kinda easy to work with, but one important part still need manual value editing in source - color mapping from 16 color pc bitmap image to PalBlending 16 "colors". When I figure that out I'll upload exe or source in python, what ever people want to use...

 

ps. If anyone has ideas on how best to handle color mapping automatically or semi-auto please feel free to write !

Luma 0 or luma 2 (joystick up), plus scanline jitter (joystick button), plus altirra pal, fullscreen, pal artifacting and frame blending --> perfect! x)

Maybe frame blending is kind of cheating (unless you have a "modern" tv that do it for you.. whenever you like it or not), but is difficult to get the "correct" screen interlace look in emulation.

 

If you were to do a game would you try using irq's instead of fullscreen dli's? (and maybe narrow mode).

 

What do you mean with color mapping? re paletizing to your 16 (?) colors?

I recently did code to re-palettize (c#, unity) a png using a 256 color palette and also to compress (shrink) images to different zoom levels.

Don't know if that would help.

I was using Imagemagick before, but I wanted more control about what colors you get when you shrink an image, and you start blending a lot of pixels into one..

Edited by NRV
Link to comment
Share on other sites

Couldn't resist doing a small picture using gameboy tiles, colored by hand.

I added some code to the script to modify a picture to show what you would see in pal emulation, but packing the pixels for 2bits per color would be pretty simple.

 

Original: (Altirra's palette, 128 pixels wide)

 

post-11240-0-25223000-1507259501.png

 

With color + luma lines (with pal artifacting):

 

post-11240-0-92644900-1507259510.png

  • Like 9
Link to comment
Share on other sites

Couldn't resist :)

 

post-14652-0-33866100-1507410437_thumb.png

 

And here is executable:

mixgraphicmodes.xex

 

Think this is the last one I will do manually.... Pairing each of 16 colors to a good Atari color with those 4 shades, 4 colors limitations is just too much...

Need to make it done by converter... Just to figure out how to find best "main" 4 colors based on input image and then map correct colors to image....

 

PS. Please, if anyone can try this on CRT - do it ! You won't regret :D

PPS. Imagine game running on that TV with gfx like this ;)

Edited by popmilo
  • Like 4
Link to comment
Share on other sites

Don't know if your converter or what, but your version seems to miss the darker reds and some of the greens.

I did a fast version also, it should look more like this:

 

post-11240-0-15378200-1507518195.png

 

screen.xex

 

Also, I suppose using the pal palette from altirra is not that correct for this conversions, because the final image seems to have half the saturation.

  • Like 2
Link to comment
Share on other sites

Don't know if your converter or what, but your version seems to miss the darker reds and some of the greens.

 

Not to worry. It was just a quick late night conversion with hand mapping colors. Consider it a proof of concept, not the best possible solution :)

 

On topic of color choices, I'm thinking there's only a limited number of combinations. 4 shades can be calculated easily from image and 4 colors can be only 4 out of 16. If my math skills are ok it's "only" 1820 color combos. Would be pretty easy to let pc go through all these and find one with smallest difference to original picture.

Any good recommendation on an algo for comparing two images for similarity ?

 

Even if this algo takes minutes or hours at a time it would discover best color combo for that image so if you later want to convert 100x images(sprites, levels etc) with same palette you're still good.

Link to comment
Share on other sites

Popmilo, for the game I am developping I need to show a multicolor map in 160x192 (MGM ok), with 4 Players on top.

However, the MGM mode seems to hack into the PM code, which means they are not available for player drawing.

Is there any way round this?

I'm glad to help, but you gotta tell me what MGM is :)

There's no obstacle for PM and what ever gfx mode that is to work together I guess.

Link to comment
Share on other sites

Aaaand.. couldn't resist doing a couple more.. this is kind of relaxing, like a coloring book x)

 

post-11240-0-39709400-1507788917.png

house.xex

 

post-11240-0-96254500-1507788956.png

wario.xex

 

Altirra's palette, pal, pal blending.. hope they look good in a real tv.

 

Both pictures have one color (hue) change for the last 32 scan lines (and that simple change gets you 4 new colors).

All players are free, so you can still add a lot of color if you really need it.

 

Should do this with irq's, but didn't have the time..

 

Regards.

  • Like 11
Link to comment
Share on other sites

Aaaand.. couldn't resist doing a couple more.. this is kind of relaxing, like a coloring book x)attachicon.gifhouse.pngattachicon.gifhouse.xexattachicon.gifwario.pngattachicon.gifwario.xexAltirra's palette, pal, pal blending.. hope they look good in a real tv.Both pictures have one color (hue) change for the last 32 scan lines (and that simple change gets you 4 new colors).All players are free, so you can still add a lot of color if you really need it.Should do this with irq's, but didn't have the time..Regards.

Would this be workable in Antic 4 mode to get the PF3 combinations, and 23 colors instead of 16?

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