fachat wrote:
Let's do some math.
320x240 at 60Hz is about what the C64 could do. So let me start there.
This means you have a pixel frequency around 8 MHz. With a 16bit colour approach, you'd need 2 bytes per pixel, i.e. 16MBytes per second throughput just to display the video (at least in the active areas, inside the borders if you have them). Also, that would be 153,600 bytes.
The fastest way a 65816 could transfer bytes from location A to location B takes 8 cycles. If your VDP should provide the video itself, a 65816 would have to have a speed of 128MHz or thereabouts.
This means the simple approach won't work. What can be done about it?
1) reduce bandwidth requirements: use palette modes that e.g. allow to select 1 out of 16 arbitrary colours from a palette. A single bit per pixel with fore- and background could do this for a two colour palette.
Assuming a 4 bit per pixel approach, the 65816 would still need to run at 32MHz. Some people overclock the 816, but this is still way out of spec.
2) DMA the pixel data from memory into the video output logic, and use the separate 65816 CPU to just modify the video data when it needs changing.
This would still need 16MHz memory clock for an 8 bit DMA. This is easily doable, but to also get the CPU access in, you need really fast RAM and select logic. Or the CPU waits for the off screen areas, like some older micros, the you can use the 816 as video processor (I run it without problems at 17.5MHz even under heat gun or ice spray).
But even so, by using two alternating video banks, giving DMA a 16 bit access, memory needs to run at 8 MHz only, or you run it at 16 MHz and interleave CPU with video access.
But in my opinion, such a solution would already basically require some fast programmable logic like an FPGA. That probably defeats your goal of a single VDC.
3) like 2), but just use the main CPU to modify the memory. This is the route most micros used back in the day. Only their video logic was not programmable but custom chips like the VIC-II.
If using an FPGA, you'd have the advantage that you could program a custom video processor next to the DMA logic, that is then optimized for yhat specific task.
Option 3) is what I am looking into for my Micro-PET family, if I can fit it into the FPGA I have chosen (Xilinx Spartan 6E).
André
DMA, not using the full color palette and tile memory were something I was already planning on doing to keep drawing instructions simple. I wanted to make developing for this be as easy as the Game Boy, but having a 16-bit CPU and full color LCD. A lot of my plans have it sitting as kind of a cross between a Game Boy and a Super Nintendo.
fachat wrote:
So, coming back to the original question.
As I don't know which interface is provided by the LCD (I think the other thread mentions SPI and 8bit parallel?), I'd probably suggest another route: use a standard VGA/HDMI output, which gives you:
1) better options to attach an external screen
2) more options on existing video solutions, like the Commander X16's "vera" which seems to be available separately, or the Xilinx FPGA solution I did in my Micro-PET.
André
If it uses an external screen, then it's not really a handheld which is the design goal. That said, I'd like to have the option for hooking up an external display, so I might try to work in something with S-Video or Composite output.
My original impression was that SPI was superior, but talking with people on there showed that the LCD controller (which nearly every LCD I was looking at as an option had) might not be able to handle that much data through SPI.
There are a few open source video FPGAs I was looking at using as a base to simplify down to what I need (since most of them are overkill for what I need.) I'm a little early in the research stages for this to decide on one as I would still need to learn HDL to be able to comprehend those.
fachat wrote:
P.S.: if the LCD has an addressable memory interface and internal video memory, this could make option 2 a viable choice.
You'd still have to calculate how fast you'd want to eg. clear the screen, or copy a new screen to the LCD - does it have multiple video pages so you can do double buffering? With 150+k of memory to copy and 8 cycles minimum per byte for a 65816 (that calculation neglect if you have to adapt memory addresses in between / assumes some auto increment), this will still need 1.2 seconds. You'd probably be faster with programmable logic still.
I haven't seen anything on the LCDs I was considering that would indicate that they had onboard memory.