Difference between revisions of "Mode R"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(Created page with "The new mode, called Mode R (R from Raster and Rhino, of course hehe), try achieve a resolution of until 384x272 and >16 colors in screen. It is basically mode 0 in horizontal i...")
(No difference)

Revision as of 15:41, 10 August 2012

The new mode, called Mode R (R from Raster and Rhino, of course hehe), try achieve a resolution of until 384x272 and >16 colors in screen.

It is basically mode 0 in horizontal interlace. Due to interlace effect, some colors are blend very well, and others tremble (typical in interlaced modes). Then, the number of colors displayed finally in screen is not easy to know, also depends on whether you use the same palette for both frames or not, but basically we can say the max number of colors is theoretically of 240 (16*15).

To achieve horizontal interlace, it is necessary to move one frame half mode 0 pixel horizontally, the only way I found to do it is using the CRTC register 2 (Position of horizontal sync. pulse), switching the value per each vertical line. By example, if I want a value of 46 for my horizontal screen position, I must switch between 46 and 45 then I get the objective, approximately half mode 0 pixel horizontal scroll every two vertical lines (note that it is not a standard interlace because the lines are interlaced alternately)

This scroll is valid only for one frame, for the second, it is necessary achieve the reverse scroll result, to achieve this, I use the CRTC again, this time the register 5 (Vertical raster adjust) commuting between two consecutive values, the values depends where you want the screen vertically (note that due to the vertical change, it is necessary move down 1 pixel in one frame in order to counteract the vertical scroll effect).

Now, it is only necessary switch the frames (using CRTC register 12) and the vertical raster adjust (CRTC register 5) in order to apply the correct horizontal scroll per each vertical blank.

For a 384x272 screen, this mode requires 52224 bytes of video memory.