Shop OBEX P1 Docs P2 Docs Learn Events
deSilva's MPE_TEXT_XXX.spin TV Text - New Resolutions? — Parallax Forums

deSilva's MPE_TEXT_XXX.spin TV Text - New Resolutions?

DroneDrone Posts: 433
edited 2008-01-07 20:26 in Propeller 1
This is a Private Message thread moved to the forum at deSilva's request as the content may benefit all, and deSilva's 100 private message quota is stressed (Forum Administratior, perhaps you can increase deSilva's private message limit?)

The private message thread to current date & time is reposted here as quotes, top-down chronologically with time & date stamps. Subsequent replies will appear in in new posts to this thread:
Originally Sent : 1/5/2008 11:10:00 AM GMT by Drone said...

Hi deSilva,

I'm using your nice MPE_TEXT_013.spin currently at 20X7 non-interlaced, PAL, & 5MHzX16. I was wondering if it would be possible to get something like 28X10 or 32X12 non-Interlaced out of MPE_TEXT_013.spin object. I was tinkering with it and did get to 28X8, but it just doesn't look right. I don't know enough about the TV driver technology yet to get it working.

Best Regards,

David in Jakarta

Originally Sent : 1/5/2008 11:42:25 AM GMT by deSilva said...

David,

thank you for using it! It was - as so many oft my activities - laying around unfinished for some months... The main idea behind it was:

- To efficiently use the very nice character set in ROM

- To use the common 320(or 480) x 240 low cost monitors in a high quality mode.

It is rarely appreciated that you cannot get more out of your monitor than it has smile.gif

So deviding 240/32 gives you the "natural rows".

The good thing is that NTSC cames close to 240 lines; PAL is much more problematic as it does not match well with 240/ it matches much better with 256; but also this is an illusion when just the pixels do not exist on the screen!

The standard TV_TEXT uses the fact that a living room TV set has 460 (or in Europe 580) pixel lines on it, which are used alternately ("Interlaced") but this is a minor technical detail.

So quality is reduced for any values not matching well with the physical pixels.

Now, when you have to use PAL with a 240 lines monitor, this is a (minor) issue; when you have a 460 or 580 lines screen you should select the interlace option, giving you a doubled resolution.

The font as such can be reduced to half the hight, but would become "square" then(16x16). Also reducing the width will give you a 8x18 font only.

So first question: What kind of screen do you have?

Originally Sent : 1/5/2008 11:56:31 AM GMT by Drone said...

deSilva, Thanks for the reply. I'll try to be detailed as possible when describing my display:

I'm using a portable DVD player with an RCA jack PAL composite video input. The screen is physically 7 inches diagonal in 16:9 format. I can switch to true 4:3 format by pushing a wide/narrow button on the top of the player. In 4:3 mode there are two black bands on the right and left of the active portion of the display. The 4:3 video on the DVD player display looks identical if I unplug the video then plug it into a standard 29" Sony Trinitron 4:3 PAL TV. If I plug the 16:9 video into the 4:3 TV it letterboxes. The Sony TV auto-switches between NTSC and various flavors of PAL. The DVD video input is PAL only. I want to keep using the DVD player display because it is portable.

I ok with moving this to the forum - but I can't find a way to move this private thread over. Any suggestions? Maybe I should just start a new thread in the forum?

David
Originally Sent : 1/5/2008 12:30:49 PM GMT by deSilva said...

David,

It is rare that such a device a syou describe will not accept NTSC... Are you shure.. Well most likely you are...
First it seems to have around 480 horizontal pixels, that is something to take advantage of, I shall soon tell you how to make the change in MPE_TV for 16:9... I think I shall add a new parameter in the INIT..
Second: How many pixel lines do you really have...? It's sometimes in the brochure .... Takes some time to count them smile.gif

Give me some hours to check it out... I am terribly displeased with Propeller/PAL and NEVER use PAL

deSilva

Comments

  • DroneDrone Posts: 433
    edited 2008-01-05 14:31
    Hi deSilva,

    More info on the display. It is an Axion model LMD-4708GQ by www.axiontv.com. The manual doesn't specify pixel resolution, and I can't find more pixel resolution online for this specific model. However, I believe it is quite the same as the Axion AX6070 (also there is an AX6070A). I attach a picture of the model LMD-4708GQ as well as the brochure for the AXN6070. You can see the form-factors and screen are quite similar. The brochure for the AXN6070 says 720X480, but the AXN6070 seems to be for the N. American market (although the LMD-4708GQ appears on Candian E-tailer sites).

    One thing is certain, my LMD-470GQ supports ONLY PAL composite (RCA jack) video input (per the manual). I've verified this with the Propeller as well as changing output between NTSC and PAL on my Pioneer PVR and feeding it to the Axion device. Therefore, perhaps the LMD-4709GQ I have supports 720X576 (PAL?) "720P/I"? or 720X480 or 720X405? Then there's the question 720P or 720I, don't know but I venture to guess it is only 720I.

    Certainly (tested) MPE_TEXT_013.spin in 20X7 demo looks Great on the display. As stated previously, I'd like to get a bit more in terms of colums and rows that looks almost as good.

    Color is not an issue, I actually prefer B&W or better grayscale. But I do need PAL for now (later user DIP switch selectable PAL/NTSC for general end-user displays.) I too have been pretty unhappy with the PAL results out there for Propeller, especially in terms of color with a standard 5MHzX16 clock setting.

    Regards, David
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-05 14:54
    David,
    I attach two testversion
    PAL 27x8
    NTSC 21x7
    asking you check on your device.
    Dor checking the pixel lines: Using a magnifying glass it is easy to identify the number of pixel in a text line; the first line is inverted.. can you please count then (in the PAL version). On my generic NTSC display it comes to 26, which indicates a stretching of the PAL lines to the physical pixels which is not optimal. On a TRUE PAL screen (but do they exist?) you should count 32 pixel lines.

    The PAL version will alternate between a B/W display and a red on blue. The quality of that depends on many things but I have decided to abollish it... It is a little bit better with NTSC

    Post Edited (deSilva) : 1/5/2008 4:32:35 PM GMT
  • DroneDrone Posts: 433
    edited 2008-01-05 16:32
    Hi deSilva,

    OK, I've run both NTSC and PAL against the Axion device. Note I made the following changes to your source:

    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000
    videoPin =  20
    



    I'm using Propeller, not Hydra, and my basepin for video is a bit different.

    First I must apologize for the lousy pictures. Cheap hand phone pics. But I think you may get the gist of things from the pics:

    Mpe01a is PAL with the DVD player screen set to 4:3 when your program starts.
    Mpe02a is PAL with the DVD player screen set to 4:3 a few seconds after your program starts.
    Mpe03a is PAL with the DVD player screen set to 16:9 when your program starts.
    Mpe04a is PAL with the DVD player screen set to 16:9 a few seconds after your program starts.
    Mpe05a is NTSC with the DVD player screen set to 16:9 when your program starts. Just one line at the bottom left until the next step comes.
    Mpe06a is NTSC with the DVD play screen set to 16:9 a few seconds after your program starts. This display stays forever, no change.

    Note, I didn't bother with the 4:3 NTSC setting on the DVD player because the 16:9 and 4:3 are identical except for one difference, when I change the player's setting with the final static display in Mpe06a from 16:9 to 4:3 I get the same text as shown in Mpe06a with the lower-left line in Mpe05a superimposed.

    Remember I just push a button on the player to go from 16:9 to 4:3 & vice-versa.

    I really need to jump out for awhile - reluctantly. I probably won't post until tomorrow morning GMT+7 at earliest.

    Thanks for your help deSilva. Normally I would stop a thread at this point and learn the basics about this topic myself and post more intelligently, but you may be right - this thread may help others. So let's go a bit further.

    Rgds, David
  • DroneDrone Posts: 433
    edited 2008-01-05 16:45
    On second thought, I think it might be useful for you to see the result when I described:

    "...when I change the player's setting with the final static display in Mpe06a from 16:9 to 4:3 I get the same text as shown in Mpe06a with the lower-left line in Mpe05a superimposed".

    I attach a snapshoot of this display.

    Again - Thanks, David
    640 x 458 - 46K
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-05 16:58
    David, thank you for those excellent pictures! They are as expected. It is a pity that the monitor does don sync to NTSC - this looks like mainly a 50/60 Hz isue (notwithstanding color timing..).

    (Edit: Your last image 7a shows that clearly: It does nor VSYNC, as 50 Hz is too far awy from 60Hz)

    Questions are:
    - Will it work for you? There are more options in the x-dimension: You can use a value from 30 to 40 as characters per line in the INIT routine, which matches fine with a 16:9 display (though is too narrow for a 320 pixelwidth screen)
    - What about color? Does it look as terrible as on my screens?
    - Can you try to "count the lines", as I suggested? This is not really important, but just to please my curiosity. I am rather sure that this is a 240 lines screen, and PAL will always be afflicted by the strange squeezing needed.
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-05 18:47
    This is a place as good as anywhere to spread useless knowledge....

    The video drivers output an array of signals within the framework of a TV standard:
    For NTSC that is
    X-direction: 63,5 µs (= 15.625 kHz)
    Y-direction: 525 lines (486 visible)

    Where the drivers get that data from is there own concern. Especially in x -direction there is a lot of freedom, you can output a lot, as long as it can pass throught the video amplifier of the monitor smile.gif

    Color monitors however are limited in their display power by the physical colorpatches on their screen. So this is one uper limit of usefully transmitted data.
    Cheap 6" to 8" monitors generally have 320 x 240 pixels (R, G, and B or course) I have even seen all those colours advertised separately smile.gif

    So how many pixels do you have per line? Let's take a text line: 40 characters, each character is 16 bits wide = 640 pixels... Bad! There is no chance at all to dislay any of the finer details of the glyph. So you have two options:
    - use a font 8 bits wide
    - reduce your presentation to 20 characters per line.
    Same argument holds for the vertical axis.
    So you have to choose the right font.... What we have in ROM is a high quality 16x32 font. It obviously matches with such a monitor when you display 20x7 characters. On a 480 pixel wide 12:9 display 30 characters are possible.

    When you need more information you best process the glyphs, or use one of the fonts some persons have generetated in the meantime (Wikipage?). This however will debit the RAM....

    Theh TV driver is espoecially adapted to display the ROM font. Using smaller fonts need a modification in TV, which is cumbersome. Niot the technical change, that needs just a little bit "trial-and-error" smile.gif No, it's that TV and VGA are markstones of Propeller standards; very difficult (no: imposible) to substute them and most confusing to establich alternatives...

    What is generally done is to let the monitor do the squeezing. Each second line can be ommitted by choosing interlaced mode, and also each second horizontal pixel can be dropped. Of course when you have a beamer or living room TV that those will turn up again!

    This gives easy 4 fold capacity with a squeezed font on the low cost display, but so bad with a good beamer, as I just notice... Bit it's small an a already small display. And NOT crisp clear!

    Another problem is color. There are some recommendations somewhere what color mixtures to avoid. For text dislay I should recommend to use color as back colour only. Make all characters black or white!

    Post Edited (deSilva) : 1/5/2008 7:00:12 PM GMT
  • DroneDrone Posts: 433
    edited 2008-01-06 15:46
    Hi deSilva,

    Sorry for the delayed reply. Dealing with weekend chores etc....

    I've spent a bit of time this evening investigating the physical display on the Axion DVD player; like you, I'm interested in the physical resolution.

    Using your 27X8 PAL driver (MPE_TEXT_021PAL.spin) with the display in wide-screen mode, I put up four characters, gray on white background one in each corner of the display with the rest of the display set to black background.

    Then I got out my magnifying glass and using a 0.5mm lead pencil point on the display as an aid, counted the pixels for each character (and surrounding border).

    It seems each character is 16 pixels wide by 28 pixels high.

    So: 27X16=432 pixels wide & 28X8=224 pixels high.

    The aspect ratio (width divided by height) at this point is is 432/224=1.93

    Note 16:9 widescreen is 16/9 aspect ratio = 1.78 (rounded)

    OK, but these numbers don't include the "visible border" pixels that aren't being displayed by the device.

    By turning up the brightness on the display I can count the border pixels: Approximately 6 pixels on the top, 7 on the bottom (total 7+6=13), & 4 on the right + 6 on the left = 10.

    Adding the border pixels:

    (432+10)/(225+13)=442/235=1.86, closer to 1.78 (16/9 as mentioned above).

    Note: There are most-likely physical pixels on the display that I can't see. There is a plastic "mask" around the display. Dismantling the device may allow me to see the full number of pixels offered on the display, but I don't want to go there - for now.

    Note: The physical size of the plastic mask around the display is 154mmX86mm with an aspect ratio of 1.78, matching 16/9.

    In summary: From what's visible, the display is at least 442X235 pixels, one might wonder how many pixels are not physically visible behind the plastic border on the device. Does 442X235 come close to any "standard" display resolution in pixels?

    I'll address your other questions tomorrow, this evening (GMT+7) just had time to address the display resolution question.

    Best Regards,

    David
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-06 16:48
    David:
    this is as expected! I am not aware that any one produces low cost PAL screens smile.gif
    So you have about 480 x 240 real pixels on it, most of them visible.

    On a NTSC monitor you would have counted all 32 lines of the character (or its background)

    The main issue with using this with PAL is their fundamental mismatch. If you have an NTSC moditor or TV capable of NTSC you will see a quite homogenious imags. With a PAL signal this becomes irregular.

    The reason is that PAL will feed the poor display with around 562 lines which results in ommissions of around 20 % of them (each 5th or 6th). This is noticeable!

    Note that this effect is not so grave when the screen has a full set of pixels (560 lines with 768 pixels each, for 3:4)

    There is intersting news from Baggers who seem to have made a great discovery.. I see what will come out of that...

    I shall also modify the TV driver (though that was never my intention at all!) to just output 2x240 lines in PAL mode. This will then conform to a standard PAL 16:9 display (768
  • DroneDrone Posts: 433
    edited 2008-01-07 14:00
    deSilva,

    To answer your remaining quesitons:

    - Yes your driver will do ok for me for now. Ultimately what I need is user switchable NTSC/PAL via a DIP switch, but that can come later. Another thing I would like is user selectable number of rows, but I think I see the difficulty in that.

    - Color looks as it does with the TV driver. It looks good color-wise but I still have the herringbone artifact sweeping across the screen from top-right to bottom-left, faint lighter lines that are slightly lighter in color. Most visible in the persistant blue background that fills the screen. I wish there was a way to turn off this blue background. I tried the colors that came with the original color palette.

    By the way, Mike_GTN in a private message pointed me to a very interesting page for an 8-pin PIC based PAL OSD. Very simple circuit! Have a look at this page:

    www.micro-examples.com/public/microex-navig/doc/081-pic-osd-superimposer

    Thanks for all your help deSilva - I really appreciate it.

    David
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-07 20:26
    Drone said...
    Another thing I would like is user selectable number of rows
    This is imlemented, but is is not "smooth", i.e. 10, 20, 30, 40 characters will "fill" the line (aroung 20 is "optimal for a 320 screen, 40 for a 640 screen). Numbers in between will not affect the width of the chararacters, but will make black borders at both sides.
    said...
    ...visible in the persistant blue background that fills the screen. I wish there was a way to turn off this blue background.
    MPE_TEXT does use a gray scale background by default which is quite acceptable with PAL.
Sign In or Register to comment.