Gameboy 98
----------

Usage
-----
Cursor keys for directions, Z/X for buttons A/B and the Enter key for Start and Space bar for select.

Legal Stuff
-----------

 This is a Nintendo Gameboy emulator. This software is in no way endorsed by Nintendo, or even if they knew about it would be endorsed by them.

About this program
------------------
 I started writing a Gameboy emulator many years ago, although at that time, I never got very far with it. During the first few weeks of October 1998, I found various docs on the gameboy on the net, and so resurrected this project. Well actually I started from scratch again. Mainly it was just a small project to exercise my programming knowledge, and in that it's succeeded. The whole program is written using Win32, no MFC, DirectX, or any other APIs. Not that it's a major achievement, it was just something to do. Now I get a chance to share the program with the rest of the world.
 It isn't a full emulation of the gameboy, nor wholly accurate. In time though, I hope it will get better. I intend to take suggestions to improve the emulation and the user interface.

Instructions
------------
 As of this first release, use the cursor keys for movement, RETURN is the start button, SPACE is select, and X,Z are buttons A,B. Menu options should be self explanatory, ROM files should be contained in the same directory as the executeable program.

Technical
---------
 What is emulated is the gameboy processor, the screen, Vertical Blanking interrupt, DMA, and the LYC interrupt.
 What is not emulated is the Timer/Counter, sound pitch and volume shift, game saves, serial transfer.

Future Enhancements
-------------------
Faster, faster, faster and faster....
Better Sound Emulation
Sound Setup Dialog
LCD Setup dialog (+option for emulating LCD ghosting)
More complete Z80 Emulation.
Debugger.
Tidier MBC1,MBC2,MBC3 emulation.
Game Genie codes/codefinder.
SGB Emulation.
Modem/Internet Play.

Stuff Done
----------
Sound - As of V0.04, I now use Direct Sound.

Sound - As of V0.02, sound is in and hardwired to mono 22khz replay speed. I've found out after testing it doesn't work on all systems. I will fix this.

Ability to specify image to load upon execution (For use in say a development environment for testing code). Now you can specify on the command line the path and name of the image to load. Or you can set the file association in explorer.

What's New
----------
V0.04 BETA 1s
 Playing around with the sound system to make it work properly.
V0.04 BETA 1
 Totally rewrote the sound system, now uses direct sound for sound output. This should sort out ALL the sound crashes and messages people were getting with sound initialization. The old Win32 Multimedia API just ain't capable of doing what I need it to do. Oh, took out the sound options dialog and menu option again.

V0.032
 Redid sound initialization to fix NT crash on ALSound system.

V0.031
 Put in the sound options dialog and menu option.

V0.03
 Better sound initialization. Now asks the soundcard what it can do, and chooses what best fits. Drag & Drop Support, you can drag files onto the emulator window and it will attempt to run them. 

V0.02
 Bugfixes, and slightly faster emulation. Sound if you're lucky. Full MBC1 emulation, partial MBC2,MBC3 emulation. Save games don't work fully.


 Erm, as of this release V0.01, everything you see.

History
-------
11th November 1998 - During the last few days, I rewrote the LCD handling which was a minor speed improvement (10-15%). Also tried fixing the sound system. Well, I ended up deleting just about all of the old sound system and rewriting it to use DirectSound. This was my first ever DirectSound experience, and I can see why Microsoft did things the way they did, but I hate it. It's far too slow and clunky, but then they wrote windows so what should I expect. Anyway, it's done now, and I'm pretty sure it works for 99% of machines out there unless I missed something?!!! ;-) Over the next few days, I'm going to be improving the sound emulation to the point of perfection I hope. Then I'm gonna work on some of the things that stop the emulator working for some games.

4th November 1998 - V0.03 More preparation for the new assembler Z80 emulation engine going in. Currently everything is in C, so this should speed up emulation by about 20%. After that is in, I'll work on speeding up the LCD refresh, and fixing some window/sprite priority bugs. The new Z80 engine will hopefully cover all opcodes more accurately than my C implementation. The C implementation was hand coded, the assembler is generated. Drag & Drop Support. Should now handle file associations too.

3rd November 1998 - Sped up the LCD redraw functions. Rewrote a lot of the Z80 emulation code as I'm going to move that to assembler, along with a few other time critical functions, such as LCD refresh. More work on the sound, I'm not emulating sound envelopes yet, when I do the sound will be pretty much perfect. The noise channel isn't switched on at all, as I'm not emulating the polynomial noise function yet so it sounds like poo (When it is on). Frequencies should all be spot on, the Pan/Koopa doc says freq = 133333/(2048-xx). This is wrong, but only by a small amount, I could hear the difference in some notes.

25th October 1998 - A lot more ROMs are runnable, I've got Memory emulation down and some sound (the noise channel not currently included). I had bugs in the entire SBC opcodes, which now are working, although it seems I have bugs in some other opcodes though. Most though should work perfectly.

13th October 1998 - Most everything to make some games playable within the emulator, also the load ROM dialog.

Disclaimer
----------
 This software is in no way commercial grade software. Not guarantee is implied in any way. It is also in development, so running it means anything can happen.

Contact Information
-------------------
 I can be reached at adam@programmer.net, if for any reason you need to. I shall be updating this program over time, so if there's something obvious it's probably in the works. If you have particular problems with a specific image, then please feel free to contact me (especially if you know what is exactly wrong).