FPGABoy videos (finally!)

March 23rd, 2011

Wow it has been about a year and a half since I last posted on this blog… And I have been promising videos in every one of my posts… Well, needless to say I have been extremely busy, but a promise is a promise, and it has been WAY too long!

Here are a couple videos I took the other day:

Hope these are enough for now… As you can hear, the sound channels are incomplete (wave and noise still missing) and the envelope on the square wave channels has a small persistence length bug. These should be quickly fixed. The project is not dead. I am sorry if I have not gotten back to your e-mails. I will try to get to responding to them. I am going to try to find time on weekends to put into the project. I have some cool ideas for a custom PCB version. Hopefully I will be better about updating this blog! :)

Whoa… the spam :(

September 7th, 2010

Hey everyone!

I officially suck at blogs. I was extremely busy over the summer, and did not give any attention to this website or the FPGABoy project. Spammers seem to have taken over, and I just deleted 630 (!) spam comments. I installed some extra spam protection, so hopefully that should help weed more of it out automatically in the future. I am now working on some DSi hardware hacking in my spare time before I start grad school. I do plan on getting back to FPGABoy, and I recently had some pretty cool ideas for custom PCB with custom enclosure that might be interesting to you guys. I will get the system booting up on the old Altera DE2 dev board later this week and try to get some screenshots. I know some of you have been waiting ages for the screenshots, and I’m really sorry that I have not gotten around to taking them yet. :(

As for those asking about open source: The answer is maybe, but not yet. I am not at the point with the code base where I am satisfied with releasing it as an open source project, and it’s still kind of a personal project for me. I don’t feel ready to have a bunch of other people contributing directly to the VHDL just yet!

Until next time…
Costis

Site back up

January 8th, 2010

I guess I haven’t posted since last year, so happy new year everyone! There was a major power outage where the server is located yesterday so the site was down for a few hours. Everything seems to be back up and running smoothly now, though. I’ve implemented PS/2 keyboard support in FPGABoy since my last post, so now either a standard PS/2 keyboard or a GameCube controller can be used. NES\SNES controller support will be added soon. I  also fixed my DAA instruction implementation on my GBZ80 CPU core and now it passes all of blargg’s GBZ80  CPU tests 100%. I’m trying to find one nasty bug in the graphics core and once I do and it has been fixed I will post back with screenshots and hopefully a video. :)

Cheap LCD displays?

December 10th, 2009

I was just wondering if anyone knows of any cheap color LCD’s which have a resolution of at least 160×144 pixels and can do at least 16-bit color. It would be nice if the aspect ratio is close 160:144 (which is almost square.) I found some LCD with touch screen over at rftechworld.com but it’s 240×320 pixels and comes with an extra touch screen which I wouldn’t need. It also costs around $14, and I was hoping to be able to find something useful for cheaper! :)

P.S.: Is there even any interest for FPGABoy to have an LCD? I know one or two people have said it would be cool. Perhaps it can be an “optional” add-on, with VGA or NTSC as the alternatives. I have a few pretty neat ideas which will make FPGABoy much more than a boring Gameboy clone, but will wait until they are at least partially implemented until I rant about them. Hehehehe. :)

Site landed on suspicious IP?

December 5th, 2009

Been a while since my last post, but someone pointed out and I also noticed on my own that it seems like the current IP  address of this site seems to have been used in the past for suspicious activities (spam, piracy, … I don’t know exactly what?) I  talked about it with my admin and he submitted the IP to be cleared from blacklists now that we have control of it and it’s not being used for anything illegal. However, it does not seem to have changed anything? (at least Check Point still tells me the site is “suspicious.”) Does anyone else still see this?

Now that I think of it, it might just be that the domain name is rather new and Check Point ZoneAlarm just likes to complain. Regardless, this site runs on a vanilla WordPress and there is nothing (as far as I know!) suspicious about it or its content. I don’t even have ads.

Website Outage

October 21st, 2009

The server went down for a day or two so the site was down. Everything should hopefully be up and running as before again. Apologies for any inconvenience that this outage may have caused!

Haven’t had much time to work on FPGABoy specifically yet, but I added preliminary Gameboy Color emulation support to my software GB emulator (which I work on in parallel to FPGABoy so I can debug certain things) to see how involved it would be. Turns out that it was rather straightforward so it may not be that tough to implement GBC support on the actual FPGABoy itself! :)

Gameboy Color Boot ROM Dumped After 10 Years!

September 28th, 2009

Hey everyone! The Gameboy Color was first introduced to the market in 1998, and since then its internal startup boot ROM had not been dumped. Well, I finally got my VDD and clock glitching tricks to deceive the Gameboy Color (GBC) into sharing its boot ROM with me! For those of you who don’t know, the GBC’s boot ROM is what is responsible for initializing the hardware and showing the “GAMEBOY” introductory animation. Read all about the details of how I dumped the ROM as well as download it for yourself (with an almost complete disassembly by Duo) here! (Or just click on the GBC Boot ROM link on the right.)

Also, for those of you who did not read about it, I was also able to read out the Super Gameboy’s boot ROM about a week ago. You can read all about that (as well as grab the download) here. (Or as before, just click the SGB Boot ROM link on the right.)

Thanks for the support from the GB development community (#gbdev, EFNet).

Oh, and while you’re here, don’t forget to read about FPGABoy (what this blog is really about) in the post below.

As usual, feel free to post any comments here or e-mail me at costisNOSPAM@fpgb.org (remove the NOSPAM before mailing.)

Welcome to the wonderful world of FPGABoy! (yes…it’s back!)

September 25th, 2009

Hey guys! It’s been a loooong, looooong time, but FPGABoy is finally back! Yes, the project is not dead…and yes I know the original website has been down for almost 6 years now. :( Well, my life got really busy (and well that hasn’t changed), but I have decided that I think FPGABoy is a pretty cool little project and I don’t want it to remain gathering dust on an old hard drive for the rest of eternity. In fact, I did a major overhaul of the FPGABoy codebase a few months ago and rewrote the whole CPU core as well as most of the video logic. It is now capable of running most original GB mono games flawlessly (although sound channels 3 and 4 are still missing.)

Since many of you may be completely new to this website and this project, I will quickly explain what FPGABoy is.  Nintendo released their first handheld, the Dot Matrix Gameboy in 1988. It almost instantly became extremely popular and marked the beginning of what is now perhaps Nintendo’s most lucrative market (continuing on with the Gameboy Color, the Gameboy Advance, the Nintendo DS, and now the Nintendo DSi.) The Gameboy was the first handheld that I ever owned, and I always wondered what made it tick. I eventually discovered the homebrew development community and bought myself a flash cartridge which I used to learn the GBZ80 instruction set and to make a few little test programs which are still gathering dust on an old HDD somewhere. Fast forward years later to when FPGAs started becoming really popular (or more accurately to when I first discovered FPGAs and all the cool things that could be done with them.) I got my first FPGA development board (which happened to sport a Xilinx Spartan IIE 300K FPGA on it) and after spending a while teaching myself VHDL (yes, VHDL, not Verilog… unlike the majority I prefer VHDL :) ), I got the idea to try implementing as much of the original Gameboy hardware as I could in VHDL. The goal was to be able to eventually plug in original game cartridges to my clone system and see them playing on (what soon came to be called) FPGABoy instead of a real Gameboy.

I started with implementing the custom Gameboy CPU in VHDL, which is very similar to the 8-bit Z80 but with distinct differences. I was going off of some really old homebrew specs and documention as well as some open source software emulators. After a while and several rewrites, I got it to a point where it seemed to be executing most instructions correctly and with perfect cycle accuracy. I quickly hacked up a cartridge interface (I’ll post up the old photos if I can still find them) and implemented sound channels 1 and 2 (frequency synthesizer chans) and to my amazement after fixing a bunch of bugs I was able to get some music out of a Gameboy sound player demo program! I then managed to implement some rudimentary video hardware and was able to get a few games such as Zelda and Tetris booting up and displaying graphics. The video output was to a VGA monitor using a not-so-great resistor DAC that I built and the sound output was using an even worse quality 9-bit R2R DAC which was also hand built with discrete thruhole resistors. I used a GameCube controller for key input. Things were looking great, when… real life did not give me much free time to spend on continuing the project. I also became much more interested in various other hobby projects reverse engineering GameCube hardware, among other things), so FPGABoy was left doomed to grow old and stale on the backburner.

Fastforward once again to a few months ago… and you will reach the point where I picked up the project again! I was taking an digital logic project class (EE119C) at Caltech and had to choose an FPGA related project to work on for the term. Naturally, FPGABoy came to mind as it was never completed, so I picked it up once again. I opened up my old VHDL files for the first time in *years* and was amazed at how poorly written my code looked back then. I could barely even understand some of the things I was doing in some of the parts! Further, after finding numerous bugs in what I thought was a “bug-free” CPU core, I decided to scrap the CPU core VHDL and start anew. I ended up completely rewriting and debugging the GBZ80 CPU core as well as the video logic. I also managed to add support for sprites. In fact, most of the video logic has been completed now! (There are only a few timing bugs which remain to be found and squashed.) The project has also migrated from the ancient Spartan IIE to the Altera Cyclone II. I was using a Terasic DE2 board during EE119C for developing and testing the project, but I have plans to make a custom PCB for it and may perhaps even make a run of a bunch of them for people if there is enough interest.

The system still outputs as standard 640×480 VGA and uses a GameCube controller as input. I am thinking of switching to using a PS/2 port so a PC keyboard can be used instead… any input on this? Perhaps the GC controller is more suitable for playing video games. :) The sound output is much crisper now since I am using a sigma delta converter on the FPGA to output a 1-bit digital signal which is simply low pass filtered and fed to a speaker. In fact, it sounds great without any sort of filter, since the speaker itself has a lowpass response. Also, the original GB had 5V TTL signaling, whereas the Cyclone II (and any modern FPGAs) only support 3.3V CMOS and below. Thus I completely did away with the cartridge slot and am now using a big SDRAM to hold the ROM data. MBC1 has been completely implemented in VHDL and is running alongside FPGABoy, making the SDRAM controller and MBC1 appear as a normal cartridge to the system. I can load any sort of ROM image from my computer to FPGABoy (currently through a serial port, but soon through USB) and make it run! I have implemented a pretty simplistic hardware debugger, which allows pausing the system, reseting it, reading an writing to any region of the FPGABoy memory map as well as the virtual ROM, and simplistic breakpoints. I don’t have them available right now, but very soon I will post photos of the
system running (maybe even a video?) various original GB classics.

And finally… would any of you guys be interested in owning an FPGABoy for yourself if I made a cool little PCB for it? If there is enough interest in the project, I will complete the sound hardware, fix the video timing issues remaining, and maybe even add Gameboy Color support! I know that the Gameboy is over 20 years old and is rather vintage… but I was surprised when I saw that there seem to be a good number of people still interested in this thing. :)

…Wheew that was a long post!

Costis Sideris