

                   ******* Virtual GameBoy *******
                The Portable Nintendo GameBoy Emulator
                             version 0.2

                         by Marat Fayzullin
                      
                       email: fms@wam.umd.edu
                            IRC:  RST38h
               WWW:  http://www.cs.umd.edu/users/fms/

                             Amiga version by
                      Matthias Bethke & Michael Boese
                   http://wwwstud.uni-giessen.de/~s1089/

******* original documentation for the X11 version *******


* INTRODUCTION *

  This package includes C sources for a portable GameBoy emulator,
and screen/joystick drivers for Unix/X. Virtual GameBoy has been
tested on following Unix systems:

  SunOS   Solaris   OSF/1   FreeBSD   HP/UX   AIX 3.2.5

  Note that this is only a second release of VGB and many things
do not quite work yet. They will be fixed/implemented in the next
releases of the emulator. Following games were checked and worked
with this version of VGB: 

  Minesweeper   Hong Kong              Tennis
  Bombliss      Addams Family 2        Tetris
  Asteroids     Donkey Kong Land       Obelix
  Centipede     Monster Truck Wars
  Motocross     Missile Command
  Twinbee       Riddick Bowe Boxing
  Kwirk         Kirby's Dream Land 2
  Alien 3       Rescue of Blobette

Following games didn't work: 

  Super Racing Pro Am  - Hangs
  Kung-Fu Master       - Dies after encountering STOP instruction
                         meaning of which is not known yet

  If you would like to write new drivers, *please*, contact me by
email or some other means. Feel free to look at existing drivers
as well as at other code. More explanations follow.



* NEW IN THIS VERSION *

o Cartridges with battery-backed RAM are now recognized and the RAM is 
  saved into files with .SAV extension. 
o Colors can now be set from command line. 
o A GameGenie-compatible cheat option is implemented but doesn't work
  yet. 
o Screen refresh routines are fixed. 
o Line interrupts work correctly now. 
o Default stack is moved to F000h. 
o When LCD controller is stopped, VBlank and LCD special interrupts 
  are not generated. 
o Both Debug() function and disassembler are majorly cleaned up. 



* FREQUENTLY ASKED QUESTIONS *

1. What is GameBoy?
  GameBoy is a handheld videogame machine produced by Nintendo. It is 
built around a custom CPU similar to Z80, but with some changes. GameBoy 
is frequently laughed at because of its reflective green-on-yellow LCD 
screen which in fact is its virtue. Due to the low power consumption of 
its LCD, GameBoy can work for 35 hours off 4 AA batteries. There is a lot 
of good games produced for GameBoy, both classics [Tetris, Pacman, 
Asteroids, etc.] and specific ones [Final Fantasy series for GB]. It 
excells in RPGs and classic games where gameplay is more important than 
graphics. More information about GameBoy is available from
 
                http://www.cs.umd.edu/users/fms/GameBoy/

2. Where do I get GameBoy games?
  You buy the cartridges. GameBoy software is copyrighted and still sold. 
Therefore, its distribution is an act of piracy. Nothing prohibits you 
from backing up a cartridge you own and playing it on the emulator though.

3. Why is VGB is so slow on my PC?
  Because your PC is too slow to run VGB. VGB is written entirely in C 
language and therefore is quite slow. Although it works on 486/33 and even 
386/33 PCs, it runs best on a Pentium/90 or a DEC Alpha/150. You can try to 
speed it up by increasing -uperiod value controlling the number of 
vertical blanking impulses between screen updates to 3-6, and by decreasing 
-vperiod value controlling the number of CPU cycles between vertical 
blanking impulses to 2000-5000. Please, DO NOT SEND ME MAIL about VGB speed. 

4. Can I compile VGB with my Borland/Turbo C compiler?
  You can, given that your compiler creates executables using flat 32bit 
memory model. Two PC compilers which do that are WATCOM [using DOS4GW DOS 
extender] and GCC [using DJPP extender]. No Borland/Turbo C compiler that 
I'm aware of can create such executables though.

5. Where is the complete list of command line options of VGB?
  Use -help option. It will tell VGB to display all options available in 
your version. Following are the options available in VGB 0.2:

  -verbose <level>    - Select debugging messages [5]
                        0 - Silent           1 - Startup messages
                        2 - Illegal writes   4 - Illegal CPU ops
                        8 - Bank switching
  -vperiod <period>   - Set VBlank interrupts period [10000ops]
  -uperiod <period>   - Number of interrupts per screen update [2]
  -help               - Print this help page
  -cheat <GG code>    - Activate a GameGenie cheat [not supported yet]
  -shm/-noshm         - Use/don't use MIT SHM extensions for X [-shm]
  -trap <address>     - Trap execution when PC reaches address [FFFFh]
  -saver/-nosaver     - Save/don't save CPU when inactive [-saver]
  -color0 <name>      - Change color#0 [black]
  -color1 <name>      - Change color#1 [#585858]
  -color2 <name>      - Change color#2 [#989898]
  -color3 <name>      - Change color#3 [white]

6. What are the keys used in VGB?
  VGB Unix/X 0.2 keys:

  [SPACE] - A button
  [LALT]  - B button
  [TAB]   - SELECT button
  [ENTER] - START button
  [ESC]   - Quit emulation
  [F1]    - Turn tracing on/off
  [F2]    - Show LCD controller registers

7. I can't get some games to work with VGB.
  Try increasing -vperiod value to 10000. If you can't get game to work, 
send it to me for analysis.

8. Is it legal to spread GameBoy cartridge snapshots?
  NO. Be aware of the fact that by using commercial software you haven't 
bought, you are commencing an act of piracy. Not that I care, anyway...

9. When compiling VGB under Unix, I get "undefined name" errors.
  This means that your linker can not find the libraries necessary
for VGB [namely, libX11.a and libXext.a]. Find these libraries in
your system and modify the Makefile so that the final invocation
of the C compiler has "-L<path_to_libs>" options. If the errors
persist, try #undefining MITSHM option.

10. When starting VGB under Unix, I get X_ShmAttach error.
  You are probably trying to run VGB on a remote Xterminal while it 
attempts to use shared memory for interfacing with X. Use -noshm option 
to tell fMSX not to use shared memory.

11. VGB starts under Unix, but then I get X_PutImage error.
  Unix/X version of VGB currently needs 256-color X. Neither 2-color 
nor TrueColor Xterminals will work with the drivers included into 
"official" fMSX distribution.

12. I start Unix version of VGB but the window stays black.
  Some other X application took over all available colors so that VGB 
could not allocate any for itself. Check if you run XV, Netscape, or 
something similar.



Marat.




******* changes in the Amiga version *******

- recompiled with SAS/C V6.30
- requires OS 3.0 and 68020 minimum
- key assignments changed, press "help" for an info requester
- does not support a filename on the commandline, instead an ASL
  filerequester is used
- tested on: A4000/040, CV64 (playable)
             A2000/030, ECS  (sloooooooowwww!)
To do:
- speed up graphics
  We took the graphics routines straight from the X11 version which uses
  256-color chunky bitmaps. Speed is quite decent on a 4000/040 with
  chunky-mode graphics board but unusable on ECS. Rewriting the display
  format conversions should give a *big* speedup here.
- implement sound
  Pretty difficult to do...as we understand it, you'd need 8 audio channels
  to do this without too much work for the CPU.
- better user interface, maybe some GadTools stuff. NO, we will NOT use MUI
  for this one :)
- support for the CD32 joypad (an ordinary joystick doesn't have enough
  buttons)
- real disassembler and hex editor with save function ("freezer")

Not really:
- contrast/brightness control
- 4-player support (serial cable emu) via AmiTCP sockets
- battery LED emulation


If you have any suggestions or ideas for future versions, contact us at
these email addresses:
Matthias Bethke: Matthias.Bethke@sowi.uni-giessen.de
Michael Boese  : skywalker@sweetdreams.lahn.de

...or on the following boards:
ThunderDome  (+49-6408-3249)
Sweet Dreams (+49-6406-76571)
