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

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

potatoheadpotatohead Posts: 10,261
edited 2011-01-15 14:50 in Propeller 1
UPDATE: Rev 1.0 is in the OBEX.

I'm going to release the text only driver. It's solid, and is feature complete for text. Other things are on my mind, and that's a growing problem!

@ 80 Mhz, it will do 64 characters color text, 80 characters monochrome text

@96 Mhz, 80 columns in both color and monochrome.

The core functions needed to output text to it have been ported from various places. AiGeneric, TV_Text, and some I wrote just for the driver, given how it does color. Enough core things are there to make other ports easy, and I'll leave that to users to do for their own specific needs.

Mouse will be 2.0, when I circle around back to this in the future. I tend to do that with text. The low level graphics allow for this, and if you feel somehow compelled to work on it, do let me know.

Up late today finishing that stuff up, and decided to run it on the HDTV, composite. When using moderate intensity colors, it works well right up to 80 columns on black background. When there is a significant angular difference between foreground and background, it's pretty ratty at 80, but serviceable at 40.

The two brightest intensities, coupled with the out of spec hi-saturation colors do not render well at 80 either. Watch out for those. I included them in the color space, because they are fine at 32 and below characters per line. Smaller displays and games make use of these resolutions and colors, so why not?

Horizontal resolutions are 8, 16, 32, 40, 64, 80 characters per line. Rows are fixed at 25. Display may be interlaced or not.

obex.parallax.com/objects/550/ Linked as I could find no combination of file name that would permit upload. ?!?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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) : 12/13/2009 11:46:15 AM GMT
902 x 555 - 65K
720 x 540 - 400K
720 x 540 - 541K
«13456

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-14 01:43
    wow! An improved AiGeneric compatible driver with PAL/NTSC support.

    Yup.. Will be spending time here... [noparse]:)[/noparse]


    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-14 01:44
    Settings for anyone wanting to run this thing on their setup.

    [noparse][[/noparse]potato_text_36.spin] This post no longer needed. Left for history only.

    Driver works out characters per line based on number of waitvids. Two characters per waitvid. Each waitvid is 16 4 color pixels. 40 waitvids would be 80 characters, for example.

    Say the desired resolution is 40 characters per line.

    40 characters * 8 pixels = 320 horizontal pixels.

    320 pixels / 16 = 20 waitvids per line. (2 characters per waitvid)

    2560 PLLA cycles per line / 320 pixels = 8 PLLA / Pixel (this is the per pixel value in VCSL)

    8 PLLA * 16 pixels = 128 PLLA per waitvid. (this is the per frame value in VCSL)

                           'Mode parameters for video signal pixel size and framing / number of waitvids 
    vsclbp                  LONG    1<<12+312                                       ' NTSC back porch + overscan (213)
    vsclactv                LONG    5<<12+80                                       ' NTSC 25 PLLA per pixel, 4 pixels per frame
    vsclfp                  LONG    1<<12+320                                       ' NTSC overscan (214) + front porch
    
    tx_cog_init           'mode parameters for text cog
    numwtvd                 LONG    32
    
    



    The settings in the code section are for 64 pixels. Easy enough to do the math and plug in the right values. The only tricky part is vsclactv. Number of PLLA per pixel is '5' in the example code above. Multiply by 16 to get PLLA / waitvid, which is '80' above.

    For the display to work, there needs to be an even number of PLLA / pixel, meaning 2560 needs to be evenly divided by whatever your PLLA / pixel value is.

    If you want to, the 2560 number can be changed by subtracting from both vsclbp & vsclfp. The total PLLA / scanline needs to be 3192 in any case.

    VAR     long screen[noparse][[/noparse]500]      'Display Screen Buffer
            long color[noparse][[/noparse]500]       'C64 Style Color Memory
    
    



    The color buffer isn't used right now. Your display buffer size for text is defined in the screen variable above.

    d1                      LONG    1<<9                                            ' destination = ++1
    zero                    LONG    0
    blank                   LONG    $02_02_02_02                                    'All colors black
    testcolors              LONG    $07_06_04_0b  '$9d_6f_4d_02
    ptable                  LONG    89'@pixel_table
    
    



    You can set the colors for the text for the entire screen by changing the 'testcolors' long shown in tx_17.spin Only the first and last byte are meaningful right now. White on dark blue is shown. Change 0b to 02 for white on black.

     '-------------------------------------------------------------
    ' End of frame 0, enable jump here for non-interlaced video
    '                       JMP     #mainloop
    '-------------------------------------------------------------
    
    



    If you uncomment this jmp instruction in 35.spin, you will get a non-interlaced display. Color resolution goes down, largely because the proper phase cycling isn't working in this video driver. I'll get to that one, but I have to study where Eric ended up with his template to sort out where to deal with this. Should still be usable in this mode up to 40 chars however.

    Back in potato_text_36.spin, the hardware detect looks like this:

    HWPins := INA[noparse][[/noparse]12..13]                                 ' Check state of Pins 12-13
    
      CASE HWPins
        %00 : clkset( %01101111, 80_000_000 )                          ' Demo Board   80MHz (5MHz PLLx16)  
              ivcfg := %0_11_1_0_1_000_00000000000_001_0_01110000      ' demoboard 4 color mode
              ifrqa := $16E8_BA2F                                      ' (7,159,090.9Hz/80MHz)<<32 NTSC demoboard & Hydra 
              idira := $0000_7000                                      ' demoboard
                   
        %01 : clkset( %01110110, 80_000_000 )                          ' Hydra        80MHz (10MHz PLLx8)
              ivcfg := %0_11_1_0_1_000_00000000000_001_0_01110000      ' %0_10_1_0_1_000_00000000000_011_0_00000111      ' Hydra & Hybrid
              ifrqa := $16E8_BA2F                                      ' (7,159,090.9Hz/80MHz)<<32 NTSC demoboard & Hydra 
              idira := $0700_0000                                      ' Hydra & Hybrid
              
        %11 : clkset( %01101111, 96_000_000 )                          ' Hybrid       96MHz (6MHz PLLx16)
              ivcfg := %0_10_1_0_1_000_00000000000_011_0_00000111      ' Hydra & Hybrid
              ifrqa := $1317_45D1                                      ' (7,159,090.9Hz/96MHz)<<32 NTSC Hybrid
              idira := $0700_0000 
    
    



    If you need different video pins or clocks, this is where you adjust that, or eliminate the case statement and just code for your board. Set ivcfg, ifrqa, idira to match your pin configuration and or clock speed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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/11/2009 11:02:15 AM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-14 01:46
    Yeah OBC, this time we've got PAL in the works as Eric was nice enough to do the same template for both. The color / pixel timings are difficult for me to sort out. That's what ended up dooming the other driver. NTSC only because of how it was built. Truth is, this one works scan line by scan line, so just about any driver will work ok, so long as it can read from a scan line buffer, and set the raster state bits. I've not yet done a VGA driver, but I see no reason why that can't be done also. All the cool stuff happens in another COG, which should make for a fairly easy swap in of some other low level raster driver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 9/14/2009 1:51:57 AM GMT
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-09-14 03:40
    Great work Potatohead smile.gif

    A must for me to look at when I have the time !

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-09-14 04:05
    potatohead,

    Nicely done! The demo looks very clean and readable on my mini LCD TV.

    -Phil
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-16 05:18
    Did this fail to display on any device?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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!
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2009-09-16 09:55
    This is just great potatohead!
    smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Where am I? Where am I going? Why am I in a handbasket?"
  • BaggersBaggers Posts: 3,019
    edited 2009-09-16 11:10
    nice 1 potatohead, I'll get chance to look in about 8-9 days [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-17 07:19
    Thanks everyone for the warm fuzzies. Appreciated. Over time, if you get a shot at running this on various displays, I would love to hear about a display failure. I'm sure the non-interlaced stuff works on everything. Not so sure about the interlaced code posted here.

    And a personal SUCCESS!! 80 characters runs great at 96 Mhz. Getting over 64 has been a PITA. Pixel table and character alignment issues fixed now too. Everything displays as it should. Now to work through the features above.

    Since this is a 4 color mode driver, I decided what to do with the colors. Waitvid is running at 16 pixels to keep HUB access to a minimum. This means 2 character color cells at anything over 40 characters per line. Right now, it's two characters no matter what. I might not change that depending on feedback over time. Let me know if that's a make or break thing. Below 40, it can be single character cells for color, above is probably not gonna happen.

    So then, for each two character cell, the colors will be 00=background, 01=mouse pointer / cursor, 02=even character foreground color, 03=odd character foreground color. Right now, there are three screen colors. Now that the character issues are sorted, I can move on to the color portion of the driver.

    This is good right now for a nice 80 column monochrome or two color screen.

    Here's an 80 column set of screenies, mono and color @ 96 Mhz. smilewinkgrin.gif This is standard composite video. No S-video yet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 9/17/2009 7:26:20 AM GMT
    720 x 540 - 575K
    720 x 540 - 366K
    720 x 540 - 581K
  • heaterheater Posts: 3,370
    edited 2009-09-17 07:36
    Yes, CP/M on the telly at last !

    I'll give this a checkout ASAP.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-09-17 09:06
    potatohead - I totally agree with heater smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-17 15:15
    Sweet! I was thinking of you guys and 80 columns. OBC asked for 80 quite a while back. Took a long time.

    Here's a much easier to configure archive, with the fixes mentioned above. You will probably need to locate and encode an 8x8 CP/M compatible font. The Atari one only defines 128 characters. I like it because it saves on HUB memory. No big deal to do the full 256 though. You can set characters per line in the main driver program. Just be sure it's a multiple of 16. No calcs required now.

    You set colors in the tx cog, as detailed above. Three colors per screen right now. Background, and one each for the even and odd characters. The color cog will deal with this and the mouse pointer soon.

    Because of how the cog workload is shaking out, I plan to let this driver run as either two cogs, mono or two color as shown here, or three cog with 16 color palette and mouse pointer. Just FYI. There will be a mode long that deals with things. Set a few bits, and it will do it's thing.

    If anyone has those old Apple ][noparse][[/noparse] style monochrome NTSC screens, now is the time to use them! The modern day alternative is to run the composite on a good TV, or run S-video (requires driver config, I think --I've not done it), or feed the composite into the luma on an S-video display, for monochrome display. My SONY WEGA displays the 80 nicely enough. Displays the monochrome S-video luma bit excellent. I don't have many TV's to test on. A small 7" Zenith from the 80's won't quite render the 80 in either monochrome or color. It lacks newer comb filters...

    Somebody has to have a old C= monitor. Let me know what that looks like. I suspect it will be near perfect.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 9/19/2009 10:39:34 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-17 16:10
    Will test on C= monitors tonight! I'll let you know!

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-09-17 16:47
    Is this the driver OBC refers to in the Propman game thread?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-17 17:08
    After some consideration, the even and odd character color definition won't be any use. To save on HUB memory foot print, the color memory will be bytes, leaving no room for that color to be used in a character cell. That leaves two colors for mouse pointer and hardware cursor emulation.

    The memory map will be as follows:

    1. Font Table -- 8bits x 8 bytes per character, up to 256 characters.

    2. Mouse pointer table, probably 8x8 as well, though this could be different.

    3. Hardware cursor emulation table, same as mouse.

    4. Screen memory. One byte per character displayed. This will be up to 80x50 characters, interlaced.

    5. Color memory. One byte per two characters displayed. 40x50 max. I may incorporate an alternative code loop that does one character color cells, if the driver is operating at 40 or less characters.

    6. Parameter block. Probably 20 longs or so.

    Init code can be overwritten by the screen, once the display is up and running. I need to know best practice for doing this at some point.

    Max HUB memory foot print will be: 8K Minimum foot print can be perhaps 2K, with a 20x25 display and 128 character font. Average will be about 4K for the display captures shown.

    The various bits of HUB memory will be relocatable on a byte level, but for the parameter block. It's long aligned.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 9/19/2009 12:49:43 AM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-17 17:11
    CounterRotatingProps: Yes it is, but I don't think this one will do games very well. Color density isn't all that great. Basically you get 2 color characters, and there will be two other colors available for pointer and cursor. Graphics can be added though. For now, I'm going to stay focused on the text until the 80 column color with cursor is done.

    From there, it's PAL, then maybe VGA.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 9/17/2009 5:16:50 PM GMT
  • ericballericball Posts: 774
    edited 2009-09-17 17:22
    One trick I used for my OnePinTVText driver is to drop the colorburst for monochrome. Most TVs will then turn off their color logic which then boosts the luma resolution. Of course, this doesn't work if you want color, but if monochrome/greyscale is okay...

    Sorry I haven't had a chance to look at your code, RL is time consuming.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Composite NTSC sprite driver: Forum
    NTSC & PAL driver templates: ObEx Forum
    OnePinTVText driver: ObEx Forum
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-09-17 17:39
    Thanks, Patata [noparse]:)[/noparse])

    learning some cool things studying your code!

    - H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • trodosstrodoss Posts: 577
    edited 2009-09-17 19:05
    potatohead said...

    CounterRotatingProps: Yes it is, but I don't think this one will do games very well. Color density isn't all that great. Basically you get 2 color characters, and there will be two other colors available for pointer and cursor. Graphics can be added though. For now, I'm going to stay focused on the text until the 80 column color with cursor is done.

    From there, it's PAL, then maybe VGA.

    As long as there is a customizable font you can do "text mode graphics," which is probably all the "graphics" capability it would need. And, staying focused on just the text part is best.



    @CounterRotatingProps: Having eeked out a game in this driver's predecessor/relatives (AIGeneric), I would say that unless you are going for a retro game, or are interested in learning from the 'ground up,' you might want to look at the specialized game drivers posted in the Hydra forum, or at least Graphics.spin, and build/change one of those to suit your needs.



    Certianly would be exiting to have VGA support! Keep up the great work!

    Post Edited (trodoss) : 9/18/2009 3:56:34 AM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-18 04:00
    Thanks Eric. I'll toy with that to see what happens on the displays I have. No worries otherwise. We've all got to do what we have to do [noparse]:)[/noparse]

    (when you do get a moment, I would like to talk about color phase cycling in non-interlaced mode. I'll be tinkering with this in the interim.)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-09-19 21:00
    Colors are working.

    I'll attach a WIP testing archive shortly. Just cleaning up names, comments and such. Attached.

    Here's a coupla screenies attached. Some color combos are better than others. Picking a better palette needs to happen. S-video display will significantly improve this. When I get a cable made, I'll upload one of those for comparison. I went ahead and picked better color values for the screen capture.

    So, I've got a coupla things I could use some advice on. One is the overall speed and order of operations in the TX COG and Color COG. I'm working on this, and even a little bit of speed up might make either single character color cells possible, or 80 characters @ 80Mhz possible. Any and all suggestions welcome.

    My thoughts on that were to get it going, then start to squeeze it. What I really need to know is whether or not the color cell size is going to be useful to people. Deal breaker or not? You guys tell me, and that determines how much re-hacking has to be done.

    Right now, I'm going to set the code up so that it operates on run time HUB parameters. That means you init the display driver, then be free to change color palette entries, number of characters per display line, screen memory, and color memory on the fly. These will update during the VBLANK, making for smooth transitions, double buffered text, and color cycling / changes as needed.

    This is a 16 color driver. The color memory is one byte per character with the lower nibble being the background color, upper nibble being the character color. One color byte per 2 characters displayed. The actual screen color comes from a palette table to be located in the HUB.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 12/13/2009 11:47:12 AM GMT
    720 x 540 - 559K
    720 x 540 - 501K
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-09-19 22:40
    Nice work potatohead smile.gif

    One color per 2 characters is not so useful but much better than none. Would be really nice per character, even if the palette were smaller, though I don't think that is the issue. I will try and get some time to look at your cog code.

    I presume it is still just NTSC. BTW many (most of the recent 5-10yrs probably can???) of the sets in Australia can do both here even though we use PAL. So is this the same elsewhere?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-19 22:47
    Can we turn off the interlace at lower character sizes?
    (and reduce the glimmer effect?)

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-19 23:02
    My thoughts too.

    PAL is on the table with this one, as is other things. At the base of this is a simple scan line driver. My intent was to get all the harder stuff sorted, then go back and do, or let others do, scan line drivers for various display devices. I don't think it's a big stretch, given Eric worked through the two templates he did. Not much needs to be done at that layer, which is good.

    As far as I know, many PAL regions will also display NTSC. Here, where we have NTSC, almost nothing does PAL [noparse]:([/noparse]

    My capture device does PAL though. Good enough to vet the scan line driver.

    A bit later today, I'll go back and test the scan line driver to see whether or not it will do 80 waitvids per scanline @ 96mhz. When I originally started down this road, I thought 80 characters at 80 Mhz was going to be possible. I don't think it is. So that's where the two character color cell came from. That cut the waitvids down to 40 per line. That's really the issue. 80 waitvids, with one hub fetch for pixels and one for colors.

    Maybe it's a non-issue [noparse]:)[/noparse] I might have built in my own problem here!

    I suppose it might run faster IBM style too, where a word per character gets it done. One byte for character value, one for it's colors. Never liked that because then printing simple strings to the screen kind of sucks. At least with the color attribute memory model, string printing and the like are dead simple, and it's easy enough to just ignore the colors and do a two color screen, if HUB memory is tight. I'm leaning toward forgetting the IBM style here.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-09-19 23:04
    @OBC: Yes, that's provided for. Right now, if you want to check that out, set the chars per line to 40, then edit the TV cog. About the middle of the way down, there is a jmp instruction. Uncomment it, and the driver then runs non-interlaced.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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!
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-09-19 23:13
    The IBM word style is not that much of an issue for character display. If you are not interested in color, the text driver just increments by 2 to get to the next slot. IMHO it would be better to get seperate colors for each char even in that means words per character.

    Baggers would probably know better than I, but I would forget PAL until all else is done.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-19 23:21
    potatohead said...
    @OBC: Yes, that's provided for. Right now, if you want to check that out, set the chars per line to 40, then edit the TV cog. About the middle of the way down, there is a jmp instruction. Uncomment it, and the driver then runs non-interlaced.

    Perfect! Rock Solid.

    Curious, How far can I push non-interlaced mode with a 96mhz or 100mhz?

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-09-19 23:22
    Ok then, I think I agree with all of that.

    The two character color cell has gotta go. [noparse]:)[/noparse]

    (With three freaking COG's this must be possible)

    The direction I'll go then is two COG driver, two color text only. Three COG text + color attributes and mouse pointer. Anything over 40 characters / line is a bonus @ 80Mhz, and 80 characters / line target @ 96.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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-09-19 23:29
    OBC, you should be able to do 64 @ 80Mhz and 80 @ 96Mhz. The color resolution goes down in non-interlaced mode. All this really means is being a bit more careful about the colors chosen. Best results will be white characters on darker background colors, particularly above 40 chars / line. This will be a mode switch for these reasons:

    -some display devices do interlace very well. This includes newer non-CRT televisions, and older high-persistence monitors. Also, when running S-video the added vertical resolution should permit 50 characters. I've not coded that yet, but it looks promising. So, where that works, it works very well. My capture device works excellent with it.

    -I think some lower resolution devices, like LCD's, might have trouble with that. Non-interlaced is an option for these.

    -If somebody ends up doing fast moving text, or does graphics with the fonts, non-interlaced delivers 60Hz display updates for NTSC and 50Hz updates in PAL. Interlaced is half that, and probably unacceptable for those tasks.

    I found my large CRT SONY really shows the shimmer. The newer Plasma TV largely eliminates it, due to it's video processing. (cool) My older Zenith lacks comb filters and interlace actually ended up rendering nice 40 character text on that one, which is usually rather smudgy.

    There is no difference in the scan line processing in either mode (yet).

    Edit: And as Eric pointed out, one can always run mono, non-interlaced and get a very nice display on most screens, shimmer free. 5 text intensities plus inverse, makes for a nice screen. If the color burst is left on, a little bit of color for cursors and such is no big deal either.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 9/20/2009 1:21:01 PM GMT
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-09-20 00:47
    potatohead:

    Very nice coding yeah.gif

    Here is a couple of suggestions for shaving a couple of instructions from·building the scanline tx_22.spin ·smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Sign In or Register to comment.