Shop OBEX P1 Docs P2 Docs Learn Events
[FYI] VGA, 80xM, single cog, monochrome — Parallax Forums

[FYI] VGA, 80xM, single cog, monochrome

kuronekokuroneko Posts: 3,623
edited 2013-11-25 09:20 in Propeller 1
Another one for the monochrome driver collection. Fonts for 8x8 and 8x12 are included.
'' mailbox layout (80xM, monochrome)
''
'' long[par][0]:  screen:   [!Z]:addr =  16:16 -> zero (accepted), 2n
'' long[par][1]:    font: size:*:addr = 8:8:16 -> zero (accepted), 2n
'' long[par][2]: palette:  [!Z]:fg:bg = 16:8:8 -> zero (accepted), optional colour
'' long[par][3]: frame indicator

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2013-11-23 12:18
    Have not run it yet, but you got it running at 80MHz? Cool!

    Best guess: you must be fetching the characters in the vblank of the preceeding lines; that was the only way I could think of that should work at 80Mhz, but I never had the time to implement it.

    Or you are leaving at least one blank scan line between rows of text, which I had implemented but did not like due to not being able to have full block graphics.

    update:

    6 pixel wide font, rendered in an 8 pixel "timing window" might also work.

    Sorry, can't help guessing :)
  • Mark_TMark_T Posts: 1,981
    edited 2013-11-23 16:17
    The previous versions suggest 80 here means 80 character columns, not 80MHz, there was
    a 40x15 char version before with ROM font, here the font is 8 pixels wide so 80xM (different
    M for 8x8 and 8x12 fonts I presume).
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-11-23 17:47
    The demo code shows 80Mhz :)
    Mark_T wrote: »
    The previous versions suggest 80 here means 80 character columns, not 80MHz, there was
    a 40x15 char version before with ROM font, here the font is 8 pixels wide so 80xM (different
    M for 8x8 and 8x12 fonts I presume).
  • kuronekokuroneko Posts: 3,623
    edited 2013-11-23 23:21
    All drivers are labeled with column count and either fixed rows (e.g. 50x18, 40x15) or a letter which indicates variable character height depending on the font data. All WHOP drivers require 80MHz, others are easily adjustable.
  • Don MDon M Posts: 1,652
    edited 2013-11-24 03:06
    What does WHOP mean?
  • kuronekokuroneko Posts: 3,623
    edited 2013-11-24 03:25
    Don M wrote: »
    What does WHOP mean?
    waitvid hand-off point

    Most of the time pixel and system clock are not exactly in sync (e.g. 25.175MHz vs 80MHz) which is why one uses waitvid to block until the video data has been safely delivered. OTOH, with e.g. 20MHz and 40MHz said pixel clock has a stable relationship with the system clock, IOW one can predict when the data needs to be available which voids waitvid usage and nearly any normal insn will do instead (e.g. cmp colour, pixels). WHOP drivers are drivers which will only function at a specific system clock (e.g. 80MHz). While this may sound like a disadvantage, not using waitvid will give you more time where you need it (7+ cycles vs 4 cycles) and allows for drivers with more/better features. HTH
  • Mark_TMark_T Posts: 1,981
    edited 2013-11-24 05:29
    The demo code shows 80Mhz :)

    Where?

    I see 640x480 @ 60Hz, which is nothing like 80MHz dot clock rate.
  • kuronekokuroneko Posts: 3,623
    edited 2013-11-24 05:43
    Mark_T wrote: »
    I see 640x480 @ 60Hz, which is nothing like 80MHz dot clock rate.
    Bill's own [thread=129781]80 column (single cog) driver[/thread] requires the use of 100MHz system clock. The one listed in the top post works just fine at 80MHz. That's all there is to it.
  • CogSaverCogSaver Posts: 17
    edited 2013-11-24 12:12
    This is an amazing driver. I have made several attempts myself and the closest I came was by using 8x7 font and reading in the next line on the 8'th (blank) line.

    Can you share the core of the driver so we can learn how the magic is achieved in the 3,2 cpu cycles that are available pr pixel ?


    CogSaver
  • Mark_TMark_T Posts: 1,981
    edited 2013-11-24 14:53
    kuroneko wrote: »
    Bill's own [thread=129781]80 column (single cog) driver[/thread] requires the use of 100MHz system clock. The one listed in the top post works just fine at 80MHz. That's all there is to it.

    Ah, I see, had the wrong end of the stick (wrong end of the PLL?). Partly because I've been working on high speed dot clocks myself and looking up lots of different VGA timings.
  • kuronekokuroneko Posts: 3,623
    edited 2013-11-24 16:57
    CogSaver wrote: »
    Can you share the core of the driver so we can learn how the magic is achieved in the 3,2 cpu cycles that are available pr pixel ?
    Certainly, though there is/was no magic involved. I'll update the top post.
  • CogSaverCogSaver Posts: 17
    edited 2013-11-25 01:47
    Thank you Kuroneko

    I had already given up on the 1 cog 80x60 char display with 8x8 font. It never appeared to me to use the B counter as a free "add char,font offset"
    The other clever trick I see is reading 2 chars at a time from the frame buffer and using shifts + the fact that movs only uses the lower 9 bits of the value.

    Again, thanks for sharing.
    CogSaver
  • kuronekokuroneko Posts: 3,623
    edited 2013-11-25 04:51
    CogSaver wrote: »
    I had already given up on the 1 cog 80x60 char display with 8x8 font.
    You could always have used [thread=146085]100x75[/thread] until now :)
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-11-25 09:20
    kuroneko,

    Using the B counter for the font offset addition is a very clever trick.

    Well done !
Sign In or Register to comment.