Shop OBEX P1 Docs P2 Docs Learn Events
8x8 Tiled TV Driver — Parallax Forums

8x8 Tiled TV Driver

Spork FrogSpork Frog Posts: 212
edited 2007-11-27 02:22 in Propeller 1
2 bit palettted tile based video driver
Based on the NTSC Spectrum-like TV Video Driver

This code is in the public domain. Feel free to use it in any way you like.

The screen for this driver is composed of two major parts:
1. Tile map
     Each of these entries is 1 word long, with the lower byte
     being a tile number and the upper byte being a pallete number.
     There are 768 words total for a 32 by 24 tile screen.

 2. Tiles
     Each tile is made up of 8 words with 2 bit color encoding on
     each tile. Data is in reverse order for the Propeller's video
     hardware.  You can define as few or as many tiles as you want,
     but be sure not to use any tiles that you don't define.

 Also, there is the palette map.  16 entries are currently defined, but you
 can define up to 256.  A somewhat random palette is currently set
 up; modify it however you like.  It's located near the top of the DAT section.



I think that there says it all. I'm not great at writing docs, but the demo should say it all.

I'd love to hear feedback on this.

Comments

  • adriftadrift Posts: 25
    edited 2007-11-26 01:31
    Very cool. This is something I can learn from. Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Regards,
    Jim
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-26 01:40
    If you really want something to learn from, I'd look at the ZX Spectrum-compatible TV driver. He did a much better job at commenting his code and in general explaining it than I did here.
  • adriftadrift Posts: 25
    edited 2007-11-26 06:17
    Thanks, I'll give it a try. I'm caught up in about the middle of the Hydra manual, where Andre' talks about toggling bit 31 (of frqa) at twice the frequency of the actual output of counter bit 31 (?)...and the TV library object from Parallax talks about setting the frqa frequency to 4 X ntsc by the described division into phsa and the mult. by 16 to an output of NTSC/2. (again?) These are indeed the comments and I'm sure that they mean something much more clear than what they say to me at this early spot on the learning curve. smiley posted here if I knew how. It'll come in time...takes a lot of blocks to build a house or break eggs (metaphor).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Regards,
    Jim
  • BaggersBaggers Posts: 3,019
    edited 2007-11-26 09:20
    Don't take this the wrong way, but I don't suppose NTSC people can do some PAL also integration? to their drivers?

    As it's not just me, but a few people have asked for PAL versions of my stuff, which is why I re-wrote the spectrum drivers using the parallax tv driver code as a base plate.

    Cheers,
    Baggers.
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-27 00:27
    @Adrift: I'm not sure on the details myself. All the math was kindly done for me in the driver on which this is based on. I really just did my own character rendering stuff, the actual NTSC timing was already done.

    @Baggers: I would be happy to do a PAL version as well, but I really don't know anything about PAL other than the fact that it's another TV standard used across Europe.

    Post Edited (Spork Frog) : 11/27/2007 2:28:38 AM GMT
  • Spork FrogSpork Frog Posts: 212
    edited 2007-11-27 02:22
    Here's a simple text extension for this driver with built-in font. A demo program is included.

    Uses only 2.9K of memory which could easily be further cut down by changing the font from 2 bit to 1 bit encoding.

    This is rather incomplete, but I thought it would be worth posting anyway.

    32x24 characters, B&W only for now. Color could be easily added.
Sign In or Register to comment.