Author Topic: Outputting to HDMI with a low power MCU?  (Read 19936 times)

0 Members and 1 Guest are viewing this topic.

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Outputting to HDMI with a low power MCU?
« Reply #25 on: November 30, 2015, 10:06:19 am »
I know it sounds a bit crazy... but I still love the idea of having a "retro" system actually *work* on modern peripherals. It's what everyone has to work with these days.

Yes, me too!

I am planning on building a Z80 (note the absence of the 'e') based board with an FPGA and a lot of SRAM (details not decided yet).
I just started to delve into FPGA recently and am looking forward to actually working with them (ebay can be slow!).

I have to do with a 16 bit address bus so no huge video resolutions. I'm thinking ot 640x480 to start with.

Excellent fun these projects  :-+
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline lasmoriTopic starter

  • Contributor
  • Posts: 19
Re: Outputting to HDMI with a low power MCU?
« Reply #26 on: November 30, 2015, 10:26:25 am »
Yes, me too!

I am planning on building a Z80 (note the absence of the 'e') based board with an FPGA and a lot of SRAM (details not decided yet).

:D. I've considered using the Z80... but the ez80 does have a few things that interest me. 24 bit address bus, I2C, and SPI being the big ones. I was imagining the system having a couple "cartridge slots" using PCI Express 1x connectors. Would maybe run I2C, SPI and some GPIO lines to the cards. :D
« Last Edit: November 30, 2015, 10:28:13 am by lasmori »
 

Offline lasmoriTopic starter

  • Contributor
  • Posts: 19
Re: Outputting to HDMI with a low power MCU?
« Reply #27 on: December 01, 2015, 03:28:16 am »
I think that I *may* have a handle on what I'd like to do.

The source resolution would be 640x360 with 16bit (5:6:5) color. The target resolution would be 1920x1080p

The circuit would have the ez80, two SRAM buffers of 4mbit each, A FPGA capable of running at 148.5 MHz such as the Lattice MachXO2, and a HDMI transmitter.

The ez80 would fill up it's video memory, then synchronize with the FPGA to perform a page flip. The FPGA would pull in a line (640x16, or 10kb) of the buffer and start iterating with each clock tick. The FPGA would run each pixel three times. It would then run the same line 3 times. (Giving us our resolution scaling). Each pixel/line the hsync/vsync lines would get pulsed. Repeat until the frame is done. I think the FPGA would also have to convert the color data from 16 bit (5:6:5 bits per color) to 8 bits per color unless the transmitter can handle the conversion itself.

Does this seem like the right idea? I know that a FPGA could be programmed to do the whole HDMI stack itself... but this feels like an easier solution.
« Last Edit: December 01, 2015, 03:34:25 am by lasmori »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Outputting to HDMI with a low power MCU?
« Reply #28 on: December 01, 2015, 05:27:03 am »
640x360 16bit requires a 450KB frame buffer, if you want to be able to update the buffer while it's being displayed that means you need 900KB and display one buffer while the CPU is filling a 2nd buffer.

If you want full pixel control you will need to transfer 450KB (one buffer) to the memory hopefully via DMA at 30 fps, you would need to be able to achieve transfer rates of 6750 kilo (6912000) words per second, that is if your DMA handles full word transfers.

If instead you just wanted a text/sprite based display then the requirements might be more achievable.

Or maybe you can update via some kind of interface that doesn't need to update at the full 30Hz. I guess you need to tell us what type of output you are planning to display as in individual pixel control or sprites with a couple of colors (foreground, background and maybe a blink bit)
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Outputting to HDMI with a low power MCU?
« Reply #29 on: December 01, 2015, 06:45:35 am »
To my mind it always makes sense to use dedicated, specialized parts for a specific job. Unless they're really expensive and can be replicated in the FPGA, it allows you to choose a smaller FPGA - if that is relevant. Else it just saves on development costs/time.

I personally don't like the asymmetrical color bits (5:6:5) - I would make that 5:5:5 and leave on bit for bright (intensity) or something. I don't see how you can do flash because you need two colors for that...?
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline lasmoriTopic starter

  • Contributor
  • Posts: 19
Re: Outputting to HDMI with a low power MCU?
« Reply #30 on: December 01, 2015, 07:20:25 am »
640x360 16bit requires a 450KB frame buffer, if you want to be able to update the buffer while it's being displayed that means you need 900KB and display one buffer while the CPU is filling a 2nd buffer.

Covered that. :P "two SRAM buffers of 4mbit each"

If you want full pixel control you will need to transfer 450KB (one buffer) to the memory hopefully via DMA at 30 fps, you would need to be able to achieve transfer rates of 6750 kilo (6912000) words per second, that is if your DMA handles full word transfers.

If instead you just wanted a text/sprite based display then the requirements might be more achievable.

Or maybe you can update via some kind of interface that doesn't need to update at the full 30Hz. I guess you need to tell us what type of output you are planning to display as in individual pixel control or sprites with a couple of colors (foreground, background and maybe a blink bit)

The "source" video would ideally be 640x360x16.

While I would like to have the ability to do general blitting... sprites and such are one of my goals.
 

Offline lasmoriTopic starter

  • Contributor
  • Posts: 19
Re: Outputting to HDMI with a low power MCU?
« Reply #31 on: December 01, 2015, 07:39:24 am »
To my mind it always makes sense to use dedicated, specialized parts for a specific job. Unless they're really expensive and can be replicated in the FPGA, it allows you to choose a smaller FPGA - if that is relevant. Else it just saves on development costs/time.

Yeah, that's how I was feeling. :)

I personally don't like the asymmetrical color bits (5:6:5) - I would make that 5:5:5 and leave on bit for bright (intensity) or something. I don't see how you can do flash because you need two colors for that...?

5:6:5 is pretty traditional for early 16 bit "High Color". Green is generally chosen for the extra bit as our eyes are the most sensitive to it. 5:5:5 (also very common) often used the last bit to for the "alpha channel".
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Outputting to HDMI with a low power MCU?
« Reply #32 on: December 01, 2015, 07:52:57 am »
Yeah I saw the alpha channel variant as well but I have no idea how to implement that in hardware...  :o
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline lasmoriTopic starter

  • Contributor
  • Posts: 19
Re: Outputting to HDMI with a low power MCU?
« Reply #33 on: December 01, 2015, 08:03:49 am »
Yeah I saw the alpha channel variant as well but I have no idea how to implement that in hardware...  :o

Imagine you had two sprites overlapping each other. If one were marked with the alpha bit... you could add the colors of overlapping pixels together rather than having the one drawn last replace the former. That's my best guess... but I honestly have no experience with it. :D.
« Last Edit: December 01, 2015, 08:05:34 am by lasmori »
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Outputting to HDMI with a low power MCU?
« Reply #34 on: December 01, 2015, 09:48:47 am »
So the one bit would trigger some level of hardwired blend-percentage.
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline netdudeuk

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Outputting to HDMI with a low power MCU?
« Reply #35 on: December 02, 2015, 12:25:43 am »
My 6502 and Z80 systems both use a Parallax Propeller via parallel interfaces, giving colour VGA graphics and text.  They're both works in progress but they work perfectly OK as far as I've got them.  The only downside is that they don't have shared memory so I wouldn't be able to quickly bang images, etc, to the local RAM and see something on the screen.
 

Offline lasmoriTopic starter

  • Contributor
  • Posts: 19
Re: Outputting to HDMI with a low power MCU?
« Reply #36 on: December 02, 2015, 01:21:19 am »
My 6502 and Z80 systems both use a Parallax Propeller via parallel interfaces, giving colour VGA graphics and text.  They're both works in progress but they work perfectly OK as far as I've got them.  The only downside is that they don't have shared memory so I wouldn't be able to quickly bang images, etc, to the local RAM and see something on the screen.

I love the Propeller. I was thinking of working one into my design... just because. :D
 

Offline Cliff Matthews

  • Supporter
  • ****
  • Posts: 1910
  • Country: ca
    • General Repair and Support
Re: Outputting to HDMI with a low power MCU?
« Reply #37 on: December 02, 2015, 01:58:49 am »
For $5 you can get a Raspberry Pi "Zero" which not only has HDMI (and analog composite) video output, but also features a complete microcontroller running at 1 GHz on which you could run a Z80 emulation, but you will probably have to slow it down to "retro" speeds.
Hmm.. It would be nice to flash one of these "zero's" to quick-boot a tiny mouse-less Linux doing nothing more than HD44780 to HDMI emulation. Now that could display neat retro games (and be a great Kick-starter too). Teachers worldwide would have giant Arduino classroom LCD's!
 

Online KE5FX

  • Super Contributor
  • ***
  • Posts: 1878
  • Country: us
    • KE5FX.COM
Re: Outputting to HDMI with a low power MCU?
« Reply #38 on: May 11, 2017, 10:07:39 pm »
Have a look here

http://www.4dsystems.com.au/product/PICASO/
http://www.4dsystems.com.au/product/uVGA_III/

they do other chips too


btw, are you using the Aclaim eZ80 dev kit?

Neat chip, but: is it just me, or do they never get around to specifying what resolutions they support?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf