Learning Principles of Hardware

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Learning Principles of Hardware
by on (#88492)
I know my software side of computer engineering pretty well - but what about the hardware side?

Like, for instance, what sort of knowledge allows kevtris to build an FPGA NES? Or allows someone to figure out how to design a modchip?

I don't even know what I don't know, and I don't know how to start knowing.

Does anyone know any good books, web sites, or other resources?

by on (#88496)
It's going to be tough... Unless you're highly self motivated it's going to be pretty hard to get to that level without using an electrical engineering degree to get there. You might be able to get a good starting point by snooping around the class and lab websites for a university with a good EE/CE program. Here's the one for my school: http://eecs.oregonstate.edu/education/courses/ There are links to the lab pages along with the lab manuals. Might not be the best place to start but it's something.

Don't get me wrong, I bet it can be done. But a challenge at best. My advice would be to find project to work on with digital logic. Find a good computer architecture book and learn it, and work through the exercises. I've rarely learned much from reading books but I do have a copy of one I can email if you PM me that's decent. It's written by an instructor of mine and is actually based on the Atmega128 architecture.

If you can get some basic things down you can start playing around with a CPLD/FPGA development board and some related projects. At least for me I have a hard time learning things unless I work on a project and have to learn something and apply it to overcome the hurdle. You can read page after page, but until you try and apply the knowledge and solidify it you're not likely to get anywhere.

by on (#88504)
Start here: http://www.play-hookey.com/digital/
Re: Learning Principles of Hardware
by on (#88690)
adam_smasher wrote:
I know my software side of computer engineering pretty well - but what about the hardware side?

Like, for instance, what sort of knowledge allows kevtris to build an FPGA NES? Or allows someone to figure out how to design a modchip?

I don't even know what I don't know, and I don't know how to start knowing.

Does anyone know any good books, web sites, or other resources?



I dunno, it didn't seem too difficult- it just takes a long time.

I learned most of the basics before the internet existed in its current form; I had to learn from what few books I could find, and magazines.

Today the magazines are all gone (except elektor, bleh. I guess it might be OK for beginners/intermediates) and books are an endangered species. Fortunately, the internet comes to the rescue, and if I need to learn anything new I just fire up google and search for it.

The other day I had to learn something about infinite impulse response filters... so I googledit and sure enough, I learned enough to do what I wanted to do (SNES sample processing, actually).

Unfortunately I don't know much about what kind of resources are available these days for learning, but my process for making something like an FPGA NES is to start small and work up.

I started with the 6502, made it run some code (by watching the address/data lines and internal registers on signaltap, the FPGA software's built in logic analyzer that lets you see what's going on inside).

After the code ran more or less correctly (that was why I wrote nestest.nes, incidentally), I added 1 audio channel and got it playing an NSF or three, which I hard-coded at first. After awhile, I got all the sound channels working.

Then I made a PPU that didn't do much; it just showed the tiles on the screen in black and white (no palette, no sprites, no scrolling, no attributes). After that, I just added one piece at a time until it was working approximately correctly.

Finally, the two were married in an unholy digital matrimony, and I had to find some small demos to run that'd fit in the FPGA's block RAM, so I could test it all.

After that I read up a bunch on SDRAM and got it working good enough to store just program ROM (no CHR at that point). So I could finally play games with more than 8K of PRG ROM (I was stuck with 8K of CHR RAM at this point). That let me debug a mapper or two and get a few games running, like megaman 2 and fantastic adventures of dizzy.

Finally, the SDRAM was dual ported after learning more about SDRAMs and stuff by making a small state machine to multiplex address reading, and then I could run games with CHR ROM and PRG ROM.

So it just progressed via very small steps (there could be hundreds or thousands of these small steps in a project of this size) until it gets done.

The important thing is to not make the steps too big, or else you'll get discouraged and give up all too early.

If you were to write a 6502 for the first time, the steps might be very small- getting the program counter to count. adding 1 register (i.e. accumulator). then adding an instruction decoder that can run 1 instruction (jmp maybe), and so on.