Shop OBEX P1 Docs P2 Docs Learn Events
Looking for a working 1080p Demo program — Parallax Forums

Looking for a working 1080p Demo program

SuracSurac Posts: 176
edited 2020-06-11 15:02 in Propeller 2
Hello

Im looking for a working 1980x1080 HDMI demo program
The text output demos chip included in his pnut package do not work for me, so
I need to figure out what’s wrong in my setup. I managed to do 640x350 and
640x480 via HDMI and they work Good with my monitor
Now I like to get 1080p up and running, but all demos I tried
Did not work

Thanks in advanced

Surac

Ps I use the p2 HDMI output Adapter and a p2 eval board rev B. HDMI Board is on Basepin 32
«1

Comments

  • There isn't one. HDMI requires a 10x pixel clock due to how the encoding works.

    You can go from VGA to HDMI with an adapter.

  • AribaAriba Posts: 2,682
    The HDTV demos from Chip use Component Video with 3 DAC outputs, not HDMI.

    You are aware that at 1980 x 1080 resolution you would need 2 MByte RAM even for an 8bit bitmap.

    A 640 x 400 pixel resolution, can show 106 x 40 characters with a 6x8 font, is that not enough?

    Andy
  • Doing the math I see I was wrong
    I was under the impression I had seen samples on the forum
    But they are HDTV not HDMI.

    I was to stupid to read :smile:

    Thanks
  • And yes 106x40 is enough.
  • Oh give yourself an out! Why not?

    Too much in a hurry to read, lol
  • RaymanRayman Posts: 13,903
    It can be done using the TFP410 chip. You'd need a lot of pins for 24-bit color though...
  • RaymanRayman Posts: 13,903
    But, I just use a VGA to HDMI converter from Amazon... They are around $10...
  • Yes Surac you can certainly get 1080p from VGA converted to HDMI out of the P2 at 60Hz with one of these types of adapters. I've had this working myself using my own drivers and I've also managed a 8bpp frame buffer at this resolution with HyperRAM (only just though, it's pretty close to the overclocking limits). Looks great.

    You won't get 1080p or 1080i at 50 or 60Hz directly over DVI with the P2, because the P2 would need to run over ~740MHz for that.

    You may get some lower refresh HDTV resolutions and rates working over DVI if your display supports low refresh. I think 720p24 might have already been attained by Chip.
  • AribaAriba Posts: 2,682
    I accidentally run my HDMI code with 160 MHz, and it worked with my TV without any problems. So I tested the lowest Freq it works, and the result was 120 MHz. There was no flickering, so I think the TV has a buffer ram for a whole frame, and just fills that from the incoming signal, which can be VGA, Component, Composite or HDMI.

    Conversely, it should be possible to achieve higher resolutions without exceeding the maximum clock frequency of the P2.

    Andy
  • roglohrogloh Posts: 5,172
    edited 2020-06-11 23:58
    What sort of frame update rate do you think were you getting with your TV Ariba? I'd estimate ~5Hz at 120MHz P2 clock rate if it was 1920 x 1080 pixels of resolution being sent out from the P2 over DVI.

    Perhaps this would still be reasonable useful for slideshow use etc. Dynamic text or graphics updates could look a bit laggy/smeared, any mouse would be pretty bad I expect.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-06-12 00:43
    TAQOZ RELOADED includes multi-resolution VGA drivers with 5x7 text font. It's not a demo, it's a full working interactive system that you can switch output to VGA or serial or any other device, and draw graphics etc. You can dynamically select 16:9 or 4:3 modes with up to 8-bit color from 160x120 resolution up to 1920x1080 which due to memory limitations is limited to 2-bit color (although I only ever use mono in this mode). Text automatically adapts to screen resolution so that at 1920x1080 you end up with 320x108 text. If you type in a new CPU frequency, then the screen timing will adjust automatically.

    I will be on zoom next week doing a presentation on TAQOZ but later on I will demonstrate VGA text and graphics (as well as video and sound etc).
  • AribaAriba Posts: 2,682
    rogloh wrote: »
    What sort of frame update rate do you think were you getting with your TV Ariba? I'd estimate ~5Hz at 120MHz P2 clock rate if it was 1920 x 1080 pixels of resolution being sent out from the P2 over DVI.

    Perhaps this would still be reasonable useful for slideshow use etc. Dynamic text or graphics updates could look a bit laggy/smeared, any mouse would be pretty bad I expect.

    I for sure will not do 1920x1028 at 120 MHz. The idea is: If 640 pixel wide lines runs with 126 MHz, then maybe 1024 pixel work with 200 MHz or higher. 1024x576 with 250 MHz will still give an update rate of 26 Hz.
  • That's crazy. What kind of TV?

    I'll have to try my Samsung plasma. I know it's fully buffered. Maybe it will do similar things.

    The ACER monitor / TV I've been using wants it all pretty close, though some of the non-standard higher res, lower refresh tricks worked.

  • AribaAriba Posts: 2,682
    It's a Toshiba ~32".
    I bought it mainly because of the many input standards. (anything the P2 can produce and also SCART and USB).

  • potatoheadpotatohead Posts: 10,254
    edited 2020-06-12 02:03
    I have a mix of displays. Instead of SCART, my PVM has old school TTL 50/60hz.

    Having it all in one is nice.
  • AribaAriba Posts: 2,682
    Okay, I have modified an older HDMI object to 1024 x 576 pixels with 2 bit per pixel, and it works with my Toshiba TV. Depending on the sysclock frequency I get 24, 30 or 50 Hz frame rate for 200, 250 and 300 MHz clock. The attached picture shows, that the TV detects the resolution right.

    The code is a first draft, and works with PropTool and flexGui (fastspin). Would be interesting to know, if it also works with other TVs and Monitors. Don't forget to adjust the HDMI basepin at begin of the code.

    Andy

  • larryvclarryvc Posts: 42
    edited 2020-06-12 06:47
    @Ariba, I can run it with _clkfreq set between 235MHz and 275MHz with 31Hz and 33Hz respectively on an LG 34UC88-B 34-Inch 21:9 Curved UltraWide monitor. Display is very clear though the font lines are huge...

    All other frequencies were a no go with the display indicating no input.
  • thank you all!
    Im always impressed what P2 and it's community is able to do

    @Peter Jakacki: is there anything TAQOZ can't do? :smile:
    @rogloh: Nice! i used Hyperram myself in a complete different context and followed you thread
    @SaucySoliton: Thank you so much for the code sample

  • RaymanRayman Posts: 13,903
    720p@24Hz will work on some TVs but probably not not on a computer monitor...
  • SuracSurac Posts: 176
    edited 2020-06-15 07:44
    I myself aim for 640x360. This is 16:9 and 1/9 HD quality. Enough screen real estate for me.
    I just got my p2 accessorie boards and wanted to test what’s possible.
    I just misread HDTV for HDMI. My bad

    Regards
    Surac
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-06-12 14:03
    Easiest way to do this is just download TAQOZ RELOADED (via my SourceForge link), copy onto your SD card and boot your P2 with VGA connected to P0 as default. When the P2 boots you should have an uninitialized 640x480x8 screen but with your serial terminal at 921600bd type 8 BPP 360p to change it to a HD 16:9 aspect ratio and if you then type VGA it will divert all output to the VGA screen. You can specify PEN and PAPER colors from there etc. This is one of the things I will demonstrate on zoom if I have any time left. There's wav sound available too over that same VGA adapter board.

    For fun try some of the other video modes
    1080p --- for mono HD
    8 BPP 144p --- for some big characters in low res
    Type WORDS to see many more modes or just play BREAKOUT.
  • tried TAQOZ RELOADED

    now i can't stop smiling
  • AribaAriba Posts: 2,682
    @larryvc
    hank you for testing, so the 250 MHz default setting was just right.

    @SaucySoliton
    Thank's for the link.
    I had to modify Chips code a bit to make it work with my board. Works now well with my TV.
    Here is the modified code:
    '***********************************
    '*  720p24 HDMI - 16bpp 5:6:5 RGB  *
    '***********************************
    
    CON             hdmi_base = 24
    
    DAT             org
    '
    '
    ' Setup
    '
                    hubset  ##%1_010011_0100101000_1111_10_00       'configure PLL, 20MHz / 20 * 297 * 1 = 297MHz
                    waitx   ##20_000_000 / 200                      'allow crystal and PLL 5ms to stabilize
                    hubset  ##%1_010011_0100101000_1111_10_11       'switch to PLL
    
                    setxfrq ##$0CCCCCCC+1           'set transfer frequency to 1/10th clk, +1 for initial rollover
    
                    setcmod #$100                   'enable HDMI
    
                    drvl    #hdmi_base + 7<<6       'enable HDMI pins
    
                    wrpin   ##%10110_0011_0000_10_00000_0,#hdmi_base + 7<<6 '123-ohm DAC
    '
    '
    ' Field loop
    '
    field           mov     hsync0,sync_000         'vsync off
                    mov     hsync1,sync_001
    
                    callpa  #5+10,#blank            'top blanks
    
                    mov     x,##720-20              'set visible lines
    line            rdfast  #640*2/64,addr          'set rdfast to wrap on bitmap
                    call    #hsync                  'do horizontal sync
                    xcont   m_rf,#1                 'do visible line
                    cmp     x,#351          wz
            if_nz   cmp     x,#1            wz
            if_nz   add     addr,##640*2
            if_z    mov     addr,base
                    djnz    x,#line                 'another line?
    
                    callpa  #20+10,#blank           'bottom blanks
    
                    mov     hsync0,sync_222         'vsync on
                    mov     hsync1,sync_223
    
                    callpa  #5,#blank               'vertical sync blanks
    
                    jmp     #field                  'loop
    '
    '
    ' Subroutines
    '
    blank           call    #hsync                  'blank lines
                    xcont   m_vi,hsync0
            _ret_   djnz    pa,#blank
    
    hsync           xcont   m_bs,hsync0             'horizontal sync
                    xzero   m_sn,hsync1
            _ret_   xcont   m_bv,hsync0
    '
    '
    ' Initialized data
    '
    sync_000        long    %1101010100_1101010100_1101010100_10    '
    sync_001        long    %1101010100_1101010100_0010101011_10    '        hsync
    sync_222        long    %0101010100_0101010100_0101010100_10    'vsync
    sync_223        long    %0101010100_0101010100_1010101011_10    'vsync + hsync
    
    m_bs            long    $70810000 + hdmi_base<<17 +110          'before sync
    m_sn            long    $70810000 + hdmi_base<<17 +40           'sync
    m_bv            long    $70810000 + hdmi_base<<17 +220          'before visible
    m_vi            long    $70810000 + hdmi_base<<17 +1280         'visible
    
    m_rf            long    $B0850000 + hdmi_base<<17 +1280         'visible rfword rgb16 (5:6:5)
    
    base            long    $1000
    addr            long    $1000
    '
    '
    ' Uninitialized data
    '
    x               res     1
    
    hsync0          res     1
    hsync1          res     1
    '
    '
    ' Bitmap
    '
                    orgh    $1000 - 70              'justify pixels at $1000
                    file    "birds_16bpp.bmp"       'rayman's picture (640 x 350)
    
    Andy
  • Ariba wrote: »
    Okay, I have modified an older HDMI object to 1024 x 576 pixels with 2 bit per pixel, and it works with my Toshiba TV. Depending on the sysclock frequency I get 24, 30 or 50 Hz frame rate for 200, 250 and 300 MHz clock. The attached picture shows, that the TV detects the resolution right.

    The code is a first draft, and works with PropTool and flexGui (fastspin). Would be interesting to know, if it also works with other TVs and Monitors. Don't forget to adjust the HDMI basepin at begin of the code.

    Andy

    Cool!

    I'll be able to give this a go over the weekend.
  • RaymanRayman Posts: 13,903
    Sweet!

    Doesn't work at all with my Insignia 32" Fire TV.

    Didn't work at first with my DLP projector. But, when I jumpered 5V to the 5V pin there, it worked! I think it's because I have an HDMI switch there... Looks like the switch doesn't work unless it sees 5V.

    Is this what it is supposed to look like?
    2959 x 2595 - 639K
  • RaymanRayman Posts: 13,903
    edited 2020-06-12 18:41
    Here's the file and the bmp together.

    I think I remember someone showing this working many months ago... Think I totally forgot about it...
  • RaymanRayman Posts: 13,903
    Hmm... Might be able to do 720p video at 8bpp using eMMC. The 24 Hz helps a bit compared to 30 Hz...
  •                 orgh    $1000 - 70              'justify pixels at $1000
                    file    "birds_16bpp.bmp"       'rayman's picture (640 x 350)
    

    @Ariba
    @Rayman

    This ORGH coding style needs to be depreciated.
    If anyone extends this example code, they're going to have a lot of head-scratching to figure out that the hardcoded bitmap address is overwriting their code.
  • RaymanRayman Posts: 13,903
    I just got this going with HyperRam loaded via uSD:
    4032 x 3024 - 3M
Sign In or Register to comment.