popmilo Posted October 4, 2017 Share Posted October 4, 2017 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: 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 ! 6 Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted October 4, 2017 Share Posted October 4, 2017 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?? Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted October 4, 2017 Share Posted October 4, 2017 Just checked now, and I have the same problem with MGM: the interlace kills the CC65 interrupts (see attached).Any help would be greatly welcome! And Oh... I have another question: do you have a few lines of assembly to exit MGM and returns to character mode? Atari-MGM.zip Quote Link to comment Share on other sites More sharing options...
sanny Posted October 4, 2017 Share Posted October 4, 2017 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? Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted October 4, 2017 Share Posted October 4, 2017 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 Quote Link to comment Share on other sites More sharing options...
sanny Posted October 4, 2017 Share Posted October 4, 2017 See http://www.atariarchives.org/mapping/memorymap.php#512,513for DLIs. See http://www.atariarchives.org/mapping/memorymap.php#546,547for VBIs. Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted October 4, 2017 Share Posted October 4, 2017 Yes it's old but not neglected Here is one recent experiment: rvr.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 ! 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. 1 Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted October 4, 2017 Share Posted October 4, 2017 See http://www.atariarchives.org/mapping/memorymap.php#512,513for DLIs. See http://www.atariarchives.org/mapping/memorymap.php#546,547for VBIs. Thanks mate! That's deep reading though, gonna take me a while to get my head round this. Quote Link to comment Share on other sites More sharing options...
NRV Posted October 4, 2017 Share Posted October 4, 2017 (edited) 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 October 4, 2017 by NRV Quote Link to comment Share on other sites More sharing options...
NRV Posted October 4, 2017 Share Posted October 4, 2017 (edited) deleted Edited October 4, 2017 by NRV Quote Link to comment Share on other sites More sharing options...
NRV Posted October 6, 2017 Share Posted October 6, 2017 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) With color + luma lines (with pal artifacting): 9 Quote Link to comment Share on other sites More sharing options...
popmilo Posted October 7, 2017 Share Posted October 7, 2017 (edited) Couldn't resist 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 PPS. Imagine game running on that TV with gfx like this Edited October 8, 2017 by popmilo 4 Quote Link to comment Share on other sites More sharing options...
ivop Posted October 8, 2017 Share Posted October 8, 2017 To find the main colors, you could convert the image to YUV, set the Y component of all pixels to (the same) low value, convert back to RGB, quantize to 4 color palette. 2 Quote Link to comment Share on other sites More sharing options...
NRV Posted October 9, 2017 Share Posted October 9, 2017 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: 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. 2 Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted October 9, 2017 Share Posted October 9, 2017 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? Quote Link to comment Share on other sites More sharing options...
popmilo Posted October 9, 2017 Share Posted October 9, 2017 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. Quote Link to comment Share on other sites More sharing options...
popmilo Posted October 9, 2017 Share Posted October 9, 2017 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. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted October 9, 2017 Share Posted October 9, 2017 isn't color matching algo done in rastaconverter? have a look at github? Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted October 9, 2017 Share Posted October 9, 2017 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. Thanks Popmilo, I have just sent you a PM now. Quote Link to comment Share on other sites More sharing options...
NRV Posted October 12, 2017 Share Posted October 12, 2017 Aaaand.. couldn't resist doing a couple more.. this is kind of relaxing, like a coloring book x) house.xex 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. 11 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted October 12, 2017 Author Share Posted October 12, 2017 Beautiful! Quote Link to comment Share on other sites More sharing options...
ilmenit Posted October 12, 2017 Share Posted October 12, 2017 Something similar with my tool for mixing. 5 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted October 12, 2017 Share Posted October 12, 2017 2013? never heard of it or me getting old... Quote Link to comment Share on other sites More sharing options...
popmilo Posted October 16, 2017 Share Posted October 16, 2017 Aaaand.. couldn't resist doing a couple more.. this is kind of relaxing, like a coloring book x) house.png We have to make a demo of this mode with some moving sprites I'm really interested in what speed and size can a reasonable number of sprites move around in this mode... 2 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted October 17, 2017 Share Posted October 17, 2017 Aaaand.. couldn't resist doing a couple more.. this is kind of relaxing, like a coloring book x)house.pnghouse.xexwario.pngwario.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? 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.