1 2# cingb 3 4cingb is an ATTEMPT to write a Gameboy emulator for all kinds of platforms. 5It plays Gameboy and Gameboy Color ROMs, includes a debugger for step-by-step 6analysis of Gameboy programs and might be also interesting for educational 7purposes. 8 9It is a quite old piece of software written when I was still at school 10in the mid-90s. It is perhaps not usable for your satisfaction, but I 11have published it to share with people. 12 13The only gameboy emulator that predates cingb was vgb which had some bugs 14at that time. Some important information about the gameboy system has 15been retrieved from this project. 16 17## Supported systems 18 19Quite a few. It is generally portable and I've heard of people who 20ported it to a Texas Instruments calculator without many problems. 21 22## Makefile & compilation (Unix/Solaris) 23 24This is quite an early release of cingb. You may need to change the 'Makefile' 25(after the execution of ./configure) to compile the sources successfully. 26 27So first start the configuration script with: 28``` 29# ./configure 30``` 31 32optionally you could configure your joypad 33``` 34# ./cingb_conf 35``` 36 37then run: 38``` 39# make 40``` 41 42If you want to install the binary for 43regular use type: 44``` 45# make install 46``` 47 48### What to do if make fails 49 50Eventually, you need to adjust the 51variable-definitions. 52 53#### INCPATH 54 55* locate stdlib.h 56* locate Xlib.h (without /X11) 57 58#### LIBPATH 59 60* locate libX11.a 61 62Now, it should be possible to compile the sources. If you get errors, while 63running the compiled cingb, try to comment out the OPTMZ variable. And don't 64forget to read README.FAQ. 65 66### Optional "make" syntax 67 68#### make, make standard 69 70Standard version supports: 71- X 72- framebuffer device 73 74#### make glide 75 76Glide version (requires root access). 77 78#### make debug 79 80Like standard, but implements debugger. 81 82Do not execute the 'debug' version in 83framebuffer mode, it's not possible. 84You will need the terminal screen, so it's only 85possible in X. 86 87### Makefile & compilation (MS-DOS) 88 89Requires: 90* Cygwin package from http://www.cygwin.com/ 91 92Just type 'make -f Makefile.dos'. 93CINGB.EXE should be created. 94 95## Joypad configuration 96 97cingb supports the sidewinder-joypad 98and standard keyboards 99 100### Default configuration 101 102``` 103gameboy keyboard sidewinder 104 105up crsr up up 106down crsr down down 107left crsr left left 108right crsr right right 109A c B 110B x A 111SELECT d M 112START s start 113``` 114 115#### NOTE 116 117You should select the keys like on 118a real gameboy, so that's why 119gameboy A = sidewinder B and 120gameboy B = sidewinder A !!! 121 122### Other joypads 123 124To configure other joypads, type: 125 126``` 127# ./cingb_conf 128``` 129 130## A warning about sound 131 1321. It still sounds crap (ALPHA-release) ! 133 The gameboy sound chip has some more 134 features which aren't implemented, yet. 1352. On Sun Solaris the sound generation 136 is very slow. Better switch it off 137 with -n. 138 139## Syntax 140 141There are 3 types of executables so far: 142 143- cingb 144- cingb_deb 145- cingb_glide 146 147cingb can be started in X or on the 148framebuffer console. cingb_deb can only be started in X. 149 150The syntax of both versions is: 151``` 152cingb [options] romfile 153 154Options: -d execute in double-size mode 155 -x don't use XVideo extension 156 -n sound off 157 -f freq sound frequency (8000-44100) 158 -o force old standard gameboy mode (B/W) 159 -c server connect to server (dialog link) 160 -h start as server for dialog link 161 -a code use action-replay code (see below) 162``` 163 164cingb_glide doesn't support "-d", it 165will be ignored. The glide version eventually needs root 166access rights. 167 168After starting the X-version can be stopped by pressing 'q'. 169 170The framebuffer and Glide versions can be stopped by pressing: 171 172* ctrl-C 173* escape key 174* q 175 176Don't "kill -9" the emulator, or else your last status won't be saved. 177 178## Action Replay Interface 179 180*I hope it works properly (probably not).* 181 182You can pass AR-codes by specifying "-a CODE -a CODE -a CODE ..." (up to eight 183times). At start, the codes are NOT toggled on. To enable/disable them press 184RETURN while playing. 185 186The codes look like this: **VVVVVVVV** 187 188- eight characters 189- every 'V' is a hex digit (0..9,A..F) 190 191## Compatibility 192 193These are games that are known not to work properly: 194 195Double Dragon 3 196- joypad doesn't work 197 198Alladin, Warioland 2 GB/GBC (playable) 199- problems with window alignment 200 201## Other known problems 202 203* There is a small bug in the 204 graphical unit causing bugs 205 when displaying "gameboy windows". 206 207* You can have joypad emulation 208 problems while executing some games. 209 210* The sources won't compile, if you 211 don't have enough virtual memory. 212 213## Savegames (battery status) 214 215The savegames will be stored in the same directory as the roms. 216They have the extension '.GBS', but should be compatible to the '.SAV'-files 217which are created by other emulators, so just copy or rename them. 218(I think, these are raw SRAM-images without the last zeros.) 219 220## That's it! 221 222Have lots of fun studying it. 223