Page 1 of 2

show a 256 colors picture in MD

Posted: Thu Jun 21, 2012 3:20 pm
by zhengyaxin_8bit
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.

Posted: Fri Jun 22, 2012 12:06 pm
by Stef
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 :)

Posted: Fri Jun 22, 2012 4:43 pm
by zhengyaxin_8bit
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

Posted: Fri Jun 22, 2012 6:09 pm
by Stef
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...

Posted: Fri Jun 29, 2012 12:44 am
by Nemesis
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.

Posted: Fri Jun 29, 2012 8:22 am
by Eke
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 !

Posted: Fri Jun 29, 2012 7:22 pm
by TapamN
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.

Posted: Fri Jun 29, 2012 7:26 pm
by TmEE co.(TM)
I've done it, and few friends too. It is awesome but pixels are wide and it is sometimes difficult to sync to VDP.

Posted: Sat Jun 30, 2012 2:10 am
by zhengyaxin_8bit
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?

Posted: Sat Jun 30, 2012 11:08 pm
by Oerg866
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

Posted: Sun Jul 01, 2012 7:58 pm
by TmEE co.(TM)
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...

Posted: Mon Jul 02, 2012 5:41 pm
by zhengyaxin_8bit
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:

Posted: Tue Jul 03, 2012 1:47 am
by Chilly Willy
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

Posted: Tue Jul 03, 2012 1:56 am
by zhengyaxin_8bit
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.

Posted: Tue Jul 03, 2012 3:08 am
by Chilly Willy
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: