show a 256 colors picture in MD
Moderators: BigEvilCorporation, Mask of Destiny
-
- Very interested
- Posts: 101
- Joined: Thu Sep 04, 2008 2:57 am
- Location: China
show a 256 colors picture in MD
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.
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.
-
- Very interested
- Posts: 101
- Joined: Thu Sep 04, 2008 2:57 am
- Location: China
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
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...
viewtopic.php?t=53
Actually i have another demo showing more than 1000 colors on screen but i cannot find anymore link to it...
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.
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 !
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 !
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.
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.
-
- Very interested
- Posts: 2443
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 101
- Joined: Thu Sep 04, 2008 2:57 am
- Location: China
-
- Very interested
- Posts: 211
- Joined: Sat Apr 19, 2008 10:58 am
- Location: Frankfurt, Germany
- Contact:
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
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
-
- Very interested
- Posts: 2443
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 101
- Joined: Thu Sep 04, 2008 2:57 am
- Location: China
I download them,but I can watch in Gens.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
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 101
- Joined: Thu Sep 04, 2008 2:57 am
- Location: China
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Here you go. You'll find the CDX to be one of the best emulators around!zhengyaxin_8bit wrote:The CDX is a your maked emulator,right? Please give me a URL to download it.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.