Direct Color Demo using DMA

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Chilly Willy
Very interested
Posts: 2791
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Jul 31, 2012 2:49 am

Nemesis wrote:Wow, kudos to everyone who's contributed to this technique. I worked on the exact same thing: getting a stable horizontal raster position and modifying the background colour to display a full colour image, just six months or so back, and I couldn't get it stable, there was always jitter, and after that experiment I honestly had believed getting a stable position was impossible. Well done guys, this is a major step forward.
That's all Oerg866, I think. I've tried quite a few things, but only tiny changes to his code are stable. It's very touchy, but once you have it stable, it's actually really stable so far as I've seen. The difference between rom, work ram, and word ram only shifts the screen a few pixels. 32 cell mode is a bit more touchy... I'm still looking at how to make it stable with word ram.

LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH » Mon Oct 08, 2012 9:31 pm

sega16 wrote:My converter now supports Riemersma dithering
http://sega16.x10.mx/direct_color_converter_v_2.zip
To use Riemersma dithering use -i2r or -i3r instead of -i2 or -i3 depending on the color depth that you want.
Here is a sample output
Image
I personally think Riemersma dithering looks abit better.
This website http://bisqwit.iki.fi/story/howto/dither/jy/ has some different order dither algorithms I will implant them next version.
I would like suggest another option. As was famously done on the MD back in the day with many games, I'd like to see an option to do X-only ordered dithering (which results in the typical vertical lines seen in MD games). I call it "X-only" because it's unambiguous, lots of people call it "vertical dithering" which is completely wrong, and for the same reason "horizontal dithering" may be confusing :P

ICEknight
Very interested
Posts: 51
Joined: Mon Apr 23, 2012 10:41 am

Post by ICEknight » Thu Nov 01, 2012 2:42 am

I'd like to second the request for supporting the Mega Drive's trademark and apparently incorrectly named "vertical dithering"... If it's not much of a hassle to implement.

Nemesis
Very interested
Posts: 773
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Tue Nov 13, 2012 12:51 pm

For anyone who's interested, I just posted info on the exact reasons why the direct color demo works from a timing point of view, and posted some alternate timing code for H32 and H40 mode which is a bit simpler and leaves some more cycles free. See the following thread:
viewtopic.php?p=17682#17682

Chilly Willy
Very interested
Posts: 2791
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Nov 13, 2012 6:10 pm

Nemesis wrote:For anyone who's interested, I just posted info on the exact reasons why the direct color demo works from a timing point of view, and posted some alternate timing code for H32 and H40 mode which is a bit simpler and leaves some more cycles free. See the following thread:
viewtopic.php?p=17682#17682
YAY!! Thanks to your excellent work on analyzing the DMA direct color code and the VDP internals, I've got narrow mode working properly from the SCD word ram! :D

Here's the latest SCD demo for DMA direct color. It shows a series of images that are 160 or 128 wide (it prints the dimensions before showing the image). Press any button to go to the next image. This could just as easily be a video frame or the display buffer of a SCD game. This mode would be very good for voxel type games.

http://www.mediafire.com/?j433ka081khwbb8

The ISO is compiled with the US CD boot loader, so it won't run on European or Japanese systems without something to bypass the bios region check (MegaCart, Md Myth, or Everdrive).

Chilly Willy
Very interested
Posts: 2791
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Feb 10, 2013 7:06 pm

Here's the latest demo: http://www.mediafire.com/download.php?by2cqgakuqs4ecc

It just has one more pic someone wanted to see, and an EU boot ISO... which is why I'm posting here, mainly toward Nemesis. Apparently, 160 wide mode isn't stable on EU systems. So the H40 timing on PAL consoles is apparently different than NTSC. He says it "jolts back and forth". I don't have a PAL system for testing, so I may have to make blind changes and send them to the guy for testing until I find something.

TmEE co.(TM)
Very interested
Posts: 2375
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Feb 10, 2013 7:10 pm

I never had any problems with 160 pixel modes, either with PAL or NTSC master clock nor with 50/60 setting.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2791
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Feb 10, 2013 7:35 pm

TmEE co.(TM) wrote:I never had any problems with 160 pixel modes, either with PAL or NTSC master clock nor with 50/60 setting.
Hmm - can you try that last demo in PAL? Maybe it's a change I made between earlier versions and the last change I made based on Nemesis's analysis of the code.

TmEE co.(TM)
Very interested
Posts: 2375
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Feb 10, 2013 7:53 pm

Near rock solid image, I got a one frame of few pixel shift sometimes. Happens less than once per 10 seconds.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2791
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Feb 10, 2013 8:22 pm

TmEE co.(TM) wrote:Near rock solid image, I got a one frame of few pixel shift sometimes. Happens less than once per 10 seconds.
Hmm - I'd like that to be "rock solid" rather than "near rock solid". I can see where "near" might be not so near on some consoles/TVs.

TmEE co.(TM)
Very interested
Posts: 2375
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun Feb 10, 2013 8:28 pm

I saw it once in 60Hz too, when I made some 60Hz runs a moment ago.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Orion_
Very interested
Posts: 52
Joined: Mon May 02, 2011 2:26 pm
Location: France
Contact:

Post by Orion_ » Wed May 08, 2013 12:32 pm

I tried to do some simulation with Direct Color DMA mode, but I get better result with 4 palettes tile mode.

Direct DMA RGB:333 160x224 -> 320x224 simulation
Image

Tile mode 4 palettes RGB:333 320x224 (Fusion emu screenshot)
Image

I used this plugin to do the 9bits dithering: http://www.ximagic.com/cd_index.html
Last edited by Orion_ on Wed May 08, 2013 2:13 pm, edited 1 time in total.
Retro game programming !

TmEE co.(TM)
Very interested
Posts: 2375
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed May 08, 2013 1:44 pm

That image would look good even in 16 colors only...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2791
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed May 08, 2013 6:05 pm

Orion_ wrote:I tried to do some simulation with Direct Color DMA mode, but I get better result with 4 palettes tile mode.

Direct DMA RGB:333 160x224 -> 320x224 simulation
Image

Tile mode 4 palettes RGB:333 320x224 (Fusion emu screenshot)
Image

I used this plugin to do the 9bits dithering: http://www.ximagic.com/cd_index.html
Yes, the higher resolution allows for a tighter dither pattern, which would look better. Direct Color DMA is better under different circumstances - like not having all four palettes, or a game without dithering. DCD is just another tool for devs to choose from if it fits their purposes.

greatkreator
Very interested
Posts: 153
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Re: Direct Color Demo using DMA

Post by greatkreator » Wed Nov 25, 2015 3:17 pm

It would be a perfect thing if wouldn't have the vertical doubled pixel columns.
Unfortunately it is still almost useless because of them.
I guess that's why there were no games using it.
Sega's creators definitely knew about that feature.

I still hope and believe in the miracle that it's possible to remove them somehow magically :D
We just need to change a bit the physical laws...

Post Reply