show a 256 colors picture in MD

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

show a 256 colors picture in MD

Post by zhengyaxin_8bit » Thu Jun 21, 2012 3:20 pm

I think we can show a special 256 colors picture in MD.
So, we split one screen to four part,0-6,7-13,14-20,21-27 line.
When vdp show them, we change all the color palette.

User avatar
Stef
Very interested
Posts: 2957
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Jun 22, 2012 12:06 pm

Of course this is possible, some games display more than 64 colors in game.
On static image you can a lot more, there is a small demo showing more than 1000 colors on a single screen :)

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Fri Jun 22, 2012 4:43 pm

Stef wrote:Of course this is possible, some games display more than 64 colors in game.
On static image you can a lot more, there is a small demo showing more than 1000 colors on a single screen :)
Wow!! How to do this,Where I can download this demo and source code? :o

User avatar
Stef
Very interested
Posts: 2957
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Jun 22, 2012 6:09 pm

Just check the 960 colors demo on this page :

viewtopic.php?t=53

Actually i have another demo showing more than 1000 colors on screen but i cannot find anymore link to it...

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

Post by Nemesis » Fri Jun 29, 2012 12:44 am

I've actually been thinking of trying a really crazy high-colour demo for the Mega Drive. It should be possible, using the trick Mickey Mania shows in the Moose Chase level of disabling the display during hblank and performing DMA to change the palette between lines, at the sacrifice of some sprites on the next line, to change the palette each scanline, and I believe there should be enough sprites left after this change to still apply a full frame sprite mask for shadow/highlight purposes, so it should be possible to potentially get a unique 61 colour palette per line. With the help of shadow/highlight there are 15 unique values per colour channel, giving a total pool of 3375 unique colours to choose from, all of which it should be possible to display if the palette can be cycled each line.

Eke
Very interested
Posts: 856
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Jun 29, 2012 8:22 am

Since shadow/highlight mode affects all channels, i don't see how you could have so much distinct colors.

So it's more like 3x8x8x8 (1536) colors minus the ones that are common in the different modes: for each channel, levels 0, 2, 4, 6 are common to normal and shadow modes, levels 8, 10, 12, 14 common to normal and highlight modes and level 7 common to shadow and highlight modes, which gives 4x4x4 + 4x4x4 + 1 = 129 duplicate colors, for a total of 1536 - 129 = 1407 unique colors !

TapamN
Interested
Posts: 15
Joined: Mon Apr 25, 2011 1:05 am

Post by TapamN » Fri Jun 29, 2012 7:22 pm

On the Beyond3D forums, there was a post by a guy who did late commercial development for the Genesis, and one trick he did research into was turning the screen off, and DMAing onto the background color to get a 9 bit color linear frame buffer. Has anyone tried this?

He said that not all pixels were the same width, and different hardware models had different distortions. (Both probably caused by main RAM refresh.)

He didn't say how you would sync the DMA start to the raster position, but maybe doing a DMA while the screen is on outside of vblank, timed by polling the raster postion would work? That should get the CPU timing locked into the VRAM access slots.

Of course, you wouldn't get the extra shadow/highlight colors from this, and it would lose a lot of CPU time to the DMA, but it seems pretty simple to implement and would allow for some unique effects.

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

Post by TmEE co.(TM) » Fri Jun 29, 2012 7:26 pm

I've done it, and few friends too. It is awesome but pixels are wide and it is sometimes difficult to sync to VDP.
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

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Sat Jun 30, 2012 2:10 am

TmEE co.(TM) wrote:I've done it, and few friends too. It is awesome but pixels are wide and it is sometimes difficult to sync to VDP.
Can you release a demo or a picture?

Oerg866
Very interested
Posts: 211
Joined: Sat Apr 19, 2008 10:58 am
Location: Frankfurt, Germany
Contact:

Post by Oerg866 » Sat Jun 30, 2012 11:08 pm

the so-called 960/1000 color methods are not viable because these are just tricks that would be hard to calculate for real-world scenarios according to what's actually displayed on screen.

The method nemesis describes is not possible because there is not enough time during hblank to write a new palette line. tiido once told me you can only write ~3-4 (data) words to the VDP during that small time frame.

As for the DMA to CRAM method, It's actually much harder to pull off than tmee describes. Syncing it to the VDP is a bitch, and any wrong action will cause the machine to crash...

You need to sync to the VDP by carefully overwriting the fifo, turning the display off and then starting the dma. I might dig up the source code later, if you wish.

I got it to work and here's a binary you can test on a real machine:

ftp://ftp.mdscene.net/pub/temp/BITMAP336.BIN

ftp://ftp.mdscene.net/pub/temp/360colorbitmap.avi <--- real hw capture.

Cheers

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

Post by TmEE co.(TM) » Sun Jul 01, 2012 7:58 pm

Nemesis method involves disabling VDP in HBL, and that does give enough time to write all of the palette, but exactly all of it, so there's gonna be some jitter issues onm left of screen I think...
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

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Mon Jul 02, 2012 5:41 pm

Oerg866 wrote: I got it to work and here's a binary you can test on a real machine:

ftp://ftp.mdscene.net/pub/temp/BITMAP336.BIN

ftp://ftp.mdscene.net/pub/temp/360colorbitmap.avi <--- real hw capture.

Cheers
I download them,but I can watch in Gens. :oops:

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

Post by Chilly Willy » Tue Jul 03, 2012 1:47 am

Yeah, emulators aren't designed to handle this... neither Gens/GS nor Fusion handle it correctly. It works great on my CDX - very stable. Any source on this? I'd like to do some experimenting with it. :D

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Tue Jul 03, 2012 1:56 am

Chilly Willy wrote:Yeah, emulators aren't designed to handle this... neither Gens/GS nor Fusion handle it correctly. It works great on my CDX - very stable. Any source on this? I'd like to do some experimenting with it. :D
The CDX is a your maked emulator,right? Please give me a URL to download it.

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

Post by Chilly Willy » Tue Jul 03, 2012 3:08 am

zhengyaxin_8bit wrote:
Chilly Willy wrote:Yeah, emulators aren't designed to handle this... neither Gens/GS nor Fusion handle it correctly. It works great on my CDX - very stable. Any source on this? I'd like to do some experimenting with it. :D
The CDX is a your maked emulator,right? Please give me a URL to download it.
Here you go. You'll find the CDX to be one of the best emulators around! :lol:

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests