How do you re-create a video console?

Discussion of developmental aspects of the MiSTer Project.
User avatar
drpaneas
Posts: 7
Joined: Thu Aug 12, 2021 5:06 pm
Has thanked: 2 times

How do you re-create a video console?

Unread post 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?
edanuff
Core Developer
Posts: 10
Joined: Wed Jun 30, 2021 4:57 pm
Has thanked: 3 times
Been thanked: 14 times

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

Unread post 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.
Rog
Posts: 23
Joined: Fri Apr 15, 2022 12:30 pm
Has thanked: 14 times
Been thanked: 5 times

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

Unread post 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.
nico24
Core Developer
Posts: 93
Joined: Mon May 25, 2020 12:18 am
Has thanked: 43 times
Been thanked: 83 times

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

Unread post 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....
lu_source
Posts: 29
Joined: Tue May 18, 2021 2:13 pm
Has thanked: 10 times
Been thanked: 7 times

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

Unread post 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
Rog
Posts: 23
Joined: Fri Apr 15, 2022 12:30 pm
Has thanked: 14 times
Been thanked: 5 times

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

Unread post 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.
nico24
Core Developer
Posts: 93
Joined: Mon May 25, 2020 12:18 am
Has thanked: 43 times
Been thanked: 83 times

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

Unread post 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!
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

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

Unread post 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.
birdybro~
Rog
Posts: 23
Joined: Fri Apr 15, 2022 12:30 pm
Has thanked: 14 times
Been thanked: 5 times

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

Unread post 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.
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

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

Unread post 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.
birdybro~
nico24
Core Developer
Posts: 93
Joined: Mon May 25, 2020 12:18 am
Has thanked: 43 times
Been thanked: 83 times

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

Unread post 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!
Rog
Posts: 23
Joined: Fri Apr 15, 2022 12:30 pm
Has thanked: 14 times
Been thanked: 5 times

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

Unread post 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.
nico24
Core Developer
Posts: 93
Joined: Mon May 25, 2020 12:18 am
Has thanked: 43 times
Been thanked: 83 times

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

Unread post by nico24 »

That's awesome. I shall be 'borrowing' that code!
User avatar
Alkadian
Top Contributor
Posts: 721
Joined: Thu May 28, 2020 9:55 am
Has thanked: 289 times
Been thanked: 116 times

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

Unread post 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
Rog
Posts: 23
Joined: Fri Apr 15, 2022 12:30 pm
Has thanked: 14 times
Been thanked: 5 times

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

Unread post 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?
nico24
Core Developer
Posts: 93
Joined: Mon May 25, 2020 12:18 am
Has thanked: 43 times
Been thanked: 83 times

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

Unread post by nico24 »

Just as easy to take the verilog code and just connect it up like that. Not visual, but practically the same.
Rog
Posts: 23
Joined: Fri Apr 15, 2022 12:30 pm
Has thanked: 14 times
Been thanked: 5 times

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

Unread post 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.
Post Reply