brazil

11
------------------------------------------------------------------------------ KGen 98 V0.4b BETA TEST Sega Genesis / MegaDrive Emulator. Written by Steve Snake, Kode and Muzak Ltd, Jan-Feb/May 1998. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ This is an emulator for the Sega Genesis/MegaDrive, one of my favourite consoles of all time, for a Pentium PC in MSDOS. ------------------------------------------------------------------------------ HISTORY: -------- Version 0.4b : 8th June 1998. Various compatibility issues have been fixed. Surging Aura, MazinSaga, Dashin' Desperadoes now work correctly, to name but three. Improved ScanLines support. (VESA 2.0 ONLY). Should work on more video cards. Use at your own risk. Altered EUROPEAN mode. Previous versions only had full European support when in 50Hz mode. Note that music / sampled sounds will sound faster - This is due to emulating 1/50th Sec. of European Genesis in 1/60th Sec ! But this will fix the European games that only worked in 50Hz mode. Stopped LEFT & RIGHT or UP & DOWN being pressed at the same time. This can happen on a real Genesis with a worn pad, and programmers are SUPPOSED to make sure it won't affect their games.... But some people don't listen, apparently. Improved the File Requester Keyboard Shortcuts. You can now type a few letters within a short space of time, and it will jump to the first file starting with those letters. The current search string is displayed at the top of the file requester. Also, pressing SHIFT and a letter will jump directly to the Disk Drive of the same letter. Added 16-Bit Video Mode. (VESA 2.0 ONLY). This was ported from the now defunct KGen-X, and has been considerably rewritten to cope with the new Raster FX System. It is slower than the 8-Bit mode, but allows games that try to do more Palette Raster FX than the 8-Bit mode can cope with to function properly. Note that there are a few things left to do in this mode - for example, you cannot currently save a ScreenShot when you are in 16-Bit mode, and the only Joypad modes that work in this mode are SLOW and SIDEWINDER. Various small changes to the GUI. Various cosmetic fixes. Please note to all the people STILL complaining that the road in Road Rash is blue - it is NOT if you are using a VESA 2.0 driver, when the Palette Raster FX kick in. ------------------------------------------------------------------------------

description

o fracasso da copa fh b cx cb fcs

Transcript of brazil

Page 1: brazil

------------------------------------------------------------------------------ KGen 98 V0.4b BETA TEST

Sega Genesis / MegaDrive Emulator. Written by Steve Snake, Kode and Muzak Ltd, Jan-Feb/May 1998.------------------------------------------------------------------------------

------------------------------------------------------------------------------

This is an emulator for the Sega Genesis/MegaDrive, one of my favourite consoles of all time, for a Pentium PC in MSDOS.

------------------------------------------------------------------------------

HISTORY:--------

Version 0.4b : 8th June 1998.

Various compatibility issues have been fixed. Surging Aura, MazinSaga, Dashin'Desperadoes now work correctly, to name but three.

Improved ScanLines support. (VESA 2.0 ONLY). Should work on more video cards.Use at your own risk.

Altered EUROPEAN mode. Previous versions only had full European support whenin 50Hz mode. Note that music / sampled sounds will sound faster - This isdue to emulating 1/50th Sec. of European Genesis in 1/60th Sec ! But this willfix the European games that only worked in 50Hz mode.

Stopped LEFT & RIGHT or UP & DOWN being pressed at the same time. This canhappen on a real Genesis with a worn pad, and programmers are SUPPOSED to makesure it won't affect their games.... But some people don't listen, apparently.

Improved the File Requester Keyboard Shortcuts. You can now type a few letterswithin a short space of time, and it will jump to the first file starting withthose letters. The current search string is displayed at the top of the filerequester. Also, pressing SHIFT and a letter will jump directly to the DiskDrive of the same letter.

Added 16-Bit Video Mode. (VESA 2.0 ONLY). This was ported from the now defunctKGen-X, and has been considerably rewritten to cope with the new Raster FXSystem. It is slower than the 8-Bit mode, but allows games that try to do morePalette Raster FX than the 8-Bit mode can cope with to function properly. Notethat there are a few things left to do in this mode - for example, you cannotcurrently save a ScreenShot when you are in 16-Bit mode, and the only Joypadmodes that work in this mode are SLOW and SIDEWINDER.

Various small changes to the GUI.

Various cosmetic fixes.

Please note to all the people STILL complaining that the road in Road Rash isblue - it is NOT if you are using a VESA 2.0 driver, when the Palette RasterFX kick in.

------------------------------------------------------------------------------

Page 2: brazil

Version 0.3b : 3rd June 1998.

Fixed minor VDP problem.

Added bits to File Requester that I forgot to add last night :-(Maybe I should get some sleep.....

Yes, I know I forgot to change the version no. in 0.2b ;-) I realised rightafter I uploaded it.

Further to the SIDEWINDER driver and Windows 95 - it has been confirmed thatif you press the MODE button four times (so the light comes back on) once inKGen 98, everything works fine.

I'd just like to point out that a LOT of people have mailed me saying thatToeJam and Earl doesn't work - So I'd just like to say:

ToeJam and Earl works PERFECTLY - IF you switch to 'FULL' Raster FX mode.

As I said before, some games work better in 'MOST' mode, some in 'FULL' mode,and others in 'NONE'. It's really up to you to find out - but please, if it'snot working, try another mode !

------------------------------------------------------------------------------

Version 0.2b : 2nd June 1998.

Fixed problem with KGen 98 locking with 8-bit soundcards. Turned out to be aline that I forgot to delete :-)

Fixed VDP Status register - I don't know why I forgot this, since I had thesame problem way back in KGen 0.32b !

Fixed problem with Joypad modes - again, something that should have beendeleted.

Added Long File Name Support. I had actually written this before, but it gotlost with the changes I made to the GUI / hard drive problem.Completely forgot to put it back in ! But it's there now.

Also added -L command line option to disable Long Filename Support, incase itcauses problems.... DOS 6.22, for example, reports no error..... I got aroundthat problem, but other versions of DOS, or other OSses, may still die.

PLEASE NOTE:

A lot of people have been mailing me saying the SideWinder stuff doesn't work.

IT WILL NOT WORK IF YOU ARE RUNNING FROM WINDOWS 95 WITH THE WINDOWS 95 SIDEWINDER DRIVERS ACTIVE !!!

The Windows 95 drivers for DOS make the PC 'believe' that it has a standard 4button Joypad connected. This is BAD - it means you can only use four buttons,and you can only use one SideWinder.

To get around this, you should either:

a) Run it from pure DOS :-)

Page 3: brazil

b) Disable the Windows SideWinder drivers (remove them from 'game devices')c) I've been told that pressing the 'mode' button a couple of times when in KGen will cause the Windows drivers to temporarily stop reading. I can't try this cos I don't have the windows drivers installed :-)

Note that if option C does work, you MUST do it with only one sidewinderplugged in, once that one is working, you can plug another one in.

------------------------------------------------------------------------------

Version 0.1b : 1st June 1998.

This is the first release of KGen 98.

KGen 98 is practically an entirely new Emulator. Around 90% of the code wasrewritten for this release. It is for this reason that I decided to change thename - since there is every chance that things that worked before now do not,and vice versa. Also, since more and more people have PCs that are faster thanmine :-( the focus of this project has now changed from speed to accuracy.

I also recommend that you keep KGen 0.34b - hence the renaming of the files.

Most of what you see here was written and ready for release before the end ofFebruary 1998. The release was delayed due to interrest from Sega. Since Ihave not been able to get a reply from them for a long time, I decided to tidyit up and release it. If there are any objections from Sega, please contact meand it will be removed.

WELL, WHAT'S THE STORY, THEN ?------------------------------

Changes from KGen 0.34b -> KGen 98 0.1b are as follows:

Command line options have changed - see below for more information.

Complete re-write of the VDP emulation.

All Raster Effects are now implemented. Shadow / Hilight mode is now 100% accurate. Most games that had severe graphics problems are now fixed. (See below for more information on this.)

Complete re-write of the YM2612 FM Sound Emulation.

Waves calculated with a much higher degree of accuracy. Support for 44.1Khz 16-bit Stereo Sound. (SB16 and above only.) Mixer values now restored on exit.

Complete re-write of the PSG Sound Emulation.

Any previous problems should no longer occur. Support for the undocumented features also.

Complete re-write of the Control System.

Better support for Sega "Fighting Pad" 6 Button Controller. New Joypad modes : Fast, Medium and Slow for both 4 and 6 button pads. Support for one or two Microsoft SideWinder pads.

Major changes to the 68000 and Z80 emulation.

Page 4: brazil

Near-Instant start-up time.

Complete re-write of the SnapShot system.

Load SnapShot still included for old SnapShot / Genecyst saves. Save SnapShot removed. SnapShot Slot system added. Saves / Loads are now done from within the game using F5 / F8.

Added ScanLines video mode (VESA 2.0 Only)

Added Game Genie Support.

Parts of the GUI rewritten / improved.

Loads more parts re-written to get all the new systems working together.

Many, Many, Many bugs removed (most of it rewritten !)

------------------------------------------------------------------------------

KGen 98 was written entirely by me, Steve Snake, in 100% Assembler. Most of ithas been written in under two months, with only a few "glue" routines takenfrom the original KGen. I had planned on a complete GUI overhaul, but I reallycan't be bothered now, since I lost a lot of code / graphics when a HD diedrecently.

In running this program you accept that I take no responsibility for anydamage done to your computer, your hard drive, or you for that matter. Thisversion has hardly been tested at all, and although it SHOULD be stable, Ihave no idea just how stable or otherwise it is.

And now, it's the part of the file I borrow from KGen, and modify whereappropriate...... Please READ IT, however, because there are a LOT of major,important changes and stuff. And that.

------------------------------------------------------------------------------

GUI MENU SYSTEM---------------

At any point during emulation, you can hit the ESC key to enter the GUI MenuSystem. The GUI is FULLY Keyboard driven, as this is what I, and many otherswho have mailed me, prefer. If you don't like it then don't use it, because itISN'T going to change. No, it STILL isn't.

However, for those of you who LIKE things that are easy to use, here is someinformation on it.

Up and down cursor keys are used to hilight a specific option, and RETURN toselect an option, throughout. During the File Menus you can also use PAGE UP,PAGE DOWN, HOME and END to move through the file list. You can now also useKeyboard shortcuts - pressing 'T', for example, will jump to the first filestarting with 'T'.

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 KGen 0.34b SnapShot or Genecyst Save State file.

Page 5: brazil

CONTROLLER MENU : Allows enabling / disabling / configuring joypads etc.GAME GENIE MENU : Allows editing / selecting Game Genie codes.VERSION MENU : Allows setting of Hardware Version, or Auto-Detect.VIDEO MENU : Allows selection of various Video-related options.

CHECKSUMS : Disable checksums if a game won't run with them on.

HELP PAGE : Help Page telling you the extra available Key commands.

EXIT : Returns to DOS.

------------------------------------------------------------------------------

CONTROLLER MENU:----------------

You can cycle through joypad modes for FAST, MEDIUM and SLOW, for both 4 and 6button Joypads. Choose the option that works best on your Joypad - the faster,the better. You can also select SIDEWINDER if you have one or two MicrosoftSideWinder gamepads connected.

You should always calibrate your joypad when starting KGen, or when changingthe reading mode. Note that the SideWinder driver does not need calibrating,and the buttons are fixed, as follows:

SIDEWINDER GENESIS

A AB BC CX XY YZ ZSTART STARTMACRO START

The SideWinder driver is my own, it works fine on all the PCs here.Any problems, you know what to do.

------------------------------------------------------------------------------

GAME GENIE MENU:----------------

From here, you can enter both Game Genie codes and Hex codes. Game Genie codesare in the format ABCD-EFGH (the '-' is optional). Hex codes are in the formatAAAAAA:DDDD (24 bit Hex address, and 16 bit Hex Data). When the code isenabled, the 16 bit data generated by the code will be written to the 24 bitaddress.

Along with the code, you can enter a descriptive name to remind you what thecode does. Here is an example:

GAME: Alien 3CODE: AJBT-AAEYNAME: START ON LEVEL 2

Select "Add Code", and a cursor will appear in the CODE box. Type the code in,and use cursor down to move to the NAME box. Type in your codes name here.

Page 6: brazil

Pressing <RETURN> will add the code to the list, if it is valid.

Note that if no NAME is entered the CODE value will be used.

codes can be saved to a file (called GAMENAME.PAT) that will be reloaded nexttime the game is loaded. Just select "Save Codes".

There are lots of sites on the internet containing Game Genie codes for mostof the popular games. You can cut and paste in any text editor the entire listof codes for a game into it's .PAT file, saving you a lot of typing.

The .PAT file has one code per line, in the format:

CODE NAME

The .PAT file is named as such to maintain compatibility with Genecyst

To Enable / Disable codes, select "Toggle Codes". You can now scroll up anddown through the code list. Hitting <RETURN> on a code will enable or disableit. Pressing 'X' will exit Toggle mode.

Enabling a code will automatically disable any other codes that write to thesame address.

To Delete codes, select "Delete Codes". The controls are as for "Toggle Codes"

------------------------------------------------------------------------------

GAME GENIE NOTES:-----------------

At any time during the game, keys F9 & F10 can be used to Activate/Deactivatethe Game Genie. This is useful for games that crash due to a checksum errorwhen codes are enabled. Deactivate the Genie, hit <TAB> to reset the genesis,then Activate the Genie when the game is running. This saves you having tomanually switch off and then on again all your active codes.

Note that the Genie is automatically Deactivated when a ROM is loaded, andActivated when you enter the Game Genie menu.

------------------------------------------------------------------------------

VIDEO MENU:-----------

From the Video menu, you can now select the following:

VSYNC ON or OFF

50Hz MODE * ON or OFF

SCANLINES * ON or OFF (VESA 2.0 ONLY)

SHADOW/HILITE ON or OFF

RASTER FX NONE, MOST or FULL

H-INTERRUPTS ON or OFF

Page 7: brazil

* 50Hz Mode and ScanLines mode may or may not be supported by your graphicscard. Use at your own risk! They are both OFF by default.

50Hz mode is only selected when it is switched ON and EUROPEAN version isselected.

As mentioned before, both Shadow/Hilite mode and Raster FX are now 100%emulated. On the downside, they can now be a LOT slower than in previousversions. For this reason, I have given you the option to switch them off ifyou wish.

For Raster FX, most games will operate properly in the MOST mode. There are afew, however (E.G. Gunstar Heroes) that require the FULL mode. The FULL modecan be a lot slower than the MOST mode, especially if a game is doing a lot ofvideo memory writes during frame time, when it doesn't really matter when theyare written. Also, there are some games that can overload FULL mode so muchthat it cannot cope, resulting in corrupted graphics. I will try to come upwith a better solution, so that this doesn't happen. But if it does happen,MOST mode will fix it, and give you a significant speedup too.

There shouldn't be any need to switch H-Interrupts OFF, but the option is leftincase you want to.

Note that if you are going to be using FULL Raster FX, and / or 44Khz StereoSound, it is recommended that VSYNC be switched OFF, since flying interruptscan cause the VSYNC signal to be missed, resulting in unneccessary slowdownwhile KGen 98 waits for another one.

------------------------------------------------------------------------------

SNAPSHOTS---------

Snapshots are now saved by simply hitting the F5 key during play, and reloadedby hitting F8. You can have up to Ten SnapShot files per game, saving diskspace :-)

The File is selected by hitting the numbers 0-9 before saving / loading aSnapShot.

------------------------------------------------------------------------------

EXTRA KEY COMMANDS:-------------------

F1-F4 : Set FrameSkip.TAB : Reset Genesis.F12 : Save ScreenShot.+/- : Alter Volume Level. (Keypad)F5/F8 : Save / Load SnapShot.0-9 : Select SnapShot Slot 0-9.F9/F10: Enable / Disable the Game Genie.

------------------------------------------------------------------------------

COMMAND LINE.-------------

The command line interface has been improved, but essentially isn't muchdifferent to previous versions. It is now also unneccessary, so you can type:

Page 8: brazil

KGEN98

This will run the emulator and jump straight into the Main Menu.

Note, however, that the Sound options are ONLY available from the command line

KGEN98 /? will display the command line options, which are:

KGEN98 filename.??? -J -U -E -A -Fn -D -L -8 -4 -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, and can beommited completely.

Options are: -J -U -E (select Japanese, American (USA) or European Machine)

-A (attempt to Auto-Detect the Machine Version)

-Fn (Frame Skip)

> CHANGED -D (Disable Sound - NOTE: DOES NOT DISABLE THE Z80 !)

> ADDED -L (Disable Long File Name Support)

-8 (Force 8-Bit sound output on SB16 or above.)

-4 (Select 44.1Khz Sound. Defaults to 22.05Khz)

-S (Select Stereo Sound (SB16 or above))

FrameSkip is a value from 1 to 4 (default=1) that causes KGen to only draw the2nd, 3rd or 4th frames, for use on slower PCs. If you have a P166 or above youshouldn'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.

------------------------------------------------------------------------------

TECHNICAL INFO--------------

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 * All standard Raster Effects

Page 9: brazil

* Palette Raster Effects (VESA 2.0 ONLY) * Shadow / Hilight mode * Complete YM2612 FM Emulation + DAC * Stereo Sound. * Joypad (both ports, keyboard, joypad, or Microsoft SideWinder Joypad) * Battery Backup Save / Load support * PSG Emulation (all documented and undocumented features) * Sega 6 button Joypads * Game Genie Cheat Cartridge

Future versions (if, indeed, there ARE any future versions) will emulate:

* Interlace Mode

------------------------------------------------------------------------------

OTHER NOTES:------------

KGen will probably run on a 486 with 8Mb of RAM, but as a Pentium is the onlyPC that could emulate a Genesis PROPERLY, it has been *highly* optimised fora pentium.

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, visithttp://www.scitechsoft.com and download UNIVBE (Scitech Display Doctor).

Without the VESA 2.0 mode, KGen resorts to a custom video mode, which can beMUCH slower, depending on your PC / Graphics card. Also, several features areunavailable.

Other than that, KGen runs on any Pentium PC with 8Mb of RAM or greater. P166or 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 isonly 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 stopmoaning!

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: MoveA Button AS Button BD Button CRETURN StartQ Button X

Page 10: brazil

W Button YE Button Z] Mode

or JoyPad, which is reconfigureable. Joypads / Joysticks with less than fourbuttons 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 codewas written in about 36 hours, and the Z80A in only three hours, so you'dexpect there to be something wrong somewhere! I do not know of any specificbugs at the moment.

The YM2612 emulation is still not perfect, but is as close as you'll get for awhile.

------------------------------------------------------------------------------

FINALLY:--------

I do not condone piracy. I have been a games programmer for the last 12 yearsmyself, and I know we don't get paid enough :-)

Do NOT ask me for ROM images. I have a BIG collection of cartridges, which arecurrently "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 ofit. Feel free to distribute it wherever you like, AS LONG AS THIS FILE IS WITHIT.

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 Alain Jourgensen / cEvin Key / Nivek Ogre / D.R. Goettel (R.I.P) andSascha K. for making my life worth living.

Thanks to Charles Scheffold and Thomas Pytel for releasing PMODE/W and lettingme use it for free.

Thanks to Dave W. for allowing me to link to his site when mine was about todie!

Thanks to Nicolas Choukroun @ EmulNews for supporting KML, and for hostingThe KML Empire.

------------------------------------------------------------------------------

THAT'S ALL FOLKS!-----------------

Page 11: brazil

KGen-X, the MMX version, has, for the time being at least, been scrapped. Idid a lot of work on this at the end of last year, and since the standardversion is using so many optimisation tricks that just get in the way withMMX, the speed gained by MMX was hardly noticable. KGen98 is now way ahead ofKGen-X, and I'm not convinced another re-write is going to be worthwhile.

Future versions of KGen 98 may or may not be released. That depends on a lotof things. This doesn't necessarily mean the end, however...... That's all Iwant to say for now, since I don't want loads of Emails bugging me about otherversions.

------------------------------------------------------------------------------

[email protected]

Snakes' Pit : http://www.toodarkpark.demon.co.uk The KML Empire : http://www.emulnews.com/kml-empire

------------------------------------------------------------------------------