Felt like posting this, although I don't have anything I can actually show right now...
A week and a half ago I asked some friends of mine if they wanted to have a Gameboy emulator writing competion. At first it was actually just me and Lordus, author of jEnesisDS (Genesis emulator for Nintendo DS), but then DS scene programmer sgstair and another friend of mine joined up. sgstair was pretty confident he could get it done in 2 days so the tension was turned up about 20 notches and I was intent on giving it everything I got.
The competition started at 2:00 PM EST Sunday June 2, and the goal was to get the following five games working:
Super Mario Land
Super Mario Land 2
Kirby's Dreamland
Legend of Zelda: Link's Awakening
Tetris
For the first three games you had to be able to clear the first level, for Zelda you had to get the sword, and for Tetris you had to clear one of the "B" levels.
The sound and battery back up was supposed to work (although really with the goals listed the latter wasn't really pertinent to accomplishing them)... The sound was supposed to be "perfect." This was what ended up screwing us all over.
This is roughly how it turned out...
Me: Had the CPU/timer/div/IRQ emulation written in about 5 hours, then got rudimentary BG rendering written and spent the next 6-7 hours debugging it (using BGB to help follow along). Got first screenshot from Tetris around 13 hours in (title screen only), and had in-game some minutes later. Then spent the next 5 or so hours debugging the 5 games until they all worked correctly, so had things working at about 18 hours. Was slowing down a lot at this point; had to implement sound now (but was really tired). I figured this would just be busy work since I already emulated this for my GBA emulator. I ended up getting the first three channels done (no sweep), but for reasons that I haven't really determined it just sounded buggy. I pretty much stopped here, calling the emulator "close enough" and went to sleep (more on what I did with this later).
sgstair: Got results in the first day as well, but trailed behind my by some hours, then went to sleep. After he woke up he started doing sound and got it working for the first two channels, and it sounded more correct than my implementation (but still not perfect, and some games lacked it entirely, probably because of missing timer IRQs). Since we were roughly at about the same point and didn't feel like grinding to get the sound perfect we agreed upon a tie.
Lordus: Could only work five hours before sleeping the first day (time zone differences), after coming back the second day I believe he got some results in games. Generally had less time to work on it, but by now he does have things working in the games and sound is half done, but with some glitches.
I'm not totally sure where my other friend is, but since this is his first emulator it's more of a learning experience for him.
Anyway, I poked at my source after agreeing on the tie, but eventually decided I didn't feel like fixing the sound code so I just ripped it straight out of gpSP (my GBA emulator) and it took like an hour to fully transition and for the most part it sounded great. I did find a few bugs, some core related, some sound related, so it wasn't a total loss since it gave me an opportunity to fix some audio bugs in gpSP. I also dove into some other games and fixed CPU bugs, added battery back up, more hardware support, etc. I beat SML1 and Kirby's Dreamland in it, made it most of the way through Zelda (but I lost my playthrough of dungeon 7 because of a power outage), made it halfway through Final Fantasy Adventure before realizing that I didn't mark the hardware type as being battery backed and lost everything, and made it to the top of level 3 in Castlevania Adventure when my emulator crashed. Not trying that one again w/o savestates, but I probably fixed it by now.
EDIT: Some screenshots: