Shop OBEX P1 Docs P2 Docs Learn Events
Seriously improved 8x8 NTSC text driver (80 Column Color Top Post!) - Page 5 — Parallax Forums

Seriously improved 8x8 NTSC text driver (80 Column Color Top Post!)

1235

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2009-10-14 19:17
    Ha! I just ran through the procedure above. It seems the forum is sending people this filename:

    "DEMO_Potato_Text_RC2"

    It has NO extension, and that's annoying. Probably the space in the file name. Ok then, so a rename to this:

    "DEMO_Potato_Text_RC2.zip" should do the trick.

    Try that, and let's figure out why a rename doesn't work, or just download the one I fixed, if now is not the time to learn about files [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!

    Post Edited (potatohead) : 10/14/2009 7:26:39 PM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2009-10-14 19:22
    So then, learning a bit about files just happened for me too!

    Turns out the default archive name confuses the forum software. If there are spaces and or brackets, things go nuts, and it rejects the upload. I just tried a .zip file with neither of those things in play, and it uploaded fine. Means it should download fine for people as well.

    Ugh...

    My earlier releases were named by me, and that's why the forum accepted them. When I was moving quicker, I decided to just take the archive name and upload. That's where the trouble is.

    Long story short, the archive on the first page should download just fine, and I won't have this problem again.

    BTW: All the objects are custom, but for the font one. It's very highly likely you have none of them microcontrolled. It's a new driver, and that kind of thing usually happens.

    Give it another try.

    Finally, the reason for not uploading just SPIN files is two fold. One is the attachment number is 5. There are 5 files in the archive right now, meaning posts will be required to contain all the files and a screen capture. So that warrants a zip. Secondly, for version control purposes, it's good to make sure the stuff is a set, so that people have a baseline. That also warrants a zip archive.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-10-14 20:37
    I've found that the forum likes short filenames without spaces.
    I get "fewer" arguments from the software using the old 8.3 format when attaching files.

    We'll grin and bare it a while longer while Parallax works out our new online home.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-10-14 21:15
    Nice Driver! Exept that I can't tell what it does, because the demo dosn't work on the demo board. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·


  • potatoheadpotatohead Posts: 10,261
    edited 2009-10-14 21:23
    IN the file DEMO_Potato_Text.spin look at the CharsPerLine(40) should be 40 characters.

    Is it?

    This could be the autodetect too. Unplug everything but the TV output, and the USB to your PC.

    I just went and checked. It's set to 40 characters. Is your Demoboard 80Mhz, or faster?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-10-14 21:27
    Whoops! I have a 10mHz cyrystal in! I'll switch out and try it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·


  • potatoheadpotatohead Posts: 10,261
    edited 2009-10-14 21:39
    Given this, I think it makes sense to add a little math, and allow somebody to just specify their particular board setup.

    I'll add that to the list of release features.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-10-14 22:05
    Hi,

    While the autodetect is a nice concept, there are so many variations of Propeller boards that perhaps it would be useful to have a simple way of specifying the video pin grouping.

    If it is in there, I apologize - I did not spot it in the quick look I gave the file smile.gif
    potatohead said...
    Given this, I think it makes sense to add a little math, and allow somebody to just specify their particular board setup.

    I'll add that to the list of release features.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
    www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • potatoheadpotatohead Posts: 10,261
    edited 2009-10-14 22:51
    It's not. The autodetect is commented, meaning somebody could easily identify the parameters for their setup, but there isn't just an explicit block that can be uncommitted, edited, etc...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-13 11:50
    Version 1.0 in top post.

    On to other things for now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • CassLanCassLan Posts: 586
    edited 2009-12-14 13:14
    WOW!!

    That is really something PotatoHead.

    Very nice demo as well, I have some questions:

    Some colors seem to make those characters go crazy on my monitor, should I just avoid these colors?

    My area of interest is really the 80 width @ 80Mhz, which in the short 2 color part of the demo looks VERY sharp and clear!!hop.gif

    How can I see the whole demo only in 2 color mode?

    And when you say two color mode, does that mean 1 color for the character and 1 color for the background, or a choice of 2 for the character and 1 background?

    Very sweet btw!!!

    Rick

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


    NYC Area Prop Club

    Prop Forum Search (Via Google)

    ·
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-14 15:49
    Yes.

    I went ahead and just put all possible colors into the color space. I did it, because an awful lot of displays will render everything. That you had this happen is a bit disturbing though. When you have a moment, please tell me what numbers you plugged in where. I might not be trapping everything, and the go crazy is almost never colors, it's sync... I need to look for that.

    If I find it's not sync, then perhaps limiting the colors is better, or maybe just a note as to which ones are known solid. The demo throws up a lot of stuff on the screen as a test. Did your screen go to pot on that? None of mine did, including the really picky HDTV.

    Two color mode is basically monochrome, only it is possible to pick any two colors. White on blue, for example. It's two colors for the whole screen. The reason for that is either the color RAM is in use, or it isn't. If it isn't there are only two colors possible for everything. If it is, then there is one word per character used for color.

    Look at the demo code and statements where it says TEXT.ColorMode($aabb)

    Pub   ColorMode(colormodep)
    
          '0 = Color Cells Enabled
          'non zero = color values; color 00 = background; 01 = character color
          '                         color 10 = mouse 1; color 11 = mouse 2
    
    
          two_colors := colormodep
    
    



    That's the method from the driver start program. If this is called with a zero, the color cell buffer is active. One word is read for each character on the screen. If you go ahead and put two colors in, like $aabb, then aa is character color, and bb is background color. Just search and destroy through the demo, editing all the ColorMode calls to be non-zero, and right at the beginning those sample values give a nice blue on white, just for reference.

    I see this does not run through the managed color space. That's gonna have to get tweaked, meaning it's all about real propeller color values, ie $02 is black, not 00.

    If the driver is run that way, the color cell buffer can be made really small, but it's gotta be something, and the driver runs basically monochrome. For testing, let me know how that all shakes out. If something different is needed, let me know. Maybe it's easy, and I'll do it then. Maybe it's harder, and we can rope somebody in for a bit of heavy lifting...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-18 04:58
    Casslan, I found what I think your monitor problem is. Or.. I found a problem!

    When calling TEXT.ColorMode, the color specified do not go through the color lookup table. This can cause some colors to actually be sync colors, and that's bad.

    I've changed that now, and the object has been updated to version 1.1 in the OBEX.

    For anyone using the 1.0 Object, only calls to TEXT.ColorMode are impacted, nothing else changed.

    You might also be seeing that monitor go nuts on too high of a character density for your clock. If you are at 80Mhz, you can run 80 columns with ColorMode($ffbb), where "FF" is the hex foreground color, and "bb" is the hex background color only. That's two colors for the whole screen.

    If you set ColorMode to 0, then the color memory takes over, and that's two colors per character cell. At 80Mhz, that's only good up to 64 columns of text.

    I've set the demo to 40 columns so that everybody can see it in color, and the first screen details how the color space works.

    Maybe that helps. Either way, I caught a potentially monitor fritzing bug.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-12-18 16:15
    Great work Doug!

    Question,

    Is the two color (foreground/background) limitation on an 8x8 character determined
    by a lack of memory? What would it take to get 4 or 8 colors into an 8x8?
    Could this be done at a trade off of 20 columns? (I've found that mode perfect
    for game creation.) Do any of the present memory solutions (ie, Dr_A's single board
    computer, etc) offer any hope in this direction?

    Thanks again for your hard work in this project.
    I honestly believe you have one of the top five objects for the Prop right now.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-18 20:38
    It's not a lack of memory, and getting 4 colors per 8x8 is largely done. All the hard coding is over with.

    When I wrote this with a mouse pointer in mind, I only used two colors for text, leaving the other two free for the mouse / overlay cog to come. That will get done, but I'm taking a break from this long project to do some fun stuff. The plan is to have a third cog do a mouse pointer, and or overlay type graphics of some kind with colors independent of the text.

    So, the driver is 4 color at it's core. Doing multi-color 8x8 graphics isn't that big of a deal, particularly if I limit that to 40 columns max. Maybe 64, depending...

    I would totally defer to FSRW as SD card access opens so many doors. That's a top object for sure. This is just text, character graphics after all [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!
  • whickerwhicker Posts: 749
    edited 2009-12-19 18:23
    I'm using the demoboard.
    I'm connecting it to, what I consider, a very normal CRT 27" television.

    I've been following your driver, and unfortunately the sync problems are still there.
    Example stuff like "Graphics_Palette.spin" work without issue, I just tried it again.


    The very two top rows of the screen, when the demo first starts up, is garbled.
    Also, the bottom of row of the first "box" of characters is skewed sort of like >.

    When it prints the numbers up to 10000, the bright green, bright orange, (maybe all of the oversaturated colors?) dance back and forth wildly with tons of dot crawl, it's funny how the really white-ish numbers stay pretty much in place.

    I would assume the oversaturation dancing is just how it is, but I still don't know about the sync issues.
  • CassLanCassLan Posts: 586
    edited 2009-12-19 18:26
    I also used the updated version and still have the dancing on certain colors

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


    NYC Area Prop Club

    Prop Forum Search (Via Google)

    ·
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-19 19:12
    Thanks guys, I'll modify the color space to exclude those. I've been plugging the prop powered by a battery into lots of stuff, and just didn't see it happening. Thought maybe it was a special case kind of thing.

    I'll drop it in the OBEX shortly.

    I bet the SYNC issues are related. If you two will entertain another update, I would really appreciate it. I have no devices that fail.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!

    Post Edited (potatohead) : 12/19/2009 9:16:26 PM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-19 20:41
    Will you test this one?

    After thinking it over, the easiest fix is to just adjust the CLUT to only include in spec colors. There will be some degree of dot crawl on some colors. This is normal, but character shapes shouldn't change because of that.

    No new calls, just a commented out full color table, there if somebody wants / needs it.

    Also, for anything 64 columns and under, try setting Interlaced to (1), for a non-interlaced display. This eliminates all dot-crawl, but at the cost of resolution. Some color combination will still work ok, and monochrome works fine this way.

    It's in the OBEX as release 1.2. I can no longer upload ANYTHING zip related to the forum, no matter what I call it. Sorry...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!

    Post Edited (potatohead) : 12/19/2009 8:46:12 PM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-19 20:46
    Here are a coupla pictures from my HDTV, on this color set. All colors constrained to the set of conservative, in-spec colors.

    Image 3157 is 40 column text. Notice the dither patterns above are mostly clean. The video processor in that TV doesn't impact those. All of the pixels are sized such that the signal can convey them for most all color combinations.

    Image 3162 is 80 column text, composite input. Notice the dither patterns have some artifacts in them. A CRT TV won't do this, but newer LCD and HDTV devices will. The trade-off for that more complex image noise is clean color characters shown below. That's with a composite input also, interlaced display turned on. Most higher contrast color combinations will look good, like the ones shown do. The pixels exceed the signal, meaning whatever TV you have will extrapolate. CRT will be more consistent about it, LCD / HDTV less so.

    Image 3171 is a different contrast case, showing similar character resolution with dark characters, instead of bright ones. Note the crawl on a few of these. That's just the nature of the beast, and those colors are to be avoided. With another background color, they might render just fine. This one is 80 columns, composite as well.

    An S-video connection will significantly improve those, BTW. I'll try and get an S-video hookup going for another round of display tests.

    I'm supplying the images to show what display artifacts are not caused by driver coding, but limitations of the composite signal. Some colors are better than others. Also interesting is the HDTV did not show interlaced color dot shimmer, as mentioned earlier up thread, at all except for in the dithered color test patterns. Some video processing is going on, depending.

    This means not all color combinations are going to render artifact free, unless you want to limit the display to 40 columns or less. Exceeding that with a composite signal means less color freedom overall. The worst are colors in opposite positoins on the color wheel, such as dark red text, on bright blue or green background, where lighter orange text on a darker red, or orange background will look good.

    Most any background color, with white text, or nearly white text will look good.

    Anyway, this release should render as intended on most devices. If it's not doing that, please let me know, and or show me a photo, or some other detail that can be used to track whatever it is down, so we know whether or not it's a limitation of composite, or some driver issue. Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!

    Post Edited (potatohead) : 12/19/2009 10:02:56 PM GMT
    3008 x 2000 - 846K
    3008 x 2000 - 797K
    3008 x 2000 - 1M
  • whickerwhicker Posts: 749
    edited 2009-12-19 22:50
    good news:

    I tried your version 1.2, and it didn't desync.

    Also, I kinda figured out how you were doing color, so I played around with the CLUT table.
    Ok, I got it now.


    When adding back the oversaturated colors, nothing detrimental happened (yeah, there's going to be dot crawl).
    It was the low-intensity colors in the first column causing me trouble.

    example:

    2nd row was:
    byte byte $0a, $0a, $0b, $0c, $0d, $0e, $0e, $0e

    added the two rightmost colors back:
    byte byte $0a, $0a, $0b, $0c, $0d, $0e, $88, $9f


    seems to work with no ill effects for all 16 rows this way.


    and yeah, going back to CLUT_FULL causes desyncs:
    as in:
    byte byte $09, $0a, $0b, $0c, $0d, $0e, $88, $9f

    That $09 doesn't cut it.



    So hey, looking good now. scool.gif
    Maybe this situation also explains why the wolfenstein demo makes me seasick...
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-19 23:07
    Great. Thank you. Well, I think I'm gonna leave the conservative color table intact. I'll drop a few notes in with the CLUT so people can open it up some, depending on their devices, or not...

    Really good news on the over saturated ones! Those are nice to haves, and are outta spec, but used elsewhere with few troubles. The low intensity ones must be too close to the colorburst value for some TV's to deal with. Also good news on $09. LOL!! The low intensity ones are nice, but the next intensity up works just fine, maybe requiring a tweak on the contrast control, if nothing else.

    If you are sensitive to dot crawl, try TEXT.Interlace(1) too. What is done there, is the vertical interlace is not drawn, stabilizing the color on every scan line. There are two ways this can be done. One is to have the color artificats aligned on every scanline, like older computers used to do. It's a nice trick if one wants a ton of colors. Over 400 can be had doing that, but resolution is fixed at 160 pixels or so. Games or simple GUI only.

    The other is to go ahead and have them alternate, as if interlace was working, but remain static. Doing this was an accident, but happened to significantly improve the display, so I left it. So, every even scanline has consistent artifacts, and every odd one has consistent artifacts. If you turn the color down, you will see a checkerboard not moving. Turn the interlace on, and you will see that same checkerboard alternating every frame.

    Anyway, thanks again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-20 01:55
    Just FYI everyone:

    Future additions will be mouse & PAL. Taking a break to do some other stuff.

    If somebody has a VGA template similar to the ones Eric Ball did, VGA might be on the table as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!
  • BeanBean Posts: 8,129
    edited 2011-01-14 13:17
    Potatohead,
    Any more work on this ?

    I'm interested in 64x25 character mode. For an embedded BASIC implementation.

    Bean
  • potatoheadpotatohead Posts: 10,261
    edited 2011-01-14 17:08
    What are you interested in?

    64x25 is there, in color at 80Mhz.
  • BeanBean Posts: 8,129
    edited 2011-01-15 07:04
    Yeah, I just thought that since this is pretty old, maybe you had something better.

    Bean
  • potatoheadpotatohead Posts: 10,261
    edited 2011-01-15 10:31
    Do you need color attributes on the 64x25?

    There is a lot of bulky code in that driver... Could be done smaller now. (I know more!!)

    I'm tempted to do that. Can you tell me something about this embedded basic?
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-15 12:17
    Bean: Depending on what you want, my 1pin TV debug maybe worth a look. It is mono but works ok on the 3pin TV fine - just B&W. It has a minimal footprint and some basic screen handling. You may be able to use some of the code or ideas anyway.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-01-15 12:21
    That's exactly what I was thinking when I asked about the color attributes.
  • BeanBean Posts: 8,129
    edited 2011-01-15 14:20
    Here is the thread for embedded BASIC http://forums.parallax.com/showthread.php?123678-Embedded-BASIC-interpreter&highlight=embedded+basic

    It is basically a BASIC development system all in the propeller, No PC needed.

    Right now I use a 384x192 (48x19 character) system. But I really want it to have color output.

    So the best would be a 64x24 character system with background/foreground color for each character. Of course the character bitmaps will be able to be redefined for games.

    I'd like to keep the video memory as low as possible, so 1 byte for each character, and 1 word for each attribute is fine. 4608 bytes total.

    I have plenty of cogs free, so even if it takes 2 or 3 that is fine.

    It has to run on the Propeller Demo board, so 80 MHz clock.

    I actually prefer the IBM format char/attr, char/attr memory format.

    Let me know if it's doable...

    Bean
Sign In or Register to comment.