Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Other » PC Engine, PC-FX » PC Engine's HAM extended color mode
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
PC Engine's HAM extended color mode [message #666] Thu, 08 February 2007 19:05
Administrator  [PM]
Or Horizontal Color interlaced mode Very Happy ( Thanks to Charles for the idea a while back)

The mode effectly gives you a palette of 3375 colors in a 256x224 resolution. The idea comes from the fact that a solid color can be compressed over two alternating frames by switching between two checked patterns. You can see this effect on some NTSC broadcast video.

Here's how it works in a nutshell.

1st) There are two sets of colors, uncompressed and compressed. The uncompressed(normal) colors are R, G, and B 0-7 range. The compressed colors fall between the uncompressed colors values - 0 A 1 B 2 C 3 D 4 E 5 F 6 G 7. This gives a total of 0-14 range for R,G, & B.

2nd) The 256x224 video resolution is actually running in 512x224 high-res video mode. Each pixel is doubled in horizontal length, so a single pixel is represented by two subpixels. A compressed color is an uncompressed subpixel color, followed by the same uncompressed subpixel color with the difference of 1 (to keep flicker at a min).

The display is broken down into odd and even horizontal lines. Compressed color subpixels stored in normal order on even lines. and in inverted order on odd scanlines. This alternates on every frame, so the 60hz display is now 30hz for compressed colors to appear solid. There are limitation with movement so it's best suited for stills or slow frame rate animation.

Here's an ascii representation:

frame even:
scanline 120: 00 00 00 12 12 11 11 34 45 ....
scanline 121: 11 00 00 21 21 11 00 43 54 ....

frame odd:
scanline 120: 00 00 00 21 21 11 11 43 54 ....
scanline 121: 11 00 00 12 12 11 00 34 45 ....

This gives a checked pattern on compressed colored pixels if a single frame is captured from the 60hz display.



The two methods:

There are two methods to go about producing the subpixel inverting process. Both allocate two color slots in a subpalette(16) for a single compressed color. The first method is easy to impliment, as all you have to do is update the VCE at the end of every frame with either the corrosponding normal or inverted palette. This method can be extend to work with sprites as well.

The other method is to shift only the odd scanlines 1 pixel to the left on odd frames, and shift only the even scanlines 1 pixel to the left on even frames. Scanlines that aren't shifted for that paticular frame are in normal position. Ofcourse you have to do an RCR interrupt for every visible scanline. I prefer this method as it produces soft edges between two uncompressed colors on a scanline, so the image can appear a little bit softer. The draw back is that you can't do this to sprites.

Both have the draw back of using two color slots for a compressed color, but if you use the additional SGX BG layer you can theoretically increase the number of colors per tile (with limitation).

There is another method, but there isn't enough bandwidth per frame to do a full screen image. It requires sending alternating images per vblank as well as updating the VCE per vblank.




  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:PCE flashcarts
Next Topic:SuperGrafx VPC demos
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 11 00:04:03 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software