Zilog z80 to Motorola 6809 Transcode – Part 003 – Handling the VideoRAM

When I ported Space Invaders to the 6809 I pretty much converted the entire code to 6809 all in one go.  Then I went through the routines one by one from low memory to high.  This meant that when I was done, it should just work.  I was wrong of course there were a lot of things that still needed to be tweaked before it would work.

This time I’m working through the code one routine at at time following how the game starts up.  So far I’ve converted the ROM test routine and now I’m at the point were it will print to screen the message “MEMORY  OK”.  This means I’ve already got work out the graphics section of the conversion.  Which will be a great learning experience for me and is one of the main reasons I want to try and get Pac Man running on my CoCo 3.

From what I’ve learned reading over documents on the internet is the screen memory of the Pac Man hardware has two parts to it.  One can be thought of a very similar to the original 32 character wide text screen on the CoCo where it shows the characters on the screen in a 32×16 display that takes $200 bytes of RAM.  Pac Man’s character screen is a 32×28 character screen with a few extra lines on right and left sides (I’m describing it not rotated).  Pac Man’s characters and maze bytes (actual parts of the maze) are 8 bit x 8 bit.  If I want to fit this on a CoCo 3 without rotating it I need a screen that is 32×8 x 28×8 minimum = 256 x 224, that doesn’t include the lines for Score and the Level and Fruit info and the top and bottom and we need to rotate these coordinates  to make it work on a regular CoCo 3 without rotating it’s monitor.  So that means I need a screen of 224×256 just for the maze.  I’m left with a screen of 320×224, which gives extra room for score and level info but it’s short by 32 rows = 4 character rows will be cut off!

There are two things I can do at this point.  I can reduce the pixel size of all the characters from 8×8 to 7×7 which would fit the screen perfectly height wise.  Or I could leave the characters at 8×8 (which I really would like to do, since I want them to look as close to the original as possible) and make the maze scroll a little up and down when you move.  So if you are in the top half of the screen you could see the top half of the maze perfectly but would be missing 4 character rows of data at the bottom and if you are in the bottom half of the screen you would see all of the bottom and be missing the top 4 character rows of data.  I really need to decide this before I move forward…

I guess I can leave it as 8×8 for now to see what it looks like and figure out how much of the screen will really be hidden.

Good day…

This entry was posted in CoCo Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s