home *** CD-ROM | disk | FTP | other *** search
-
- ------------------------------------------------------------------------------
- KGen V0.34b BETA TEST
- Sega Genesis / MegaDrive Emulator.
- Written by Steve Snake, Kode and Muzak Ltd, June-August 1997.
- ------------------------------------------------------------------------------
-
- ------------------------------------------------------------------------------
-
- This is an emulator for the Sega Genesis/MegaDrive, one of my favourite
- consoles of all time, for a Pentium PC in MSDOS.
-
- ------------------------------------------------------------------------------
-
- FILE CONTAINS:
- --------------
-
- KGEN EXE 301071 bytes
- README TXT 24111 bytes
-
- ------------------------------------------------------------------------------
-
- HISTORY:
- --------
-
- Version 0.34b : 22nd October 1997.
-
- Added PSG Sound - all documented features.
-
- Complete re-write to the control system to allow for the following features:
-
- Sega "Fighting Pad" 6 Button controller emulation.
- Redefinable Keyboard for both players.
- New "Compatible" joypad mode for joysticks that don't work in FAST mode.
-
- Fixed a few minor 68000 bugs.
-
- Fixed VESA 2.0 bug on Matrox cards. Thanks to Mirko Buffoni (MAME).
-
- Improved Battery RAM support.
-
- Complete re-write to most of the VDP emulation. More games should work now,
- BUT this is VERY experimental, and I haven't had a chance to test it on many
- games yet.
-
- Added Palette Raster Effects (VESA 2.0 ONLY). There is still MUCH work to be
- done on this, but for now, the water in Sonic games works, among others.
-
- Config file has had to be changed - so you will have to set the options again.
-
- There was much more I wanted to do for this version, but unfortunately I've
- been working hard, and in about 2 hours I have to catch a plane to Greece for
- my final holiday of the year! (That's the thing being a professional games
- programmer. You end up taking all your holiday at once, or not at all!)
-
- ------------------------------------------------------------------------------
-
- Version 0.33b : 28th September 1997.
-
- Apologies for the lateness of this version, I have been on Holiday !
-
- Added Horizontal Interrupts. These are always ON by default. There should be
- no need to switch them OFF, unless something doesn't run correctly with them
- ON, or it slows down too much.
-
- Added the most common Raster Effects. Now you can play Outrun ! Horizontal
- Interrupts need to be ON for these to take effect. Many more Raster Effects
- are planned, and the ones that are in there have been written in about four
- hours this evening, and so can be, and will be, heavily optimised at a later
- date.
-
- Again, made an attempt to track down and fix problems reported by some people
- relating to KGen crashing their machine. Hopefully this is now sorted.
-
- Fixed further timing problems with the YM2612.
-
- Fixed Counter bug (Streets of Rage).
-
- Most games that stopped working in Version 0.32b should now work again. And
- many, many more games will now run.
-
- ------------------------------------------------------------------------------
-
- Version 0.32b : 14th September 1997.
-
- Added Config File, all options and directories are now saved on exit.
-
- Added Battery Backup save / load. These are automatically loaded / saved from
- the same directory as the SnapShot files. Of course, KGen will also load .GSV
- files from Genecyst, if they are copied to the correct directory.
-
- Fixed several small bugs and generally improved reliability. Since KGen always
- ran with no problems whatsoever on my machine, I'll have to rely on you lot to
- tell me if the problems are now fixed !
-
- Fixed problem relating to certain games not initialising the Genesis properly,
- and thus they only worked if they were the first game loaded (!)
-
- Added an option to disable the automatic Checksum fixing, because I noticed a
- few games appear to have incorrect checksum code in them. (Chester, Cadash to
- name but two.) You should keep Checksums enabled unless a game does not run.
- Try switching it off, and reload the rom.
-
- Improved KGens compatibility so much that you can throw out your compatibility
- lists and start producing Non-compatibility lists :-) Most games should now
- run.
-
- Fixed problem with 68000 <-> Z80 communication taking far too long sometimes
- (Streets of Rage, Dragon Ball Z, AirDiver etc.)
-
- Fixed a slight timing error with the YM2612 timers.
-
- Further optimisations to the Z80 emulation, but you probably won't notice,
- since several compatibility issues slowed it down again slightly !
-
- Altered my Sound code in VSYNC ON mode because of all the complaints. Later I
- will make it an option of some sort. Also, VSYNC defaults to OFF, because a
- lot of people seem incapable of doing it. I assume people sensible enough to
- have bought a decent PC will also have the sense to switch it back on, if they
- want to.
-
- NOTE: Please don't ask about deleting / overwriting SnapShots, or that the
- Microsoft Sidewinder (tm) doesn't work. I'll look into these when I have time.
-
- ------------------------------------------------------------------------------
-
- Version 0.31b : 7th September 1997.
-
- Fixed Joypad Config bug, and generally improved Joystick handling.
-
- Fixed problem with SnapShot files not working on some machines.
-
- Fixed more minor bugs.
-
- Improved SnapShot files - you no longer need to load the ROM first. See the
- info on the GUI for more information.
-
- Added the ability to load Genecyst Save State files. Again, see the GUI info
- for more information.
-
- ScreenShot files are now currently saved into the directory you run KGen from.
- This also applies to SnapShot files, although changing the directory in the
- LOAD SNAPSHOT menu also sets where SnapShot files are saved to.
-
- NOTE: CONFIG FILE WILL BE ADDED ASAP, PLEASE DON'T HASSLE ME FOR IT !!
-
- ------------------------------------------------------------------------------
-
- Version 0.30b : 4th September 1997.
-
- Second major release of KGen.
-
- I apologise for the delay with this version, but due to a heavy workload at
- work, I haven't had any time for KGen recently. The changes in this version
- were done in about three days.
-
- ADDED KGen's GUI Menu System, and many new features. More about this later.
-
- Shadow / Hilight mode has been improved, it now works in every situation I can
- find.
-
- Minor optimisations to the 68000 and Z80 emulators, they are now a little bit
- faster. There is much more work to be done on this.
-
- Minor optimisations also to the Sprite and Palette handlers. KGen now runs a
- large amount of games at full speed on an Intel P133. Previous versions very
- nearly did already.
-
- Altered part of the YM2612 Emulation because some sound drivers were doing
- unexpected things. The music on 'HellFire' no longer sounds like, well, Hell!
-
- Sound now sounds a lot better if the emulator slows down for any reason.
-
- Altered the custom video mode slightly for timing reasons, and added full PAL
- support plus a 50Hz video mode.
-
- Added Joypad / Joystick controls, and support for player two.
-
- Added Volume control.
-
- Re-wrote the command line stuff, because several people wanted me to keep it
- in.
-
- Added VSYNC OFF option for people with machines not quite fast enough to run
- at full speed. This should put an end to all the complaints / rumours that
- KGen is not the fastest emulator. It is, and always has been much faster than
- the rest, even though it is doing SO much more. Also, the frame skip stuff
- works differently in VSYNC ON and OFF modes - so you can now run 99% of games
- at TWICE real Genesis speed on a P200 ! See the section on the GUI for more
- information on this.
-
- A few minor bugs were removed, but I can't remember exactly what they were (!)
-
- ------------------------------------------------------------------------------
-
- Version 0.21b : 19th August 1997.
-
- I found a strange bug that caused KGen to lock up on some machines if UniVBE
- wasn't installed. Occasionally it would try to use UniVBE even though it was
- not available! This was due to a routine returning a byte flag that was then
- tested as a word.... oops! These things happen when you are constantly being
- hassled and are rushing to get something done. The fact that my machine worked
- all the time without this fix also contributed to me not finding it.
-
- This is now fixed, hopefully making KGen fully compatible with all machines.
-
- The routine to shut down the sound card on exit has been improved.
-
- Also, a number of people have complained that they have to reboot their PC
- after trying to run a game which doesn't yet work. This is NOT the case. KGen
- has always returned to DOS with an error message - but didn't set the video
- mode, so you couldn't see it. Typing 'mode co80' would have solved this.
-
- In this version, I have set the video mode back for you in most cases. But
- there may still be some cases where this happens. 'mode co80' is always worth
- a try.
-
- ------------------------------------------------------------------------------
-
- Version 0.20b : 18th August 1997.
-
- Thanks to everyone who pointed out that KGen V0.10b did not work on Cyrix/IBM
- processors. This was due to some test code that was left in. (There's a lot of
- that!) Version 0.20b should now work. Also, the SMD loader has been improved.
-
- ------------------------------------------------------------------------------
-
- Version 0.10b : 18th August 1997.
-
- First Release of KGen.
-
- ------------------------------------------------------------------------------
-
- INTRO:
- ------
-
- KGen is finally at the stage I wanted it to be before I released it.
-
- KGen was written entirely by me, in 100% assembler, in two and a half months.
- Every single piece of code in this emulator was written specifically for this
- emulator.
-
- Please note, however, that this emulator is FAR from finished. A lot of games
- may not run, and others may but with severe problems.
-
- So, don't complain if something doesn't work properly. It'll be fixed soon!
-
- Also, in running this program you accept that I take no responsibility for any
- damage done to your computer, your hard drive, or you for that matter. While I
- have tried hard to make sure KGen will not fail, it is unfinished, and hasn't
- yet been properly tested.
-
- I recommend you do NOT run it under Windows - not even a DOS box ! It may work
- but what IS the point? It'll slow down too much!
-
- ------------------------------------------------------------------------------
-
- GUI MENU SYSTEM
- ---------------
-
- At any point during emulation, you can hit the ESC key to enter the GUI Menu
- System. The GUI is FULLY Keyboard driven, as this is what I, and many others
- who have mailed me, prefer. If you don't like it then don't use it, because it
- ISN'T going to change.
-
- However, for those of you who LIKE things that are easy to use, here is some
- information on it.
-
- Up and down cursor keys are used to hilight a specific option, and RETURN to
- select an option, throughout. During the File Menus you can also use PAGE UP,
- PAGE DOWN, HOME and END to move through the file list. Most of it should be
- obvious.
-
- LOAD ROM : Loads an SMD, BIN or .1 file, just as with the command line.
- LOAD SNAPSHOT : Loads a Snapshotted game position previously saved.
- SAVE SNAPSHOT : Saves current game position.
- CONTROLLER MENU : Allows enabling / disabling / configuring joypads etc.
- VERSION MENU : Allows setting of Hardware Version, or Auto-Detect.
- VIDEO SYNC : Keep enabled on fast machines, Disable on slower machines.
- 50Hz MODE : ONLY USE THIS MODE IF YOUR CARD / MONITOR CAN HANDLE IT !!
- CHECHSUMS : Disable checksums if a game won't run with them on.
- H-INTS : Can normally be left ON, but switching OFF may speed it up.
- HELP : Help Page telling you the extra available Key commands.
- EXIT : Returns to DOS.
-
- WARNING: The 50Hz mode may not work on your machine. It becomes active when
- it is switched ON and KGen is in EUROPEAN mode. This is for the people who
- want to play PAL games at the correct speed. If it doesn't work, leave it
- disabled.
-
- Any number of game saves are possible, the current filename used will appear
- on screen after saving.
-
- LOAD SNAPSHOT will first check if the required ROM file is already loaded. If
- not, it will try to load the ROM first. Note that if the ROM is not in the
- same place as it was when the SnapShot was saved, KGen will not be able to
- find it, and will return with a Cannot Load ROM message. In this case you can
- load the ROM yourself before loading the SnapShot.
-
- Note that if the SnapShot file was saved with KGen 0.30b, it will still be
- neccessary to load the ROM first. Re-saving it will solve this problem.
-
- Also, if any Genecyst Save State files are found, they will be listed, and you
- can load them. In this case, it IS neccessary to load the ROM first.
-
- Note that Genecyst does not save out all the information that KGen requires,
- and as a side effect you may hear strange sounds or see strange things for a
- while. This should settle down eventually.
-
- EXTRA KEY COMMANDS:
- -------------------
-
- F1-F4 : Set FrameSkip.
- TAB : Reset Genesis.
- F12 : Save ScreenShot.
- +/- : Alter Volume Level (Keypad)
-
- In VSYNC OFF mode, with FrameSkip 1, KGen will auto-adjust it's speed for your
- machine. If you do not like it speeding up and slowing down at will, then you
- can set the FrameSkip higher to lock it to 2 or above, 3 or above, and 4 or
- above. You may see some screen tearing going on in these modes. This is the
- downfall of not VSYNCing. KGen will auto-calibrate and adjust as best it can
- to avoid this, but sometimes it just isn't possible. This is the reason this
- mode was not in the first release, I was hoping to find a better solution.
-
- In VSYNC ON mode, which should be used for faster machines, FrameSkip simply
- sets the number of frames of Processor Activity KGen attempts to do in each
- frame of PC processor time. Normally this will act in a similar way to VSYNC
- OFF mode without the auto-adjusting, and with no screen tearing. But if you
- have a P200, FrameSkip 2 will allow you to play games at twice the speed !
-
- NOTE: VSYNC ON should only be used if you do NOT have to change FrameSkip. If
- your machine will not run a game at full speed with VSYNC ON, FrameSkip 1,
- then you should use VSYNC OFF instead.
-
- Currently the SAVE SCREENSHOT feature will save to the same directory as KGen
- was loaded from. Any number of screenshots are possible, the current
- filename used will appear on screen after saving.
-
- ------------------------------------------------------------------------------
-
- COMMAND LINE.
- -------------
-
- The command line interface has been improved, but essentially isn't much
- different to previous versions. It is now also unneccessary, so you can type:
-
- KGEN
-
- This will run the emulator and jump straight into the Main Menu. If you
- really must use the command line, type:
-
- KGEN filename.??? -J -U -E -A -Fn -S
-
- where ??? is either SMD, BIN, or .1 (Multi-part SMD files)
-
- Any other extension will assume a BINARY file.
-
- NOTE: the filename no longer needs to come before any options.
-
- Options are: -J -U -E (select Japanese, American (USA) or European Machine)
-
- -A (attempt to Auto-Detect the Machine Version)
-
- -Fn (Frame Skip)
-
- -S (Disable Sound - NOTE: DOES NOT DISABLE THE Z80 !)
-
- FrameSkip is a value from 1 to 4 (default=1) that causes KGen to only draw the
- 2nd, 3rd or 4th frames, for use on slower PCs. If you have a P166 or above you
- shouldn't need this. If you have a P200 you should NEVER need this!
-
- Read the section on the GUI for more information on Frame Skipping.
-
- There is currently no way to disable the Z80. It's fast anyway! :-)
- Note also that sound can only be disabled from the command line.
-
- ------------------------------------------------------------------------------
-
- OK - So, what does it do?
- -------------------------
-
- KGen is probably the fastest and most fully featured Genesis Emulator around.
-
- This version currently emulates:
-
- * Motorola 68000 CPU
- * ZiLog Z80A CPU
- * Scroll Screens A,B and Sprites all fully prioritised and masked
- * FULLY Working Window.
- * ALL Scrolling modes (H-Screen, H-Cell, H-Line, V-Screen, V-Cell)
- * DMA
- * V Interrupts
- * H Interrupts
- * Many Raster Effects
- * Palette Raster Effects
- * Shadow / Hilight mode
- * Complete and REAL YM2612 FM Emulation + DAC (No bodgy OPL3 rubbish!)
- * Joypad (both ports, keyboard or joypad)
- * Full Battery Backup Save / Load support
- * PSG Emulation (all documented features)
- * Sega 6 button Joypads
-
- Future versions will emulate:
-
- * PSG (undocumented features)
- * Interlace Mode
- * More Raster Effects
-
- I originally planned this Emulator to be MMX only, because I didn't think I
- could get the FM Synthesis quick enough without it. I surprised myself! But an
- MMX version is still planned, and will be added when everything else is done.
- I have great plans for this version, so consider yourself lucky if you have
- MMX !
-
- ------------------------------------------------------------------------------
-
- OTHER NOTES:
- ------------
-
- KGen will probably run on a 486 with 8Mb of RAM, but as a Pentium is the only
- PC that could emulate a Genesis PROPERLY, it has been *highly* optimised for
- a pentium. (Actually, that's not true - there's still a lot of slow code in
- there.) So don't expect it to be worth using on a 486.
-
- NOTE: Optimising for a 486 would NOT make the Pentium version quicker! It
- would make it MUCH, MUCH slower. And a 486 specific version would be unusable.
-
- KGen uses VESA 2.0 support (320x240x8bit) if it is available.
- THIS IS HIGHLY RECOMMENDED - if you don't have a VESA 2.0 extender, visit
- http://www.scitechsoft.com and download UNIVBE (Scitech Display Doctor).
-
- Without the VESA 2.0 mode, KGen resorts to a custom video mode, which can be
- MUCH slower, depending on your PC / Graphics card.
-
- Other than that, KGen runs on any Pentium PC with 8Mb of RAM or greater. P166
- or above is HIGHLY RECOMMENDED! With a decent graphics card, UNIVBE, and the
- -F4 option, it will run reasonably on a P75.
-
- For Sound Emulation, KGen requires a SoundBlaster Pro (or higher) or 100%
- HARDWARE compatible (no software driven!) sound card. If your sound card is
- only SoundBlaster compatible (and not PRO) it won't work, so don't ask me why!
-
- You can buy a SoundBlaster 16 compatible for around 10 UK Pounds now, so stop
- moaning!
-
- It currently looks for the BLASTER environment. If you don't have one set up,
- then you'll have to do so. Later versions will auto-detect.
-
- KGen uses the PMODE/W DOS extender by Charles Scheffold and Thomas Pytel.
-
- ------------------------------------------------------------------------------
-
- CONTROLS:
- ---------
-
- Control is via Keyboard, via re-defining, or using the defaults:
-
- CURSOR KEYS: Move
- A Button A
- S Button B
- D Button C
- RETURN Start
- Q Button X
- W Button Y
- E Button Z
- ] Mode
-
- or JoyPad, which is reconfigureable. Joypads / Joysticks with less than four
- buttons should work, you will need to use the keys for the undefined buttons.
-
- ------------------------------------------------------------------------------
-
- PROBLEMS:
- ---------
-
- There are probably a few bugs in my 68000 and Z80A emulators. The 68000 code
- was written in about 36 hours, and the Z80A in only three hours, so you'd
- expect there to be something wrong somewhere! I do not know of any specific
- bugs as yet, but the 68000 is not strictly finished, and probably needs a lot
- of optimising.
-
- The YM2612 emulation is not perfect as yet.
-
- However, the YM2612 emulation was written completely by a combination of
- judgement and trial and error. I have no documentation on the chip except for
- a simple register list, and could find no information on the technique of FM
- synthesis at all. So I think I've done pretty well. At least I made the
- effort!!
-
- Note that there is now little point in people sending me FM information. I've
- worked it out for myself. Can't you tell ? :-) However, if somebody knows
- EXACTLY how the CSM mode works (on the YM2612 specifically) please tell me.
- All documentation I've found seems to be incorrect.
-
- ------------------------------------------------------------------------------
-
- FINALLY:
- --------
-
- I do not condone piracy. I have been a games programmer for the last 12 years
- myself, and I know we don't get paid enough :-)
-
- Do NOT ask me for ROM images. I have a BIG collection of cartridges, which are
- currently "living with" Andrew 22, but I WILL NOT tell you how to copy them,
- or give any out. If you can't find any, tough.
-
- KGen is "AbsolutelyFreeWare" (tm) - I hope you get a lot of enjoyment out of
- it. Feel free to distribute it wherever you like, AS LONG AS THIS FILE IS WITH
- IT.
-
- Do NOT bug me if something doesn't work. Eventually, 99% of games should work.
- But until then, just accept what you've got and be glad that it's free.
-
- ------------------------------------------------------------------------------
-
- THANK YOU:
- -----------
-
- Thanks to Andrew 22 for telling me to 'get off my arse and do it', after I'd
- mentioned the idea of doing an emulator of some description about a year ago.
- Thanks to him for a load of other things that I can't be arsed to mention,
- including getting my cartridges into my emulator. Now you have a P200 you can
- appreciate my emulator at it's best :-)
-
- Thanks to Belinda / Belinds / BinLiner / Blinder or whatever her name is
- supposed to be. "Soul Blade - Razor Blade !"
-
- Thanks to Christopher 'Canal-Boy' Fuller for being so adept at falling down
- stairs and into various water-based landmarks, and then dissappearing off the
- face of the earth.
-
- Thanks to Colin Rodgers and Stuart McKenna for supplying me with info on the
- Z80A and 68000 processors. It's been so long since I did any 68K, and even
- longer since I did any Z80 - Oh, I forget these things.
-
- Thanks to Glen 'Todd' Cook for constantly moaning at me to 'get it sorted' and
- generally wandering about lost.
-
- Thanks to my old friend Warren Mills for allowing me to look at his own Z80
- emulator. However, I do not have the time to test it, and am now convinced
- that there are NO remaining bugs in my Z80 emulation. The problem turned out
- to be with the YM2612 and is now fixed.
-
- Thanks to David Michel, author of Magic Engine, for allowing me to bounce some
- ideas off him, even though it didn't amount to much in the end. Obviously,
- great minds think alike! :->
-
- Thanks to Alain Jourgensen / cEvin Key / Nivek Ogre / D.R. Goettel (R.I.P) and
- Sasha K. for making my life worth living.
-
- Thanks to Charles Scheffold and Thomas Pytel for releasing PMODE/W and letting
- me use it for free.
-
- Thanks to Dave W. for allowing me to link to his site when mine was about to
- die!
-
- Thanks to all the people who have Emailed me about KGen. I'm sorry if I have
- not replied to all of you, but although I'm a very fast typer, by the time I
- reply to one Email, another 14 arrive!
-
- But most of all, thanks to my Wife Emma, for not moaning at me too much when I
- spend half the night on my computer.
-
- ------------------------------------------------------------------------------
-
- THAT'S ALL FOLKS!
- -----------------
-
- New versions will be available as and when I add something worthwhile.
-
- These can always be found at http://www.davesclassics.com
-
- ------------------------------------------------------------------------------
-
- snake@toodarkpark.demon.co.uk http://www.toodarkpark.demon.co.uk
-
- ------------------------------------------------------------------------------
-
-