Friday, April 10, 2015

Character ROM Copyright (Part 2)

The other day I posted about the legal quagmire surrounding the C64 character ROM.

It was really interesting to see everyone's comments.  I also did a bit more digging, and now I believe that it is very unlikely that any copyright impediments exist to using most of the characters in the ROM, and very likely using the whole ROM would be fine, too.  

That said, the best defense in these situations to avoid the project getting held up, is to just avoid them.

So I have reworked the FPGA design a little so that the character "ROM" can be written at $FF7Exxx, and the Kickstart ROM so that it loads CHARROM.G65 at that location, and then loads the full 128KB ROM after that.

Until CHARROM.G65 is loaded, we still need some sort of character set of course, even if it is just so that it can tell you "CHARROM.G65 NOT LOADED (BROKEN OR MISSING)".

To solve this, I have used the VGA 8x8 font which is in the public domain, and then started removing the serifs and other things that (to me) make it a rather unpleasant font.

To make this easier, I made a little program that displays the bytes of the fonts as comments in the VHDL file for the ROM, and can then be re-run over the VHDL file to up date it. So for example, the first few characters look like:

type ram_t is array (0 to 4095) of std_logic_vector(7 downto 0);
signal ram : ram_t := (
  -- PIXELS:  *****  
  -- PIXELS: **   ** 
  -- PIXELS: ** **** 
  -- PIXELS: ** **** 
  -- PIXELS: ** **** 
  -- PIXELS: **      
  -- PIXELS:  ****   
  -- PIXELS:         
  x"7c", x"c6", x"de", x"de", x"de", x"c0", x"78", x"00",
  -- PIXELS:   **    
  -- PIXELS:  ****   
  -- PIXELS: **  **  
  -- PIXELS: **  **  
  -- PIXELS: ******  
  -- PIXELS: **  **  
  -- PIXELS: **  **  
  -- PIXELS:         
  x"30", x"78", x"cc", x"cc", x"fc", x"cc", x"cc", x"00",
  -- PIXELS:  *****  
  -- PIXELS:  **  ** 
  -- PIXELS:  **  ** 
  -- PIXELS:  *****  
  -- PIXELS:  **  ** 
  -- PIXELS:  **  ** 
  -- PIXELS:  *****  
  -- PIXELS:         
  x"7c", x"66", x"66", x"7c", x"66", x"66", x"7c", x"00",
  -- PIXELS:   ****  
  -- PIXELS:  **  ** 
  -- PIXELS: **      
  -- PIXELS: **      
  -- PIXELS: **      
  -- PIXELS:  **  ** 
  -- PIXELS:   ****  
  -- PIXELS:         
  x"3c", x"66", x"c0", x"c0", x"c0", x"66", x"3c", x"00",

You still have to update the hex values, but that's all.

So now we have a bitstream that is safe to distribute without legal problems.  I will work out how we are going to do that in the next few days.

No comments:

Post a Comment