Saturday, June 29, 2013

The Video is Working

The SOCoCo-80 Project <!--[if gte mso 10]> <![endif]
The SOCoCo-80 Project

It’s Working!!!


Most Graphic Modes Are active – few more to go


It’s been a few days since my last post. I’ve been working hard on the video functions. As I posted before, I’m going to finish the video and worry about the CPU sync later. Although, I’m thinking about that repeatedly as I move forward with the project. I have some really good successes over the last few days. Although the pesky 1st pixel is still a problem, it’s effect isn’t as drastic as before. It is showing up in all modes and I'm convinced it’s a timing problem somewhere. I thought I found it but, no. The video function simulates correctly I see no anomalies anywhere.

Moving on I went through and finished several video modes. Below are some screen shots of the 640x480 256, 64, 16 and 16 gray color modes. These photos were taken with my Acer tablet camera so they’re not the best in the world. They do show the different levels of color dithering needed to make a good picture. The procedures to create these images are as follows…

  1. Open the files in Photoshop
  2. Convert to the specific index mode using custom palettes (or Window for 256 color mode)
  3. Save as a BMP file with the “Flip Row Order” flag set. Photos need to be saved upside down.
  4. With a binary editor, remove the metadata (top file info – See web for more info.
  5. Load it in the SRAM

The Screen Shots:

640x480x256 Colors
 640x480x64 Colors

640x480x16 Colors


640x480x16 Gray Levels
(Note: the white border was on the original photo)

 

Text Mode Seems to Work


The text mode was the next hurdle. I have done a text character generator before but as I rewrote all my video drivers, this will be no exception. I decided to incorporate the driver into the video function and not make it a separate function as I did before.

The text character generator consists of a ROM table and some code. It samples the RAM each horizontal bit. Through some clever bit manipulation it calculates the proper ROM address for the font table. After getting the ROM data, it determines if the bit should be ON or OFF. If ON, it selects the proper foreground color to display and if OFF it selects the proper background color.

The photo below shows the result. The colors depend on the mode (16/2 color mode). In 16 color mode, it gets the color from the same 16 color palette that the graphics mode uses. In two color mode, it uses a 2 palette register. The image below is just some garbage in RAM along with some text I grabbed from the blog. This is just to show how it looks.



80x25x16 Color Text Mode



 80x25x16 Color
This one is all green text just like the old monochrome monitors. I did this just for fun.

Well, that’s all for now…


© 2013 – Franklin Laboratories
                                               
                                   
--> -->

1 comment: