Page 1 of 1

How do you re-create a video console?

Posted: Thu Aug 12, 2021 6:51 pm
by drpaneas
Hello everyone,

It's been a few couple of days since I learned about the MiSter Project and FPGA in general. I am "googling" non-stop to find more information about how one can 'master' this and be able to develop their own FPGA implementations of game console hardware, such as SNES. However, I've noticed that there is scarcity of available and useful resources compared to e.g. tutorials related to software emulation, so I finally decided to ask here in case someone can shed some light in my research.

I understand that FPGA is re-programmable platform, where you can program a chip to do whatever you want. In case of re-creating a video game console, e.g. SNES. To do that, one should know how SNES works under the hood, all the bits and bytes, what "chips" is consisted of, which CPU, which PPU, how memory works, etc. Once you think you know all these then you can re-create them in FPGA. Is that right?

What do have to do to learn that? Do you have to write a game in their assembly? Do you have to write a software emulator to make yourself familiar with the op-codes? How do you make yourself familiar with the game console hardware in such a level you feel that you know it so well that you can re-create it? I guess one should own the original hardware (e.g. an physical SNES console), right? Ok, I do own a SNES. What's next? Am I supposed to disassemble it and ... measure volts in random places? I guess I need hardware reverse engineering skills to do that. Right? If so, how one can obtain those?

In terms of software emulation, I had to google for the internal information (written by somebody else, or a group of experts who devoted 100++ hours), then find the datasheet and start writing the code. Since FPGA is re-create the process, how can I learn the "process" ?

Did I confuse you? tldr; my questions is basically how can one re-create A to B, if you don't know how A works? Probably the answer here is that you have to find out out how A works. And then the question is how you do it alone without looking for jargons written by others?

Re: How do you re-create a video console?

Posted: Thu Aug 12, 2021 9:51 pm
by edanuff
If you're just starting out, Designing Video Game Hardware in Verilog is not a bad place to start. It will still be a bit of a way from there to developing a recreation of an existing system but you're going to need to at least know most of the concepts in there before you can really make much progress.

Re: How do you re-create a video console?

Posted: Fri Apr 15, 2022 4:27 pm
by Rog
edanuff wrote: Thu Aug 12, 2021 9:51 pm If you're just starting out, Designing Video Game Hardware in Verilog is not a bad place to start. It will still be a bit of a way from there to developing a recreation of an existing system but you're going to need to at least know most of the concepts in there before you can really make much progress.
I have this book, although I have yet to work through it; I see that there is Template_MiSTer on github: might I ask, is it reasonable to expect that one could use this book and that core as a starting point, or is it best to go through the book with the Web resources, and worry about putting on an FPGA later? I want to be able to show the wife something like my own pong game running on the telly, and she *will* be impressed ;-)

I am a total noob, so feel free to talk to me like I am a five year old.

Thanks.

Re: How do you re-create a video console?

Posted: Fri Apr 22, 2022 10:10 pm
by nico24
One point with the book cited is that, as you mentioned, it is designed to be used with the online IDE. It's a bit quirky compared to writing for an actual FPGA. Still very useful though. He makes some leaps that I personally found a little difficult to understand.
Of course, I would shamelessly plug the MiSTer Retro Wolf channel on Youtube, since I'm the author of those....

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 1:30 am
by lu_source
You will want to check out Mr Retro Wolf's YouTube videos. He has a tutorial series that teaches you how to create an arcade core.

https://www.youtube.com/channel/UCyyulM ... LiyJw3GMSg

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 10:41 am
by Rog
nico24 wrote: Fri Apr 22, 2022 10:10 pm One point with the book cited is that, as you mentioned, it is designed to be used with the online IDE. It's a bit quirky compared to writing for an actual FPGA. Still very useful though. He makes some leaps that I personally found a little difficult to understand.
Of course, I would shamelessly plug the MiSTer Retro Wolf channel on Youtube, since I'm the author of those....
I will certainly check out your channel, it looks like exactly the sort of thing I was asking about, thank you for your efforts!

You mention that the 8bitworkshop might be a quirky way to learn, and I do take that on board, so I ask: can you recommend a beginner level book on verilog as a good place to start?

I guess that book had a solid goal of producing some basic games, as opposed to a series of more abstract things to learn, and that did appeal to me - but seeing it work in hardware is the end goal.

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 5:08 pm
by nico24
Rog my first video has a bunch of resources including books. I would definitely persevere with the 8bitworkshop book because, as you say, it is tailored specifically for video games. I go back to it all the time!

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 6:34 pm
by aberu
It sounds like you want the basics of digital logic, and then the basics of FPGA design in that order.

https://www.nandland.com/ - Nandland is an excellent source for starting with the basics. I'm still learning and I've used his site a ton, and I have his little Go Board and have done a few tutorials already. Keeps things simple.

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 6:50 pm
by Rog
So I have my 8bitworkshop book, nico's videos, and nandland. I am sure this will keep me busy.

I suffer from the affliction of wanting to do interesting things that are well outside of my capabilities but also being very easily distracted, it is a bit of a failing let me tell you!

Aside from being able to do some basic "bronze age" type games, I would like to get to the level where I can 'plug together' other people's IP cores, to gain a better understanding of it all.

FPGAs are very cool, that much I know - and the fact that one can get them almost for "beer money" makes them even more interesting to me.

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 7:25 pm
by aberu
Rog wrote: Sat Apr 23, 2022 6:50 pm I suffer from the affliction of wanting to do interesting things that are well outside of my capabilities but also being very easily distracted, it is a bit of a failing let me tell you!
This is basically me, so don't worry, you'll get there. I'm still very new, but I'm learning.

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 10:02 pm
by nico24
One thing I would say, my problem was, looking a bit and then trying to look at something else, or thinking some different hardware would allow me to 'get it'. In the end the only thing that let me get it was building it on a breadboard first and then doing it in Verilog. That's why I'm trying to shorten that learning curve in my videos. I think you can quickly get to the point where you don't need the breadboard, but at the end of the day it's called a Hardware Description Language. If you don't understand the hardware you can't describe it!

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 10:15 pm
by Rog
nico24 wrote: Sat Apr 23, 2022 10:02 pm One thing I would say, my problem was, looking a bit and then trying to look at something else, or thinking some different hardware would allow me to 'get it'. In the end the only thing that let me get it was building it on a breadboard first and then doing it in Verilog. That's why I'm trying to shorten that learning curve in my videos. I think you can quickly get to the point where you don't need the breadboard, but at the end of the day it's called a Hardware Description Language. If you don't understand the hardware you can't describe it!
Fwiw I had a short play with this previously https://github.com/TimRudy/ice-chips-verilog
But I realise it's not the same.

Re: How do you re-create a video console?

Posted: Sat Apr 23, 2022 11:52 pm
by nico24
That's awesome. I shall be 'borrowing' that code!

Re: How do you re-create a video console?

Posted: Sun Apr 24, 2022 8:16 am
by Alkadian
Rog wrote: Sat Apr 23, 2022 10:15 pm
nico24 wrote: Sat Apr 23, 2022 10:02 pm One thing I would say, my problem was, looking a bit and then trying to look at something else, or thinking some different hardware would allow me to 'get it'. In the end the only thing that let me get it was building it on a breadboard first and then doing it in Verilog. That's why I'm trying to shorten that learning curve in my videos. I think you can quickly get to the point where you don't need the breadboard, but at the end of the day it's called a Hardware Description Language. If you don't understand the hardware you can't describe it!
Fwiw I had a short play with this previously https://github.com/TimRudy/ice-chips-verilog
But I realise it's not the same.
Thanks for sharing this! It looks great.

I would recommend this book:

https://www.amazon.co.uk/Verilog-Exam ... 71&sr=8-3

It's very basic but it helped me a lot at the beginning.

Like you and others I suffer from the same affliction! :D

Re: How do you re-create a video console?

Posted: Sun Apr 24, 2022 3:22 pm
by Rog
nico24 wrote: Sat Apr 23, 2022 11:52 pm That's awesome. I shall be 'borrowing' that code!
I bet someone could modify IceStudio to work with the Quartus command-line, and add in the De-10 as a target option. Am only spit balling... But if it meant that people could easily get "virtual hands on" experience of 74series logic, maybe it would be a good educational tool?

Re: How do you re-create a video console?

Posted: Sun Apr 24, 2022 7:01 pm
by nico24
Just as easy to take the verilog code and just connect it up like that. Not visual, but practically the same.

Re: How do you re-create a video console?

Posted: Sun Apr 24, 2022 10:25 pm
by Rog
nico24 wrote: Sun Apr 24, 2022 7:01 pm Just as easy to take the verilog code and just connect it up like that. Not visual, but practically the same.
I was just trying to imagine a sort of interim step in learning going on what you said about breadboarding :-) this was me trying to be helpful, in my own way, knowing I know nothing...

Those discreet component CPUs linked to on the page do seem interesting to me though, I am always amazed by what talented engineers of today, or yesteryear, come up with.