Mapefer3: Ghosts 'n' Goblins, Diamond Run Emulator 0.8B
-------------------------------------------------------

        9/30/97 Jose Tejada Gomez

        GnG/Diamond Run emulator for 386/486/low speed Pentium.

What's new in 0.8B
------------------
Fixed a little bug in flip Y that caused a line of next sprite to be drawn.

DIAMOND RUN support with option -d. Also you can specify a directory for
DR's rom as always. For now, you cannot save your Diamond Run game

Now the speed is like in 0.7 The feature used in 0.8 can be turned on by
pressing K (when it is on, a beep will sound). This will cause "peaks" of
speed in some occasions, so perhaps suddenly the games run fasters for a
moments. I do not reccomend it but for slowest computers; because without it
the scroll is smoother. However if you use simultaneously Vsync+K and set
frame skipping to zero (F1) you must get a perfect emulation (if your
computer can afford it, mine can with F11 -320x200 mode-)

Also in this version you can select the instructions per image that the
6809 will run. Use -ipi number to select it. The default is 7680, other
values can make it go faster or slower. The use of K with a value of -ipi
of 7680 (default) or larger will make the emulator to run exactly the needed
instructions for every image, so it is faster, but if you do not use vsync
and no frame skipping it is not smooth.

There will not be updates for a while, because I aim to make an emulator
for Double Dragon, sorry.

What's new for 0.8
------------------
-Flip Y (bat is correctly displayed)
-Slightly faster.
-Six new keys for game saving/restoring

History
-------
  Before Paul Leamann's GnG I aimed to program a GnG emulator, but I did not
have time. Then Rob Ventura presented his faboluos gem32, and soon Mame
offered *perfect* GnG emulation... The summer came, and with it free time.
I eventually have programmed my own GnG emulator, and what can it offer?

Features
--------
The major contribution of MAPEFER3 is an emulation faster than Mame. The whole
cpu emulation is done in assembler ( it would be faster if I emulated page
flipping without copy memory blocks, well perhaps some day) The palette is
only changed when it is needed so you will not get "strange lines" running
on the screen like in Mame. You can change frame skipping with F1-F4. Also
you can SAVE YOUR GAME with F5 and RESTORE it with F6. Using F7-F10 you will
change game difficult from "easy" to "very difficult", default is "normal(F8)"
 With 'P' you can pause the game, 'T' will restart the game in test mode and
'S' will save the screen into "GNG.PCX"
 Also you can load the ROMs from any directory:
 gng c:\mame\gngcross
 will run the "cross" version of gng, that maybe you were playing with MAME
if you do not specify a directory the emulator will search for them in current
directory. If you do not have ROMs just write in altavista: arcade+rom
 And for hi-speed use F11:

Hi-speed mode
-------------
 F11 will set 320x200 mode. This screen mode is faster than any other mode,
but the screen does not fix in it. It does not care, it will be fast, lovely
fast. In my 486DX4-100Mhz gng runs over 60 fps using F11 WITHOUT frame
skipping. Every time you press F11, frame skipping is clear ( i.e. no f.skip.)
You can use F12 for 320x240 mode, it is slower but you can see the whole
screen; if you have univesa ( registered or test version ) you can play in
this mode like in 320x200.  When you press F12 frame skipping is automatically
set to one ( the game will draw one image of two, skipping one ).
 In 320x200 mode, the vsync slows down the game a lot, so do not use it.

 I recommend:

F12+F1+V+Space ( 320x240 + no frame skipping + vsync on + real palette ) -> pentium
F12 ( 320x240 + frame skipping 1 + vsync on + fast/real palette ) -> for 486-100Mhz
F11 ( 320x200 + no frame skipping + vsync off + fast/real palette) -> for 486-80Mhz
F11+F1 ( 320x200 + frame skipping 1 + vsync on + fast palette ) -> for 486-66Mhz
F11+F2 ( 320x200 + frame skipping 2 + vsync on + fast palette) -> for 486-50Mhz and lowers.


The Palette
-----------
MAPEFER3 emulates REAL perfect colours. Perhaps you will not notice difference
with others emulators, but if you give more bright and contrast to your
monitor you will see it. In order to adapt colours, conventional
emulators multiply by four, but the exact is multiply by 4.2
The VGA has 6-bit colors, but Gng has 4-bit colors, the adaptation is
done multiplying:

For example:
              Gng Arcade     Gem32, Mame...   MAPEFER3

White colour    1111         111100 (gray)  111111 (White)

 It is faster to multiply by four, but the real emulation must make it as
close to original as possible, so I multiply by 4.2.

 The default is fast palette, if you press space then the palette mode
will change from fast to real and viceversa. You will recognize the real
palette due to its bright, and to a beep. Really you will not notice very
difference in speed terms, but fast one, is fastest one :-)

Keys
----
F1 frame skipping 0
F2 frame skipping 1 ( one of every two is showed )
F3 frame skipping 2 ( one of every three is showed )
F4 frame skipping 3 ( one of every four is showed )

F5 Saves the game
F6 Restores the game

F7  Restarts with EASY      difficult
F8  Restarts with NORMAL    difficult
F9  Restarts with HARD      difficult
F10 Restarts with VERY HARD difficult

F11 Mode 320x200 (fast!) frame skipping 0 and vsync off
F12 Mode 320x240 (the screen fits right) frame skipping 1 and vsync on

T   Restarts in test mode
S   Saves the screen into gng.pcx
P   Pauses the game

+ y - Test it in 320x200 mode

1   Player1 start
2   Player2 start
3   Coin 1
4   Coin 2

5 Restores game "5.ram","5.reg", use ALT+5 to save it
6 Restores game "6.ram","6.reg", use ALT+6 to save it
7 Restores game "7.ram","7.reg", use ALT+7 to save it
8 Restores game "8.ram","8.reg", use ALT+8 to save it
9 Restores game "9.ram","9.reg", use ALT+9 to save it
0 Restores game "0.ram","0.reg", use ALT+0 to save it

Cursors move Sir Arthur
Alt    fire
Crtl   jump
ESC    exits
Space  Real/Fast palette
V      Vertical sync. on/off The vsync will slow down emulation in 386/486
       unless you use frame skipping. With f.skip. you can use vsync without
       notice slower the emulation. For those who do not know what is vsync,
       just turn it on when you are in the cave (or in somewhere where the
       background fills all the screen) and run, then turn it off and run,
       do you see the difference? Or see the map when you die, with vsync
       on and off.

What it lacks
-------------
** Flip Y background: I have not noticed any moment in which
background should be drawn looking down, for now it is not implemented and
it seems not to be needed.

** Sound: I do not know if do it, because surely in a 486 you can not play
with sound and have speed at the same time ( well with a high frame skip.
like two or three yes, but I do not like it )  And if you have a Pentium,
Mame gives good sound emulation.

** Background over sprites: In some occasions, like water and the fire bridge
the background must overlap sprites. In the current version this is not
implemented. But perhaps, if I did not tell it, you had not noticed :-)

The future:
-----------
 I aim to finish the question of "FLIP Y" and "background over sprites". I
expect to finish soon. I have released this version in order to see if it
is wellcome before doing more work.

The processor emulator (only for programmers)
---------------------------------------------
 My emulation of 6809 is nearly perfect. I have worked a lot on it, and if
you see code you will see more than 25000 ( twenty five thousands! ) line
of assembler code. It is very optimized, and what is better, if you are going
to emulate something, you can count with it.
 It is written in DJGPP assembler. Just let me know and I will give you a
copy of the .o file. The emulator can be used by a C or an ASM program.

Acknowledments
--------------
 To Roberto Ventura, a great arcade roms explorer!
 To Paul Leamann, for giving  answers to my questions.
 To Albert (fmr - Homer ) for his help, and
        for give me Ghoulst & Ghosts for Genesis!
 To Paul Swann, he helped me a lot of time ago, do you remember me?
 To MAPEFER3... and who is MAPEFER3? :-)

Mail-me
-------
 You can write me, for saying that you are using my emulator, and that I
have not spent my summer for nothing :-) For asking me any programmation thing
or to collaborate with me ( or me with you  ) in making a new emulator.
Eventually you can write in
        my natal Spanish, my hated English or my loved Latin.

        jotego@teleco.upv.es
        josephus@santandersupernet.es

Jose Tejada Gomez 1997 ----------> NON OMNIS MORIAR!
