lg_ng1.gif (6494 bytes)

NEO·GEO CD Emulator V0.80

(c) 1999 Martinez Fabrice

Documentation Last Updated: 09/12/99

 

Legal Disclaimer

 

YOU USE THIS PROGRAM AT YOUR OWN RISK, I CANNOT BE HELD RESPONSIBLE FOR ANY LOSS OR DAMAGE CAUSED.

THIS PROGRAM REQUIRES THE ORIGINAL SNK CD ROMS. THESE CD ROMS ARE OWNED BY AND COPYRIGHTED BY SNK. I CANNOT BE HELD RESPONSIBLE FOR ANY REACH OF THE COPYRIGHT.

PLEASE DO NOT ASK ME TO SUPPLY YOU CD ROMS, OR BIOS IMAGE: I CANNOT HELP YOU.
PLEASE DO NOT SEND ME ANY CD-ROM.
DO NOT SEND BINARY ATTACHMENTS WITHOUT ASKING FIRST.

NEOCD IS FREE, SOURCE CODE IS FREE. SELLING IS NOT ALLOWED.
YOU CANNOT PROVIDE NEOCD AND NEOGEO GAME SOFTWARE ON THE SAME PHYSICAL MEDIUM.

YOU CAN REUSE SOURCE CODE AND TECHNICAL KNOWLEDGE AS LONG AS IT IS NOT FOR COMMERCIAL PURPOSES.

 

Requirements

 

Requirements are as follows:

Processor:
Memory:
Hard Drive Space:

 

200 MHz or higher
16Mb of RAM
~300Kb

 

Acknowledgements

 

I would like to thank the following people for making their sources freely available:

* M68000 emulator by Mike Coates & Darren Olafson, 1998.
* Multi-Z80 CPU emulator by Neil Bradley (neil@synthcom.com)
* Allegro library by Shawn Hargreaves, 1994/97.
* SEAL library by Carlos Hasan
* MAME project for technical knowledge + a few lines from vidhrdw/neogeo.c, informations and decode
  tables from fm.c

 

General Remarks

 
  • BIOS
    You'll need an image of the BIOS of a genuine NEOGEO CD.
    Copy it in the neocd folder and run STRIP.EXE <name of your bios file> to convert it to a format understandable by NEOCD.EXE.You can then delete STRIP.EXE and your old BIOS file.
    NEOCD now contains a validity check. It'll only start if you have a 100% valid BIOS.
  • Use of the ALT-TAB shortcut key
    As Windows is unable to restore video modes used by NeoCD you should NEVER use ALT-TAB.
  • Windows Hostile Mode
    This mode disables Windows Multitasking. When NeoCD runs all Windows applications will be frozen. This includes WinAmp, and any CDR Burning software. You've been warned !
    Some computers crash in this mode...
  • Special Keys
    Use tilde key to return to GUI. (Tilde key is just above TAB)
    F12 Takes a snapshot (SNAP*.PCX)
  • Changing Game CD
    If you want to change game while NeoCD is running, you must inform the emulator that you have changed the CD. In system Settings, press the button 'Force Reload'.
  • Sound card
    Your sound card is automatically detected. If for some reasons it fails or crashes, you can change the soundcard variable in neocd.cfg. The following soundcards are supported :
    -
    Sound Blaster 1.0
    - Sound Blaster 1.5
    - Sound Blaster 2.0
    - Sound Blaster Pro I or II
    - Sound Blaster 16/ASP
    - Sound Blaster AWE32
    - Windows Sound System
    - Ensoniq Soundscape (Elite)
    - Gravis Ultrasound (GF1)
    - Gravis Ultrasound Daughterboard
    - Gravis Ultrasound Max (CS4231)
    - AMD Interwave-based
    - Pro Audio Spectrum (Plus)
    - Pro Audio Spectrum 16
    - Sierra Semiconductors Aria

    If, unfortunately, your soundcard is not supported at all, you'll have to disable sound by setting soundcard to 0. You'll also have to disable sound card if your machine is not capable of giving constant 60 fps.

    If sound is active (soundcard # 0), if you set sync to "none", you won't get more than 60 fps. That's for sound synchronization. If you want to get more than 60fps (why?), disable sound...

 

Config File Only Settings

 

The following variables can ONLY be changed in neocd.cfg file. See remarks in neocd.cfg file for more explanations.

  • windows_hostile: Disables Windows multitasking.
  • keyboard: Selects keyboard layout.
  • language: Select language of Allegro error messages.
  • gamma correction: Color correction for your monitor.
  • soundcard: Your soundcard type. Leave it to -1 (autodetect)

 

GUI Options

 
  • Run Game
    Ecco.
  • Video Settings
    Graphics Driver: You should always use VBE2.0 linear mode. Avoid banked or VBE 1.x modes.
    Resolution: 320x240 or 320x480 scanlines if your GFX card supports it.
    Synchronization: If your machine is fast and your GFX card supports it, you should use VSync. Use speed limiter in other cases. Select None if you want to run at full speed.
    Show FPS counter: Displays Frames Per Second counter when checked.
  • Audio Settings
    Here you can adjust sound and cd audio volumes.
  • Joystick Settings
    This dialog box is similar to keyboard setup, except it has a Joystick Type listbox and a 'Change' button. To only calibrate joystick, you can hit 'Change' button without changing joystick type.
  • Keyboard Setup
    This dialog box is divided in two listboxes by player. The left listbox contains keys, while the other contains "actions". You can use the "Get" and "Set" buttons to know or set keys associated to actions. The exchange button exchanges keyboard configurations for player 1 and player 2.
  • Machine Settings
    Console nationality: Choose from Japanese, American or European machine. Changing this setting automatically does a reset and forces reload.
    Reset: Guess...
    Force Reload: Use this if you want to change your game CD.
    CD Drive listboxes: Select a drive in the listbox, then hit Change button.
    ! WARNING ! Don't expect to get CDDA sound if you select as CDDA replayer a drive that is not connected to your sound card :)
  • Quit
    Don't know...
  • Select Macrokeys
    This dialog box allows you to select macro key sets for player 1 et player 2.

    Editing Macro Keys

    MACRO.CFG file format :
    _ Sections are specified between []
    _ Sub-Sections are specified between <>

    [game name]   (see Cheats for more explanations)
           <character name or whatever you want> (you must put your macrokeys in a subsection)
                   description = 236+AB

    In this example macrokey is 236+AB where :
    236 represent joystick directions (look at your numeric keypad)
    Special case: 5 = neutral position
    + links buttons with joystick position
    AB are buttons to be pressed.

    236+A outputs: (2) (3) (6+A)
    236A outputs: (2) (3) (6) (A)
  • Debug Mode
    This little dialog box allows you to play with debug mode of games.
    The checkbox activates debug menus when checked. You can also mess with the "debug dip switches"
    See Debug Mode Guides
  • Cheats
    This dialog box allows you to select cheats predefined in cheats.cfg.

    CHEATS.CFG file format:
    _ Sections are specified between []
    _ Sub-Sections are specified between <>

    Each section represents a game name, this game name is readed from Neo Geo program header. To know the exact name of a game, fire NeoCD, run your game then return to the main menu. Click on Cheats, an alert box will pop-up saying <game name>: No entry for this game in cheats.cfg. The name you type as cheats.cfg section must be an EXACT match of the name given by this alert box. Example: For Fatal Fury Realbout Special it is "REALBOUT SP"

    You MUST enter codes in a <codes> section.

    Example entry:
    [game name]
            <codes>
                    description = WDEADBEEF

    In example code is DEADBEEF where:
    W is the size of data to write (W=WORD 0..65535 B=BYTE 0..255)
    DEAD = hexa offset from address $100000.
    BEEF = hexa data to write each VBL.
    It is not exacly the same layout as NeoRAGE's game genie, to use a game genie code, simply add W before it. But beware: Memory mappings are often different and many codes just won't work. The only reliable way to find cheats for now is disassembling main PRG file.

    More to come: A <patch> section with interesting possibilities !


Compatibility List

 

American Name

 

Japanese Name

 

Playable?

 

Known Problems

Aero Fighters 2 Sonic Wings 2 Yes
Art Of Fighting 2 Ryuuko no Ken 2 Yes 100% mode only. Demo game crashes.
Art Of Fighting 3 Ryuuko no Ken Gaiden Yes
Alpha Mission 2 A.S.O 2 Yes
Baseball Stars Pro Baseball Stars Pro Yes some backgrounds missing
Blue's Journey Raguy Yes
Burning Fight Burning Fight Yes
Bust-a-Move Puzzle Bobble Yes
Crossed Swords 2 Crossed Swords 2 Yes
Kabuki Klash Far East of Eden Yes
Fatal Fury Garou Densetsu Yes
Fatal Fury Special Garou Densetsu Special Yes
Fatal Fury 3 Garou Densetsu 3 Yes
Galaxy Fight Galaxy Fight Yes
IronClad Brikin'ger Yes
Karnov's Revenge Fighters History Dynamite Yes Linescroll missing
King Of Fighters' 94 King Of Fighters' 94 Yes
King Of Fighters' 95 King Of Fighters' 95 Yes
King Of Fighters' 96 King Of Fighters' 96 Yes
King Of Fighters' 97 King Of Fighters' 97 Yes
King Of Fighters' 98 King Of Fighters' 98 Yes
Last Blade Gekka no Kenshi Yes
Last Resort Last Resort Yes
Magician Lord Magician Lord Yes
Metal Slug Metal Slug Yes
Metal Slug 2 Metal Slug 2 Yes
Mutation Nation Mutation Nation Yes
Nam 1975 Nam 1975 Yes
Ninja Commando Ninja Commando Yes
Ninja Masters Ninja Masters Yes
Power Spikes 2 Power Spikes 2 No Aqua volley ball !!
Pulstar Pulstar Yes
Ragnagard Shinohken Yes
Rally Chase Thrash Rally Yes
Real Bout Fatal Fury Real Bout Garou Densetsu Yes
Real Bout Fatal Fury Special Real Bout Garou Densetsu Special Yes
Real Bout Fatal Fury 2 Real Bout Garou Densetsu 2 Yes
Robo Army Robo Army Yes
Samurai Showdown Samurai Spirits Yes
Samurai Showdown 2 Shin Samurai Spirits Yes
Samurai Showdown 3 Samurai Spirits 3 Yes
Samurai Showdown 4 Samurai Spirits 4 Yes
Doesn't exist. Samurai Spirits RPG Bushidou Retsuden Yes Priority Problems.
Savage Reign Yes
Sengoku 2 Sengoku Densyo 2 Yes
Soccer Brawl Soccer Brawl Yes
Super Sidekicks Tokuten-oh Yes
Super Sidekicks 2 Tokuten-oh 2 No Linescroll missing.
Super Sidekicks 3 Tokuten-oh 3 No Linescroll missing.
Super Spy Super Spy Yes
Top Hunter Top Hunter Yes
View Point View Point Yes
Windjammers Flying Power Disk Yes Some GFX missing.
World Heroes 2 Jet World Heroes 2 Jet Yes
World Heroes 2 Perfect World Heroes 2 Perfect Yes
Zentrick

 

Zentrick

 

No

 

Locks Up.

 

Tech Info

 
  • Files:

    STARTUP.BIN Is an image of the system memory of a genuine NeoGeo CD at boot time
    NEOCD.BIN Is the BIOS of the NeoGeo CD (it is not provided!)
    MEMCARD.BIN Is the 8Kb battery backed RAM.
    KEYBOARD.DAT File containing keyboard layouts from Allegro (editable with Grabber)
    LANGUAGE.DAT File containing locale for Allegro error messages (same as above)
    CWSDPMI.EXE DMPI Server to use under pure DOS.
  • Memory Repartition:

    PRG Memory (2Mo)
    FIX Memory (128Kb)
    SPR Memory (4Mo)
    PCM Memory (1Mo)
    Z80 Ram (65K)
  • How can I emulate hardware of the NeoGeo CD ?
    After studying the inner workings of NeoCD games I figured that 99,9% of them make calls to BIOS to load files from CDROM. So there's no need to emulate CD-ROM, I just trap calls to BIOS and process them myself.

    First of all we need to patch BIOS CDROM CHECK, the BIOS periodically checks if cdrom unit is responding, as we will not emulate it this check fails.
    To do this write 4E714E71 at C0B040

    The BIOS has two entry points for the load files function. One that displays 'now loading' and one that does not. We'll place a custom 68000 opcode and a RTS (4E75) to trap the call. Then, we'll add new opcodes to the 68K core (LINEA and LINEF are good locations) to trap BIOS CALLS. (Let's say FAC0)
    We'll write FAC04E75 at C00552 and C00564

    This function receives in A0 a list of files to load:

    Size

    Desc
    Variable Name of the file to load finished by a zero.
    Byte Bank number
    Variable Optional pad byte (on 68K LONG cannot start on odd address)
    Long (4Bytes) Offset

    The list is finished by a zero. There is one exception to this scheme see source code for
    more info.

    File Type Info
    PRG Loaded in PRG memory. Non banked.
    FIX Loaded in FIX memory. Non banked. Offset must be divided by 2
    SPR Loaded in SPR memory. Banksize = 1Mo.
    Z80 Loaded in Z80 PRG Ram. Non banked.
    PAT Loaded in Z80 Ram. Non banked.
    PCM Loaded in PCM memory. Banksize = 512K. Offset must be divided by 2
  • IPL.TXT:
    NeoGeo CD processes a file named IPL.TXT (Initial Program Load) before starting the game.
    Each line consists of filename, bank, offset and is terminated by a CR/LF
    Ex: FOO.SPR, 4, 3C000
  • Upload:
    Software can upload data from main PRG memory to other zones by calling BIOS.
    Entry point is C00546

    Parameters are located in PRG memory at:
    10FEF8.L: Source Addr
    10FEF4.L: Dest Offset
    10FEDA.B: Dest Zone
    10FEFC.L: Block Size
    10FEDB.B: Bank number

    Zone numbers: (x means don't care)
    x1 FIX
    x2 SPR
    x3 Z80
    x4 PCM
    x5 PAT

    Remarks of filetypes also applies. (See how can I emulate additional hardware)
  • BIOS exit:
    Called by software to return to CD Player. Entry point = C0055E
  • Interesting memory addresses in PRG memory:

    00010E.L: Pointer to debug dip switches
    000116.L: Pointer to Japanese name
    00011A.L: Pointer to English name
    000122.L: Entry point of the software
    10F6EE.L: Contains a copy of 68.L (IRQ Vector). Must be setup by the emulator at startup
    10FD83.B: Nationality of the machine (0=Japanese 1&2=English)
    10FDAE.B: Set it to zero before booting to force complete initialization.
    10FE80.B: Set if to FF to activate debug mode
  • Sound Info : (NEW! may contain errors !)
    Basically is it exactly the same sound hardware as cartridge NeoGeo.

    What is needed to implement sound in NeoCD ?
    Everything needed is known, now i must code, code and code...

    What are those .PAT files for ?

    In fact, .PAT files are PATch files for Z80. Their format is :
    Offset Type Description
    0 WORD Offset in Z80 memory, if = 0 means end of list.
    2 WORD Data to write (offset in PCM memory)
    4 WORD Data to write (offset in PCM memory)
    6 WORD Data to write (offset in PCM memory) Ignored if 0
    8 WORD Data to write (offset in PCM memory) Ignored if 0

    Who controls CDDA replay ?

    In fact the 68000 controls CDDA replay. Sound codes are sent to Z80, it translates it in a track number and send it back to 68000. Some games doesn't use Z80 for CDDA replay.

Q&A

 
  • NEOCD uses my first cdrom unit, but I would like to use my second unit which is faster
    Modify parameter cdrom= in neocd.cfg to meet your needs.
  • My keyboard is all messed up (Q=A and so on)
    Configure you keyboard type with keyboard= in neocd.cfg
  • I can't get any CDDA sound...
    Please verify that the CD-ROM unit you selected as CDDA replayer is the one that is connected to your sound card ... :)
  • I get an "error while processing IPL.TXT" error.
    You have to check the following points:
    - You have configured your cdrom unit in "machine settings"
    - You have inserted your cdrom, and have waited some time to let it read directory.
    - File IPL.TXT on your cdrom is readable.
    - Open IPL.TXT with notepad and test all files mentioned in it (by copying them somewhere)

 

Wanted!


If you have done some interesting hack, or typed some cool macrokey sets, feel free to send them, they will be added to the main distribution of NeoCD :

I've found some delirious cheat codes !
I've discovered some nice debug menus !
I've typed some mega cool macrokeys sets !

E-Mails



NO BIOS REQUESTS !!

WebMaster: BEZON Philippe
Coder: MARTINEZ Fabrice

Go to Official Homepage



NG_Cap.gif (5837 octets)