I want to create an inexpensive RISC-V based retro-like computer / video console - Page 1
Forum section: electronics / projects

author: Krystone
author_rank: Contributor
timestamp: September 17, 2023, 05:50:23 pm
content: Hello everyone! My name is Krystian and I am middle-aged guy from Warsaw, Poland (EU). Since this is my first post, I thought I'd mention this as part of introduction.The gist:I want to create an inexpensive RISC-V based retro-like computer / video console. I've had this idea for more than two decades... In fact, I've created something based on 6502 (not exactly RISC) in around 2002, but never shared any of the work. By day, I work in the software industry, but I am a huge fan of electronics, and I've done a few home projects. My skills are rather basic though. Having said that, I think I understand computer microarchitecture and I am somewhat capable of assembly and higher-level programming, which is something I've been doing on and off since the late 1980s, starting on ZX Spectrum and Atari 800XL.The idea:Recently, I’ve rewatched David's video on The 10 CENT RISC V Processor (CH32V003,https://youtu.be/L9Wrv7nW-S8), and I’ve researched this WCH company to find out that they have some interesting MCUs+ on offer at low prices. I’ve found versions running at 144 MHz with Bluetooth quite interesting. I’ve figured it would be quite easy to create a retro computer that has some RISC-V processing power. First of all, because it is cool, and second of all because RISC-V ISA is here to stay and could be a learning platform as well. I’d like to create everything from the off-the-shelf components (maybe some FPGA), but the idea is to keep the cost low and after the project matures enough, release it to the public domain, and continue to work on aesthetics such as custom keyboard, accessories, and software. The key is to leave room for others to improve, to create upgrades and write software for it as well. The constraints of this project would be deliberately selected to inspire creativity.Let me know what you think and if there’s an interest in such a project. I am not a billionaire, but I think I could share some of my earnings or savings to get this project off to a faster start. I will share more if there’s interest. Thank you. Please comment. Cheers! Krystian

author: Krystone
author_rank: Contributor
timestamp: September 18, 2023, 07:18:14 am
content: If I am in the wrong please, do not hesitate to inform mePointing me out somewhere else would also be very much appreciated.

author: iMo
author_rank: Super Contributor
timestamp: September 18, 2023, 08:42:46 am
content: Yea, that has been an idea of many enthusiast here - to create a modern version of the vintage retro-like computers. There is a lot of designs you may find on the web. The easiest way is to emulate a vintage computer - like C64/Amiga/SinclairZX/Atari800/Atari520/BBCmicro/CP/M/Unix etc etc - on the risc-v, for example. There are dozens and dozens of such designs running old stuff on modern mcus or fpgas. To create a new retro-like computer is not an easy task software-wise, as the most important part of such an attempt is the application software base, imho. Thus people tend to create something where you can utilize the large existing vintage software base (ie games). With the new designs without an existing sw base you will finish your laborious effort with "Hello World!" printed out 1000 times in a for-next loop and that it's.. So, the question is - what is your existing sw base you want to run on your retro-computer like?

author: Krystone
author_rank: Contributor
timestamp: September 18, 2023, 11:45:09 am
content: Thank you for your reply. All that you've mentioned was considered by me. It is my intention to create a new platform, and to encourage people to write and port software to it. It's likely it would be used as an emulator for 8/16 bit systems/consoles you've mentioned up to a point where emulation is no longer possible due to hardware limitations. However, "Hello World" printed 1000x on VGA 31kHz or 15 kHz CRT monitor in built-in Python interpreter is something I'd actually consider a major success. I actually want to go very deep, and perhaps even figure out the fastest line drawing algorithms in RISC-V assembly (this is just an example, I already know what it would be). I've somewhat already decided on the graphics IC (off the shelf). On a side note, I am a retro computer collector and I've got many, many Ataris/Commodores/Amigas/Spectrums/SNESes/NESes, etc, etc, and even pinball machines... I've studied most of them, I've enjoyed all of them. Imagine when you first powered on your 8-bit computer and it seemed like there were so many possibilities... I'd like something like that. I am tired of Raspberry Pis with amazing quad-core CPUs running light switches...Anyway, I've done some research and here are some of proposed ICs I'd like to interconnect:Proposed ICs:1. 32-bit RISC-V MCU @ 144 MHz → CH32V208https://www.wch-ic.com/products/CH32V208.htmlhttps://github.com/openwch/ch32v20x2. Synchronous Dynamic RAM / SDRAMSize and type to be decided, no less than 4 MiB, interfaced to CH32V2083. 16-Bit Stereo Audio DAC With Analog Mixing → PCM1774https://www.ti.com/product/PCM17744. Display, Audio and Touch Graphics Controller → BT815/BT816https://www.mouser.pl/new/bridgetek/ftdi-bt815-bt816/5. Voltage regulator (5V input)IC To be determined...BT815 seems interesting and even includes a simple synthesizer. Overall, I think the above is a good start.Should I share more details?

author: Martinn
author_rank: Frequent Contributor
timestamp: September 18, 2023, 03:03:29 pm
content: Are you sure about the Bridgetek video controller? These are rather specialized and work by processing a display list, definitely not ideal for raster graphics.Personally (I might be wrong of course) I doubt that anyone will join you with the programming. There are just too many other boards available.So my recommendation would be to clarify what you intend to achieve.You wrote „Python“ - this would mean porting Micropython to your machine, which I would consider a respectable task.Or as you are into retro machines - port C64 BASIC which is also tricky as it is a large heap of hand optimized assembly code?Or running a assembly loop blinking an LED?I‘d go FPGA, having C64 sprites in mind. But that´s just a personal preference.

author: Krystone
author_rank: Contributor
timestamp: September 18, 2023, 04:40:04 pm
content: Am I sure about Bridgetek VC? Not sure, but reading through the Datasheet, it gives me VGA, and RAM DAC, and it has functions to draw on the screen. And it's cheap. I would intentionally not implement sprites like in the Atari and C64. This ICs is robust enough to impress any Atari or C64 owner despite its limitations. Keep in mind that carefully selected limitations and restrictions are part of the fun. People will find a way to improve on things just like they did on Commodore or Atari years later. I don't want to go FPGA at all. There's MiST and MiSTer for that... And I know that MiST 2 is in the works. I want off the shelves components and I'd like this computer to boot to OS of my choosing like C64 or Atari did. I thought Python is popular, then why not port it. Someone is probably doing this already. So, we'd have a computer where Flash ROM can be reprogrammed to BASIC or Python, and has a Graphics and Audio capabilities, while featuring something relatively new which is RISC-V ISA at decent clock for a few cents...https://youtu.be/1yzo9v7NEgUConnectivity of the computer:1 x 15-pin VGA Output (up to max capabilities of FT813/FT815) / RGB via SCART at 15 kHz4 x USB Ports (Keyboard, Mouse, Storage, Controllers, additional USB hub ICs might be needed)1 x Stereo sound output using 3,5 mm jack.1 x Edge (or other) connector for expansions1 x Bluetooth1 x SD-Card Reader/Writer (must be able to boot from SD)1 x Ethernet1 x Power connector via USB-C

author: Krystone
author_rank: Contributor
timestamp: September 18, 2023, 04:58:12 pm
content: BTW: This is what theCH32V208WBU6-EVT-R0evaluation board forCH32V208WBU6looks like... I've ordered 4 to try it out.

author: Krystone
author_rank: Contributor
timestamp: September 18, 2023, 06:59:55 pm
content: Note on video resolutions:It is crucial to me that this computer has specific constraints regarding its video capabilities. I'm not interested in high resolutions; I prefer the primary resolutions to be approximately 320x240 pixels and 640x480 pixels. I wish to maintain these settings to facilitate pixel art creation on this machine. Additionally, it's essential for the machine to produce a 15kHz signal suitable for display on standard CRT TVs, catering to all CRT RGB enthusiasts. Technically, the computer would be capable of SVGA (800x600) or perhaps higher resolutions as well. But, that's just a bonus.Note on MicroPython:It seems that someone has already started MicroPython development for this RISC-V microcontroller. A prototype version of MicroPython for similar board is now available on GitHub.https://github.com/r4d10n/micropython-wch-ch32v307/tree/master/ports/wch

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 18, 2023, 10:08:30 pm
content: I think your goal was a bit unclear, which may explain why you didn't get more replies.It wasn't clear whether you wanted to just emulate vintage systems or develop a completely new system in the "spirit" of the vintage home computers/consoles.Keep in mind there are already plenty of similar devices, based on from FPGAs to MCUs to RPis (ARM SOCs), so your main differentiator here would be to be based on a RISC-V MCU? Why not, but does this warrant yet another device like this? Your call I guess.One existing system you can have a look at:https://www.commanderx16.com/From a technical standpoint, can a CH32V208 emulate most vintage 8-bit computers at full speed (or faster)? Certainly. Could it emulate more powerful systems such as the Amiga or Atari ST? I'm starting to doubt it. Possibly emulating a 68000 at 8MHz on this RISC-V MCU at 144MHz is possible, but also emulating all the specialized ICs/coprocessors at full speed, I kinda doubt it. So, you need to define what you are expecting to emulate.As others have said, while the Bridgetek display controllers are great, they are designed to display antialiased vector graphics using display lists. That's great for some use cases, but probably not adapted to implementing vintage bitmap graphics.No for a pure custom system (not emulating anything) running native code and actually making use of vector graphics, that could be nice. In other words, your proposed architecture would work better for this use case than for emulating vintage systems. But I have no clue if there's any sizable interest in that (ie. a "market"), so keep that in mind.

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 07:00:36 am
content: I am somewhat familiar with 8-Bit Guy’s dream computer: Commander 16. I've been following him on YT. However, the difference between him and I is that he must make it at least mostly successful... I can afford to fail, and hardly sell anything. In fact, I am considering donating machines to people interested in developing for them. Though, I would not exclude the possibility of monetizing on it.Perhaps you are correct in saying that I wasn't clear whether I wanted to just emulate vintage systems or develop a completely new system in the "spirit" of the vintage home computers/consoles. It is the latter I want, but I know that capability to emulate other systems would expand its user base. I am not dead set on the components I've chosen, except perhaps for the RISC-V MCU. If there are better off the shelves chips that are not hard to get, I would gladly consider them for the project. Any suggestions? (Anyone?)There are so many ideas and thoughts in my mind at the moment about this project that I am still simply unable to share them all without writing a paper on it or starting a YT channel. That may be another reason why I've provided so little info so far. I am open to discussing everything.Here's a list of some goals / initial specs:(all subject to change)Hardware:1 x RISC-V MPU @ 144 MHz (or more?)1 x Video, i.e. VGA / HDMI out1 x RAM / Flash1 x Stereo Audio (DAC and synth would be great)Connectivity:1 x 15-pin VGA Output / RGB via SCART at 15 kHz4 x USB Ports (Keyboard, Mouse, Storage, Controllers, additional USB hub ICs might be needed)1 x Stereo sound output using 3,5 mm jack.1 x Edge (or other) connector for expansions (Add JAMMA as well?)1 x Bluetooth1 x SD-Card Reader/Writer (must be able to boot from SD)1 x Ethernet1 x Power connector via USB-CDream product:A collectable new computer in the box with its own custom case, keyboard, peripherals, PSU, and manuals. Available as 1) DIY kit 2) bare PCB, or 3) fully boxed and collectable.

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 10:00:51 am
content: I have not researched this properly but it seems that Excamera Labs Gameduino Dazzler is using BT815 and it looks like they're getting very nice results. In fact, it would probably be beneficial for further development to reuse this. In the end, I don't think it matters what graphics IC we settle on because we're developing something new with dead hardware anyway. And... that's the point. Again, it is critical to reuse off the shelve components and design this with limitations to inspire hacking and creativity.Links:https://excamera.com/sphinx/gameduino/https://www.crowdsupply.com/excamera/gameduino-3x-dazzlerhttps://eu.mouser.com/new/excamera-labs/excamera-labs-gameduino-3X-dazzler

author: Ian.M
author_rank: Super Contributor
timestamp: September 19, 2023, 11:26:18 am
content: Maybe look at RISC V SOCs like theStarFive JH7110, which gets you on-chip HDMI and parallel RGB656 (add three R-2R resistor ladder DACs to get analog RGB), USB, Ethernet, and digital audio in and out, all in the same chip.There are already several JH7110 based SBCs on the market, so IMHO you should probably concentrate on the software side of your project, to run native 'bare metal' on existing hardware, but also with an option to run under Linux.

author: iMo
author_rank: Super Contributor
timestamp: September 19, 2023, 11:48:03 am
content: Yep, I would not start with an mcu with 64kB ram and 128kB flash today.Like the above SoC, an external sram/dram/ddram is way to go.In past I was playing with stm32f103 and stm32f407 with an external 512kB 10ns sram attached via their FSMC bus (and the sdcard for apps) and that absolutely naive and simple setup outperforms any retro-vintage 8/16/32bitter from 80ties even in emulation, imho.Not talking about pic32mz with its 512kB sram on chip, 1-2MB flash and 200MHz clock - and that is a vintage mcu alreadyPS: still - my above question - what kind of existing sw base you want to utilize for your retro computer? 99.9% of people who potentially would consider your design want to "run" something on it - an OS, apps, games, utilities, etc. Or do you target those 0.1%

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 11:48:32 am
content: Thank you for the idea. I've considered this chip or rather a SBC based on it, but this is way too much... IMO, there's nothing retro about it. I might as well use one of several Raspberry Pis or ODROIDs I have, or continue to use my PC which is what I am typing this on. I don't want another Linux SBC. I do want to focus more on the software, so what I really need at this point is someone's help to get the components I've listed above interconnected. What I want is a schematic, then a PCB and off to manufacture several prototype boards. I am not an EE, but with the help of the Internet, a forum such as this, I could probably design it myself making several mistakes on the way. This, however, is the step I am trying to skip. While PCB is being designed and manufactured, I'd like to focus on designing the case and the keyboard for the device (I've already commissioned this task to an artist and I will share it here anyway). Then, once I have prototype boards, I'd like to start to play with bootloader and get the "Hello World!" written... Then, we'll see...Is anyone interested getting the schematic done for me? I don't care if it is for the money or anything else. Please let me know. I'd like to get this moving before I start loosing interest :-)

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 11:56:17 am
content: Quote from: iMo on September 19, 2023, 11:48:03 amBut, that is exactly what I want. You'd be amazed what can be done in 64/128 KiB with 320x240 resolution (though I would like more RAM anyway). I don't need to outperform anything. What I want is a device that has severe limits. I want myself and others (perhaps) pushing those limits just for the fun of it. Limits is what makes things fun. Take a look at PICO-8 project. It's fun.https://www.lexaloffle.com/pico-8.php

author: iMo
author_rank: Super Contributor
timestamp: September 19, 2023, 12:01:06 pm
content: I had built my first SBC in 1982 (8085 based) and since then I learned following - in the moment I get a great idea I let the idea "settle". By distracting myself in doing something else.. After a month or two or three I evaluate the idea again, and usually my interest in that idea gets lost (for hundreds of reasons). Try it, it worksPS: I do not want you to derail, no.. It would be a great learning exercise even with the 64kB ram/128kB of flash..

author: Someone
author_rank: Super Contributor
timestamp: September 19, 2023, 12:01:46 pm
content: Quote from: Krystone on September 19, 2023, 11:48:32 amSo dont install linux on it? Bare metal the JH7110 and treat it just like a traditional short pipeline CPU.How do you expect USB to work with a low MHz CPU ?

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 12:11:45 pm
content: Quote from: Someone on September 19, 2023, 12:01:46 pmI've already said it: "I am tired of Raspberry Pis with amazing quad-core CPUs running light switches...", as for USB that part is built into MCU. I've posted picture of the evaluation board above.

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 12:16:01 pm
content: Quote from: iMo on September 19, 2023, 12:01:06 pmIt does work, doesn't it... I am past that. I've built my first SBC based on 6502 in 2002. I've been sitting on this idea until we finally have a new CPU: RISC-V, and new programming language: MicroPython. The computer would boot to python (changeable) and then the world is going to be like it was 1985. Also, I don't think I have a great idea at all. I just want to pursue it. That's all.

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 12:29:22 pm
content: Quote from: iMo on September 19, 2023, 11:48:03 amMy target is myself so perhaps that's approximately 0.00000001239%... And if it is 0.1% that would be a major successLinks:https://www.worldometers.info/world-population

author: Ian.M
author_rank: Super Contributor
timestamp: September 19, 2023, 01:01:54 pm
content: RISC-V is a fairly modern architecture and your list of peripherals/interfaces is modern, so of course the most cost-effective way to implement your project is as a SOC based SBC. Very few are willing to pay more for less, especially when it lacks retro 'street cred' . . . .DIP package ICs and 0.1" pitch edge connectors or I/O headers are IMHO part of the retro experience.IMHO you should decouple your desire to gain hands-on RISC-V experience from your desire to build a retrocomputing (or retro-styled) platform. Personally I'd get an OEM development board for the former, and for the latter, my wish-list would be a Z84C0020 (20MHz Z80) with a scratch-built MMU offering 1Meg address space, 4K pages, 256 user defined page maps for rapid paging, running CP/M Plus, using a Raspberry Pi for peripheral emulation IPL, and debug support till real retro hardware can be built/interfaced. With hardware to generate a NMI on arbitrary I/O or memory access to specific addresses, and force a page swap to the NMI routine, one could emulate many Z80 based computers of the era.I've also got a soft spot for MC68008 based systems, having spent a decade or so using a Sinclair QL as my primary machine.

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 01:09:53 pm
content: I dig your comment. I really do... But... See enclosed. I also have a big sentiment towards Z80 and MC680xx... But, not this time.

author: Krystone
author_rank: Contributor
timestamp: September 19, 2023, 05:11:43 pm
content: Quote from: Ian.M on September 19, 2023, 01:01:54 pmThis seems to resonate in my mind as I am continuing my quest for the CPU... I might be giving up on this WCH version of RISC-V. Indeed, more powerful and much more widely supported CPUs are out there at this or insignificantly different price point. Thank you for that. This doesn't change my desire to build this computer. I guess I just don't know what CPU / Memory specs it is going to have.

author: Someone
author_rank: Super Contributor
timestamp: September 19, 2023, 09:55:14 pm
content: Quote from: Krystone on September 19, 2023, 12:11:45 pmWell, then I can say the same to you: thinking you can handle n-number of USB ports with n user selected peripherals on a 100MHz microcontroller.... without using linux, is incompatible with the level of experience you have expressed in your posts.Right sizing is important when you are going volume production and saving a few dollars makes $$$$ return. Pointless here. Doesn't matter if the chip has more than you need when it has what you need and is ready to go. Trying to do some custom board and platform is a huge investment (which you have not stated your idea of budget).A community is not going to form around some new arbitrarily intentionally limited platform, there are plenty of competitive platforms already established and you seem be bringing "RISC-V WOOOOO" and thats about it, except others got there first.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 19, 2023, 11:13:56 pm
content: As a thought, to get maximum flexibility while keeping costs low, you could add a low-cost FPGA in your design, to implement specific controllers, display stuff, etc. For this, I think a low-cost FPGA would work out, for instance something in the Lattice ICE40 series - that would merely add a few bucks to the BOM. You'd still keep the MCU to run software and communicate with the FPGA. Certainly that would keeps costs low as opposed to using a single FPGA for both implementing custom controllers and the MCU core, which would require a much beefier, and thus much more expensive FPGA. (To get some perspective, getting anywhere close to the performance of a CH32Vxx at 144Mhz with a soft core on FPGA would require a relatively expensive FPGA.)

author: c64
author_rank: Frequent Contributor
timestamp: September 20, 2023, 02:00:58 am
content: Quote from: Krystone on September 18, 2023, 06:59:55 pmIMHO most owners of retro computers prefer to connect them to a modern TV and pay for composite-to-HDMI converters. I really don't see a point of composite or VGA interface. Among many retro computer related channels on youtube, how many of them use CRT monitors?

author: Krystone
author_rank: Contributor
timestamp: September 20, 2023, 06:57:50 am
content: Quote from: c64 on September 20, 2023, 02:00:58 amYour point it valid. But, I am trying to aim at those who would want to see the picture on the CRT TV at 320x240 or on an old VGA monitor at 640x480. Believe me, but there's a community of people who love RGB/PVM/CRT. This still doesn't prevent anyone of using expensive upscalers or converters to connect to modern TV. I am trying to stay away from HDMI for licensing costs and also for the fact that if I want to connect to 1080p/4K, modern SBCs are already there, and they are still less expensive than whatever it is that I come up with.

author: Krystone
author_rank: Contributor
timestamp: September 20, 2023, 07:07:33 am
content: Quote from: SiliconWizard on September 19, 2023, 11:13:56 pmI was trying to stay away from FPGAs, but I suppose I am going to need one in the design anyway to handle some of the things, even addressing. Indeed, Lattice has some impressive and inexpensive ones. I am not so sure about CH32Vxx at this point though. RISC-V is nice, but I am starting to realize that porting software and finding assembly source code is going to be difficult. It's not like it can be taken from ARM.

author: Krystone
author_rank: Contributor
timestamp: September 20, 2023, 07:46:28 am
content: Quote from: Someone on September 19, 2023, 09:55:14 pmMy level of EE experience is extremely low. This is why I am still typing this, and actively using this forum. This is why I still want to pursue an idea that an experienced user would have long dismissed. The saying is: if someone with experience tells you that something can't be done, give it to someone who knows nothing about it and he'll do it.QuoteBudget isn't important at the moment. I want it to be limited and inexpensive. I will decide later if I can afford to do this. Though, you should probably assume that I might be able to. As stated before, money has little to do with this. Passion does.QuotePoint taken. I will adjust the scope and requirements to make it more likely for a community to form.

author: Krystone
author_rank: Contributor
timestamp: September 20, 2023, 08:52:47 am
content: Quote from: SiliconWizard on September 19, 2023, 11:13:56 pmWhich specific Lattice FPGA (and what footprint) would you recommend for this project (assuming WCH RISC-V 144MHz stays), if I wanted to create Video (RGB666, RGB888), Audio (FPGA-based synthesizer, DAC), and RAM circuitry in it? It needs to be able to handle that 144MHz clock too (I think, I guess, I don't know).

author: tszaboo
author_rank: Super Contributor
timestamp: September 20, 2023, 12:09:11 pm
content: Hi Krystone. IF you want I can help you realize the electronics part of the project. Meaning designing a PCB and electrically testing it, making sure the PCB works. I've offered similar consulting before, and I have lots of experience designing PCBs. Send me a direct message if you are interested, we discuss the details.

author: Krystone
author_rank: Contributor
timestamp: September 20, 2023, 12:30:07 pm
content: Quote from: tszaboo on September 20, 2023, 12:09:11 pmAmazing. This is the kind of help I need. I will continue with my research and once I've finalized the specs, I will reach out to get it all laid out. Thank you!

author: Krystone
author_rank: Contributor
timestamp: September 20, 2023, 12:32:00 pm
content: Continuing my research I found out about this:https://wiki.sipeed.com/hardware/en/maix/m1s/m1s_module.htmlIt's just might be what I want. Who knows. Any opinions, comments? Back to research...

author: ytropek
author_rank: Newbie
timestamp: February 26, 2024, 10:08:00 pm
content: Hi Krystian,I'm late to this thread, but I think it's worth continuing it, hence my message. I completely understand your idea and motivation, and I know also some people (including myself) who thought about similar project. There are so many clones and emulators of C64, NES and other old 8-bit computers, that's building yet another one feels a little bit pointless. But building something using modern technology (RISC-V), however preserving the idea and a simplicity of a retro system is an interesting approach. And also a good opportunity to learn something new (RISC-V).As it's a few months since you created the thread, I am curious whether you managed to make some progress? Have you picked the right platform for the project, started some coding, etc? Would be great to have some update.If you haven't tried already - I'd recommend you to spend some time browsing 6502.org forum. Regardless its name, people talk there about solutions that are not strictly 6502-based and RISC-V is occasionally a topic there. I.e. there is one user who ported his retro-style operating system from 65816 to RISC-V - something that may be of your interest.Cheers and goodluck with your project.