1 RRGB - Rough and Ready Game Boy Emulator
2 ----------------------------------------
4 rrgb (c) 1998 Michael Hope
5 Z80 emulation from `xz80', copyright (C) 1994 Ian Collier.
6 Found in z81 (C) 1995-1997 Russell Marks.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or (at
11 your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 The COPYING file contains a copy of the GPL described above.
27 ChangeLog describes differences between all versions.
33 RRGB is a processor only Nintendo Game Boy emulator, desgined primarialy
34 for debugging work. It emulates a system with the Gameboys Z80-like
35 processor connected to 64K of RAM with few interrupts or display.
37 The command line options are can be found using rrgb -h
39 The RST instructions have been modified to print information to the console,
40 hopefully helping the debugging process. They are:
43 RST 08 - Print the 00 terminated string following the RST
44 RST 10 - Print the character in A
46 RST 20 - Print the number of T cycles elapsed since the last RST 18
47 RST 28 - Print the 32 bit floating point number in HLDE
49 In version 0.21 banked memory support was added. Its main purpose is to
50 support disk images for 'os'. One new RST was added:
51 RST 30 - Commit previous bank and load the bank HL into segment A
53 A bank is 8k long. The 64k memory space is divided into eight segments
54 of 8k - so for example bank 4 begins at 0x8000 and goes to 0x9FFF. The
55 optional second arguments specifies the disk image name. Note that under
56 Linux you can use /dev/fd0 to access the actual floppy drive and if your
57 really keen /dev/hda1 to access the real harddrive :)
59 ** WARNING Will Robinson! ** From version 0.32 write access is enabled by
60 default. Doing a RST 30 will *commit* the last bank used before loading
63 Version 0.35 added communications support. Given the '-t' option, rrgb will
64 open port 6808 on the localhost and send/recieve binary data through it.
68 To write, load the data into L and do a
72 To check if data is available, use
75 A contains the return value which is non-zero if data is available.
76 Please note that the support is quite suspect in the way it closes the socket
77 (I'm new to this stuff) and often fails to close it properly, requiring
78 you to wait until the socket closes automatically. This code is probably not
81 Also added was a simple 100Hz (actaully 40000 tstate) timer interrupt that
84 Version 0.30 and above include a simple debugger/disassebmler. Use ? for
85 help. rrgb supports the map files generated by GBDK 2.0b13 or above to
86 allow simple symbolic debugging.
87 Note that you can reference by label eg
89 will set a breakpoint at the address of main().
92 I give Ian the main author credit for rrgb, as the Z80 emulation is
93 much harder to do than emulating the Gameboys hardware and patching the
94 ROM for save/load etc. However, any correspondence regarding RRGB
95 should be to me, as Ian hasn't had anything else to do with it and,
96 being more of a speccy fan (I think), may not appreciate being hassled
97 by those of the Gameboy persuasion. :-)
99 Please not that as at version 0.1 not all GB-specific instructions are
100 implemented (due to lazyness) - especially the LD A,($FF00+n) type and RETI.
101 These will be added in at a later date.
102 Note that the flag register is in the Z80 format, not the Gameboy format.
105 mlh47@student.canterbury.ac.nz
106 michaelh@earthling.net
107 www.pcmedia.co.nz/~michaelh/