Page 1 of 1
Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Mon Mar 10, 2025 9:44 pm
by Ardis
As something of a continuation of
this topic, but with a decided direction that I think justifies a new thread.
For this project I've mentioned in the previous thread, I'm looking to make a 16-bit VDP for this project. I'm set on using a Lattice iCE40 FPGA if it proves able to handle the workload I need of it (the ones I'm looking at are in the $7-$10 range on Mouser where I will be ordering the bulk of parts for this project.) I'm not dead set on the iCE40, but it is the most appealing option for me at the moment as it meets the requirements in price, availability (on Mouser) and power I need for this project.
The current specifications I'm looking to achieve are as follows:
- 16-bit color or 15-bit color
- 320x240 resolution (QVGA)
- Possible NTSC output (connecting to a TV through Composite or S-Video)
- 60 frames per second to keep it on par with Game Boy framerate (though I'm not as attached to this requirement as the first three, will drop to 30 if I go with NTSC output as an option, CPU will still run at 60 FPS)
- Possibly some kind of SuperFX-esque 3D graphics, either on the VDP itself or an expansion module using a more powerful FPGA that will either enhance or bypass the onboard VDP if the one I use isn't powerful enough by itself
- Graphical capabilities are intended to be on par with 16-bit home consoles
This is intended to connect to an LCD that would be sourced on Mouser as well. The ones I'm currently looking at (Displaytech DT035BTFT) have 24-bit RGB parallel lines and SPI.
I see three options on how to do this:
- Option A: Look into open source FPGA VDP with permissive licensing (likely a drop in replacement for a V9938 or similar) and learn enough VHDL to modify it to achieve intended specifications
- Option B: Learn how to code an FPGA from scratch (given that I don't really have much knowledge of VHDL, this will take a long time on my own)
- Option C: Pay someone to do one of the above (likely cannot afford this any time soon)
As my disposable income is currently focused on a project that is closer to completion and smaller in scale, option C is
temporarily ruled out. This project is in planning stages right now and hardware purchases won't start until that other project is completed, so C is not removed from consideration. I'm just trying to do research and get advice to steer that research in the right direction at the moment.
I was curious to hear from anyone familiar with open source FPGA VDP clones, or anyone generally knowledgeable in FPGA programming, to see if expanding an 8-bit VDP FPGA to 16-bit capability and changing its resolution and framerate is feasible or if the amount of changes needed to accomplish that was approaching the level of writing a new one from scratch. And, if so, if it requires a more powerful FPGA than an iCE40. My hope is that expanding an existing VDP drop in will made software development for the device easier due to the overlap with a familiar VDP.
If writing one from scratch becomes the plan, I intend to model its graphical management to be similar to that of game consoles of the 8-bit and 16-bit eras. I have a pretty good idea of how graphical data is stored and managed on a Game Boy so it would likely be more in line with that, but with more VRAM and colors available.
Or is such a project already in the works I missed in my own attempts to find one? If it is, point me to it and, if it looks usable for my own project, I will do what I can to support that project's development.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Tue Mar 11, 2025 1:21 pm
by enso1
Sorry to sound like a broken record, but Tang Nano 9K, for $20, has a decent FPGA very similar to the Lattice parts, and a ton of outputs, including an LCD connector (and working IP) and an HDMI connector capable of up to 720P output.
For $10 more Nano 20K has an FPGA twice as fast, 8MB of fast SDRAM and an audio amp.
You can rig up an NTSC output with a couple of resistors.
The toolchain is decent (and there is an opensource one!).
And the hardware works so you can focus on getting the video and whatever else to work instead of revising PC boards and probing the circuit with an oscilloscope and a logic analyzer for the next 6 months solving unsolvable timing problems.
Although I totally get it if you want to dick around with an oscilloscope and make PC boards.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Tue Mar 11, 2025 8:08 pm
by Ardis
The iCE40HX FPGA I'm currently looking at is more than capable of running projects similar to what I'm aiming for, some of which are already candidates for modification to fit this project. (Whether I'll need a beefier FPGA after expanding the capabilities of one of those chips is to be seen and is part of the learning process for me.)
Putting cost differences aside, that still sounds like massive overkill. It might even be able to run the entire system on one chip, only a step removed from writing up a console architecture as an emulator like the PICO-8 for a Raspberry Pi.
I'm going to pass on those as they go against the spirit of this project.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Tue Mar 11, 2025 9:08 pm
by BigEd
Are you thinking of some already-available board, Ardis, or a custom board? And in either case, have you an idea of the pinout, at least in terms of how many pins you'll need?
(I'm not aware of an existing HDL VDP, but I haven't searched for one. In any case, be sure to consider both VHDL and Verilog. In most cases, you can mix-and-match projects using both languages.)
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Tue Mar 11, 2025 10:05 pm
by Ardis
I'm not picky about a specific language. I'll edit my original post to clarify that.
The entire device will be a custom PCB, this thread is focused on one FPGA that will be on that PCB (as a stand-in for where a custom chip would go if I had the funds since no off the shelf option exists. At least not in current production.)
I have a grasp for PCB design, but coding FPGAs is something I will need to learn for this project or pay someone to do (ideally, I'd like to get a team together for this, but if there were people motivated to make this, it would have happened years ago and I don't have the funds to pay a team.)
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Wed Mar 12, 2025 7:47 am
by BigEd
I think your best chance is to refine your spec progressively, from feature list to something more like a datasheet, with block diagrams, internal mechanisms, interfaces, some idea of timings. You'd need to inspire some potential collaborator.
A great number of chips from back in the day are now modelled in detail, in conventional programming languages, in MAME (and probably similar projects.) Such models can be quite informative and educational to study, even though they are not hardware models.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Wed Mar 12, 2025 7:04 pm
by enso1
I don't think what you propose is very hard to implement on an FPGA, except for the 3D graphics part. Basic frame buffer is very doable.
I will be frank: From what I've observed, I seriously doubt that you have any idea how to make nanosecond-scale hardware, based on your inability to understand the cost, time, and skill balance required for such a project. Not to discourage you -- it is a skill that can be learned, but it will take some time and effort, and the ability to listen to good advice and acknowledge ignorance, something I have not observed here.
Using off-the-shelf hardware that fits 90 percent of your goals would make this maybe doable. Learning how to design fast PC boards, how to write FPGA code, and how to make it all work together (while being concerned about $10) -- I am betting on failure.
Good luck, and I will stay off your thread unless you ask for my participation specifically.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Thu Mar 13, 2025 4:42 pm
by Ardis
As mentioned in a previous thread, I'm going into this with no prior knowledge on designing computers of this nature from the ground up. Failing to bring this from concept to completion is an outcome I've not written off.
At this planning/research stage, I don't want to seriously involve anyone in this project so I don't feel I'm wasting their time if I come to the conclusion I am not able to see it through to completion. I realize it's a lot for me to take on by myself and I'm no prodigy in electronics design like some people here. In the situation where I decide I cannot make this project happen, I do plan to release any files containing notes, designs and other material related to this project here. That way if someone else wants to attempt to take over or use my notes to start their own project, it's available.
The best way to describe this stage of the project is "finding out what skills I need to make this project happen" before involving anyone or committing any serious amount of time/money to it. Once I know what skills I need to make this project happen, I'll look at which ones I plan to learn for myself and which ones I might be able to pick up a collaborator or two for (paid or unpaid, former more likely.)
As part of the learning process, I will be making a string of simpler devices to develop these skills.
So far the skills I see myself needing (if not learning myself, bringing someone in):
- PCB Design: I am a bit of a novice with Cadsoft EAGLE, but I have made working game cartridges before using it. I did try getting a rough hardware layout for a prototype put together along with a demux for the 65C816 at one point. That said, I know that a game cartridge is far simpler than a full game system and will likely need to pick up things like an oscilloscope.
- C/C++ Programming: For programming tools for software development for this device once a working prototype is made. This is where I am a little more knowledgeable, just not knowledgeable enough to make a career out of it (or I'd easily be able to pay people to make the other parts of this project.)
- 65xx Assembly: I have no prior knowledge to any assembly language and struggle to even read assembly, but I've had people suggest that it is good to learn at least one assembly language as a programmer
- FPGA programming: I have no prior knowledge here, either, but I've read a few pieces of FPGA code before and feel like I'd be able to learn this more easily than 65xx assembly if I'm being honest
I think your best chance is to refine your spec progressively, from feature list to something more like a datasheet, with block diagrams, internal mechanisms, interfaces, some idea of timings. You'd need to inspire some potential collaborator.
A great number of chips from back in the day are now modelled in detail, in conventional programming languages, in MAME (and probably similar projects.) Such models can be quite informative and educational to study, even though they are not hardware models.
I don't think there is any universe where I am going straight from nothing on my workbench to a working prototype with the full performance specs I want. Too much to learn before I can get there. As mentioned above, I will likely be making a string of simpler devices along the way to develop the skills needed to tackle the project I want to make.
I will keep in mind the software modeling of chips from emulators, though.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Thu Mar 13, 2025 5:09 pm
by BigEd
I trust you've seen this, in various previous threads
Thomson's Rule for First-Time Telescope Makers: "It is faster to make a four-inch mirror then a six-inch mirror than to make a six-inch mirror".
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Thu Mar 13, 2025 5:58 pm
by John West
My thoughts, and these are only opinion (although somewhat experienced opinion): there is little point to this grand plan-making before you have any of the skills you will need to achieve it. You don't yet know what's easy, what's hard, or what's just not going to work. And my advice: stop thinking about this project. Keep its loose shape it in the back of your mind as an eventual goal to guide you, but don't spend any more time on the details. Instead, work on smaller simpler projects. For each, introduce at most one technology that is new to you, and use the skills that you already have to support learning the new one. Start doing.
It is likely that the experience you gain along the way will re-shape the final project into something that is better, more achievable, and more satisfying, but unrecognisable at this point.
If I was in your position, I would start by buying a cheap FPGA board with VGA output and getting it to produce a valid signal - without copying someone else's design. Then expand from there. It doesn't matter what that FPGA is, and it doesn't matter if it's not capable of what you eventually want to make. By the time you reach its limits, you'll have a much better idea of what you actually need, and can upgrade to that.
Or, given that you have no assembly language experience, and that's pretty much essential for this kind of project, get a simulator for any retro-computer that takes your fancy and start writing code for it. Make your own version of simple games like Tetris.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Thu Mar 13, 2025 7:43 pm
by BigEd
(Just to note, I think we're succeeding - I hope we're succeeding - in maintaining a positive and encouraging tone. I hope it continues that way - encouragement is what's needed, for there is a long journey ahead.)
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Thu Mar 13, 2025 9:56 pm
by BigDumbDinosaur
...there is little point to this grand plan-making before you have any of the skills you will need to achieve it.
In other words, learn how to fly a single-engine, light aircraft before you climb into a 747’s cockpit and take off for Tokyo.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Sat Mar 15, 2025 10:00 pm
by John West
However... I was talking with my partner about other things, and a friend of ours came up in the conversation. She does this. She picks a goal, she learns the skills she needs to do it, and she does it. That way of working/learning is alien to me, and I suspect that the people who can successfully do it are fairly rare. But some people can.
So, if you're one of them, don't let me tell you how to do things. My advice works for the kind of brain I have. Other brains are available.
Re: Custom 16-bit Color VDP FPGA for 65C816 Devices
Posted: Mon Mar 17, 2025 10:24 pm
by fachat
Building a project as you describe is not a small task. I have been working on my Micro-PET VHDL video core for a couple of years now and still not finished. And that with my long years of experience in Assembly and even VHDL programming.
As has been mentioned, I'd also recommend going in small steps, expanding your experience by each step. Keep the long term goal in mind, think a couple of steps ahead - but be sure to step up (only) once you have understood the previous step. For example my UltiPET is basically a combination of a lot of other, smaller project, in each of which I learned specific aspects that helped me reach the ultimate goal...
André