HNHacker News
TopNewBestAskShowJobs

pkiller

1,199 karma · joined October 9, 2018

submissionscomments
pkiller··on Show HN: Yet another Homebrew Video Game Console, this time FPGA-based
I got some PCBs made a couple of years ago from JLCPCB and it wasn't that expensive, with shipping, 5 boards of small size (cheapest ones, not suitable for every project) was about €10 or €12. Of course for hobbyists who are going to need several tries it makes it expensive, still it's a lot cheaper than before where I could only get PCBs for a much higher price.
pkiller··on Show HN: Yet another Homebrew Video Game Console, this time FPGA-based
I've been prototyping for some time now and never really focused on getting my projects into PCBs. But yeah I guess you're right I can't really argue with you, I should improve my electronic design skills.
pkiller··on Show HN: Yet another Homebrew Video Game Console, this time FPGA-based
A Mister uses a more powerful FPGA + ARM CPU board along with extra SDRAM (I believe) to simulate known retro systems.

This was a personal project to make a custom video game console in this case using an FPGA, a couple of years back I finished one using microcontrollers and an actual CPU.

This project uses just enough SRAM and external components and a just enough powerful FPGA to be a retro-styled video game console. I wanted to learn how to use FGPAs and continue to learn how video game consoles worked while building something unique.

So in a way, in terms of the technology, they're similar, except of course a Mister is something a lot more useful, I would say, as it simulates "real devices" and has a huge game library and this is just an educational project.

pkiller··on Show HN: A retro video game console I've been working on in my free time
I knew what you meant by "easy" and I agree.

Well, I think it isn't that hard to get an analog video signal going. Having a TV that took an RGB analog signal, meant that I could connect the microcontroller directly to the TV (using resistors to convert the voltage and for the color DAC).

Then all I did was get the timing right, especially with the sync signal. Along with other resources, I used this image ( http://martin.hinner.info/vga/pal_tv_diagram_non_interlace.j... ) to understand when to set the Sync signal to 0 or to 1. When using a microcontroller you can use interrupts or you can have well-timed instructions to set the sync signal on or off at the correct time, I chose the latter. The micros I used are AVR 8-bit architecture based, so most instructions always take 1 cycle, others take from 2 to 4 cycles to execute, simply by looking up in the manual I could calculate when certain instructions would execute and build a program in assembly that would generate the sync signal successfully. And if everything was right, my TV picture would switch to black, meaning it detected a valid PAL signal.

Of course, it wasn't always this easy, for example, I had a bug when I started, I wasn't setting one of the registers correctly and it took me a day to solve it, I had to look at the code over and over until I figured out what was wrong. Not having an oscilloscope nor a logic analyzer certainly made it harder.

Another lucky thing for me, was that the TV I have (an old CRT TV) is actually quite forgiving and even if I don't feed the timings exactly, it will still show a picture, so that helped.

Once I had a valid signal going I tested sending pixels to the screen, and I did use patterns to see if I had the timing right for each pixel, if I took too long switching pixels they would get wide. So I tried some checker patterns and stuff like that, but nothing fancy. I hope this answers your question. It really isn't that difficult to generate a video signal and also I was quite lucky to get it working early on.

I probably didn't do things like they should be done, but it worked for me. I would say that best thing is have a logic analyzer or oscilloscope to check if the signal you're generating corresponds to what it should be, that makes it a lot easier.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Like I've said in a few other comments (I've been trying to answer some of the comments, everyone has been really nice and really interested), one book that got me started was "Make: Electronics", I believe there's a second one now, I really like how the book explains the very basics in a pratical way. Other than that there's a lot of info online nowadays. EEVblog aside from the forums has a nice youtube channel with videos with topics that range from beginner to advanced, GreatScott! is another one that explains things really well. Ben Eater has also a very interesting channel. Also check other people's projects similar to things you would like to make. As for kits, I started with the Arduino starter kit, it comes with a project book and a few varied components, after that I started buying components locally or from major international component shops and going towards the things that interested me the most in electronics. I hope this helps :).
pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks :)

Actually they are still being manufactured to this day, that's one thing I didn't mention in the blog post is that you can get a brand new Zilog Z80 today, the 6502 (the CMOS version, 65C02) is also available. You can probably get them from all the major electronic components stores (Digikey, Mouser, etc).

pkiller··on Show HN: A retro video game console I've been working on in my free time
First of all thanks :) And if you do find some time that project seems really cool, I never really got to work with the STM32 micros, but they are really powerful and cool.

Answering your question, well, even thought this is an electronics engineering project, I don't feel qualified to work with electronics professionally, for example, there's a lot of knowledge I lack. I do work as a software engineer and I have done a couple of interviews myself to hire people and I do believe this helps when applying to a job, I'm not saying it completely replaces your qualifications but it might at least give you an edge. I'm seeing this as someone who would want to hire someone skillful. A technical project certainly is on the very least a nice thing to have in a CV. Of course this is just my opinion. And if you are feeling like applying for a job based on your projects, just give it a go.

One advice I can give is: if you do have projects of your own, big or small, don't do it like me and keep them to yourself for years :P. I really had no idea so many people would appreciate my pet project.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Yeah I did put more memory than the old school consoles had, absolutely, however the RAM in those days was only used for data mostly because they also had the cartridge ROM (or ROMs) to store the code. In my case I need to load the code to RAM, so I would always need a larger RAM.

But yeah, they also had less colors to work with and palettes (which were costier to implement in a software renderer). And this CPU is also faster than of those consoles. I did give myself a more confortable system in terms of RAM and computational power.

But my aim was for a machine that would sit somewhere between the 3rd and 4th generation.

The double buffering I understand as well, if I was working with an FPGA I would not have gone with frame buffers, for sure, but that was the solution I found at the time using the components I was using and it worked.

The attention this has gotten, especially here in HN is still a bit unbelievable to me (and amazing of course). I don't want people to think this is an optimal console design or anything. This is by no means a perfect project or "the way to go" in terms of homebrew video game consoles, it's just the way I found to do one while learning electronics along the way.

And thanks :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
It looks awesome, congrats :)

I'm sorry the hardware and code were stolen.

And of course it's always worth reviewing, I got inspiration out of projects just like that and besides my code is a mess too, don't worry about that.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks for the comment :)

I am proud and honestly reading all these comments of people like you saying awesome stuff and also saying this inspires them makes me even prouder :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thank you :)

I am considering doing a series of blog posts, I don't know how often I could write them or if I could keep them going, but I will try. I'm not big in social media and I have never written any posts or anything like before this one, which is weird, I'll admit it, so all this is kind of new, but I think I'll give it go.

Old systems used line-buffers like the Neo Geo or no buffers like the NES, for example. So yeah, going with a frame-buffered approach was definitely easier, but this was not the only reason I chose this way. I had a lot of restrictions, I was learning a lot of stuff, I didn't know how to work with FPGAs and I stuck with DIP package ICs that I could put on breadboards and experiment. And that's why I picked the AVR microcontrollers, which are awesome but have their disavantages. They have good performance (20Mhz), but not many pins and I had to bit-bang things like external RAM access (actually the PPU accesses 3 RAMs with only 32 IO pins available), which meant that it takes "some time" to access external memory. That's why I chose 2 microcontrollers for video instead of just one, one of them could take "all the time in the world" (one frame) to fetch information and write a frame to the frame buffer while the other would generate the video signal and dump the a frame to the TV. Connecting the two, I felt a double buffer was better.

I definitely would have preferred doing a more "traditional" non-buffered render system, but this was the solution I found with what I had to work with.

I hope serves as a good explanation and maybe I'll get to explain these details better in another post :).

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks :)

I'm gonna try and keep posting.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thank you :)

I would love to learn more and be able to work with faster circuits like you. Yes it's way easier to work with "slow" digital circuits I had very little issues using breadboards and really long wires, that probably look cringy to you and others.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thank you so much :)

I'm actually a bit overwhelmed with all the comments and I'm trying to answer at least a few of them.

Just wanted to say that, even without knowing you, I think you could absolutely be a tinkerer or creator, just choose something you would like to build, start small and go from there. :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
Yes the journey was very important, absolutely.

Also I had set myself a specific set of goals that obviously are not going to make sense to most people and I understand that.

It could seem like a daunting task at first, but breaking it into milestones actually makes it easier and makes the journey a lot better.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thank you, if it's something you like, you should try a hardware project, for sure :)

And yes I am Portuguese, born and raised and I do know what you mean, there are mistakes that are somewhat common for Portuguese speaking English and I do make an effort not to make the same mistakes. However I know my English is far form perfect and it's always easier when it's in written form. I think that the fact that I've always spent too much time watching american/british movies and TV shows made me pay more attention to how English should be spoken :).

But anyway, thank you for saying I speak perfect English, it's actually a great compliment. :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
Wozniak is a legend and this no where near the quality of his work. The way he designed the Apple II was just amazing.

Thanks for the comment :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
(I'm actually secretly a horrible person :P)

Thanks for the comment :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks :)

And yeah you're right...my bad...

(EDIT) It should be a bit better now, thanks for the warning

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks :)

Yeah, I already have another ongoing project based on a cheap FPGA board with a Cyclone II (quite old but it does the job), the idea is to keep it cheaper and much less complex.

The FPGA has a Z80 implementation, video, sound and handle the game controllers. An external Atmega328 is used to handle the SD Card and then just RAM, an ICs for composite video and an op-amp.

I also have some ideas for a better console, maybe a generation forward and an 8-bit computer, but...these are just ideas, I doubt I'll actually get around to do them.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Z80 rules!

Thanks :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
I'm really not that special, don't sell yourself short.

And thanks :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
I thought about it, I really did, however, I really felt I didn't need the extra RAM, especially for the kinds of programs and games I was aiming for.

And in this case "a handful of 74244" is a lot more complexity and it got a to a point where I really wanted to minimize the amount of ICs I used.

Also I was felt bank switching added complexity when developing for it. This way I can write a C program have it access data and I don't have to worry about the code being split in more than one bank or having the data be in a different bank than the code, etc.

It's a nice catch though, thanks for the comment.

pkiller··on Show HN: A retro video game console I've been working on in my free time
Like I wrote in another comment. There's a great book called "Make: Electronics". And you can get started with an Arduino kit, it comes with a book and several components. After this when you feel comfortable, you can move one to more advanced stuff, depending on what you're interested in.

There are plenty of videos online for almost any topic in electronics, and projects online using all kinds of components and for all kinds of purposes.

Check out EEVblog, the forums are good, and there are some videos for beginners and also the Youtube channel GreatScott!.

And thanks :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks a lot :).

A kit for this console would be crazy though, too many components, too much complexity. But for a smaller version, it could be done.

Branding...yeah, I could never get a name for it, til this day I don't know what to call it, I'm terrible with names. Maybe I'll take your suggestion :).

pkiller··on Show HN: A retro video game console I've been working on in my free time
I agree (and thanks for calling me a smart individual :) )

Nowadays is so much easier to get information on how to build something apparently very complex. You don't need to go to a library or seek out and go talk to experts, you actually have access to all that through the internet in forums, articles, posts and videos.

Also it's easy nowadays to order all the things you need for a project online.

Thanks :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks :) (I don't mind people saying it over and over again, believe me :P)

I actually started building a much smaller video game console with a cheap Cyclone II FPGA board (a friend of mine wanted one and I tried to figure it out how I could make something smaller and cheaper but still retro and cool) and I'm using VHDL, it's not exactly easy to learn but it's pretty cool, and I find it really hard to find good resources to learn from.

If I was to start all over again, I would use an FPGA for the graphics, for sure, at the time I just didn't know how.

And thanks again for the comment :)

pkiller··on Show HN: A retro video game console I've been working on in my free time
I totally agree. The reason I stuck to DIP ICs was because I could fit them into breadboards and I thought that was easier than any alternative. I was incredibly lucky on how all the breadboards were functional. And there were a few times where I would accidentally disconnect a wire and spend the next 2 hours trying to figure out what was wrong. All this without having a logic analyser and not even an oscilloscope until much later in the build (they are not that cheap). And yes the project sure is complex, too complex, but I guess I was lucky, and I'm glad it's working :).
pkiller··on Show HN: A retro video game console I've been working on in my free time
Obrigado :)
pkiller··on Show HN: A retro video game console I've been working on in my free time
Thanks :)

I've kept this project to myself and would only describe it occasionally to some coworkers and friends. I never thought that many people would find it cool. And always thought that people with more knowledge than me would find a lot of flaws. So it's really awesome to read yours and all the other comments. :)

I don't think I could write a book, but I have though in writing other posts, giving more detail in certain aspects of the console. There's really a lot I could say about it and I only realised how much there was to say when I started writing this.

Page 1 of 2Next →