View Single Post
Old 09 June 2017, 12:00   #40
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,427
Quote:
Originally Posted by kovacm View Post
Thanks, now things are much more clear now.

Just one more thing:

You insist that that CPS does not use planar bitmaps. Can we clear how background tiles work?
---
Now I understand that RAM only hold ID of tile and actual data (pixels) are in ROM.

If every sprite and tile has one 16 color palette so every pixel is stored as 4bit value of palette entry. Also every sprite/tile need to store information which palette he use (one byte is enough if there is 192 different palettes).

So what happens if you need to display background tile (e.g. 16x16px) but from 4th pixel? Player move to right for 3 pixel and entire background should now be displayed shifter for 3 pixels. How hardware do this?
It simple know that should start to read from 4th pixel and after 13 pixels to wrap and read (display) 1st pixel in tile?
I mean there is no need to rotating bits in byte (or more bytes, like in case of ST) on bitplanes (or similar technique) like in ST or Amiga?
Well, most tile based systems have a register that allows you to shift the display by a number of pixels. Then the hardware just fetches it's graphics as normal, but draws them shifted.

I don't know exactly how the CPS-1 hardware does this, but I presume it's similar to how other tile based systems (such as the C64, PC-Engine, MegaDrive/Genesis and SNES) do it: either hide the pixels to draw behind a border, or fetch more columns and rows than are visible and offset them.

This is actually fairly similar to how the Amiga does barrel-shifted scrolling, except the source of the pixels is different (tile ROM/RAM vs bitmap RAM). What might help is to decouple the tiles from drawn pixels in your mind. It really doesn't matter for a display chip what the source of the pixels is. As long as it knows what pixels come next it can draw them and if it has shift circuity, it can shift them while doing so.
roondar is offline  
 
Page generated in 0.04510 seconds with 11 queries